summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionService.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2020-05-04 15:01:59 -0700
committerTyler Gunn <tgunn@google.com>2020-05-05 09:34:07 -0700
commitffbcd894530ccfa548df74178495a46a0058504e (patch)
treeea5c9d4f813ab0e8c232b01f22d873f4cb98784f /telecomm/java/android/telecom/ConnectionService.java
parent31d3998a0584300f78e4c709ceeaf81bfa8af70c (diff)
Improve connection manager logging.
1. In ConnectionService, upping the incoming log level to info from debug; this ensures we can better trace whether methods are actually called. 2. Added the ability in the logging class to get a new external session which supplies the owner info which will be passed in to the recipient of the external session. This allows Telecom or a connection manager to pass in a package abbreviation which will form the calling owner info when the receiver continues the external session. 3. Add owner info to the Session.Info class so it can be passed about. 4. Ensure owner info is copied when getting Session.Info; subsessions were not showing the owner info in the past; this corrects that. 5. When retrieving the external session info, creating a "package call stack" with the owner info. This lets us see the hierarchy of where calls originated. Example: cad/cast/ccme Shows that com.android.dialer send a message to com.android.server.telecom which relayed a message to com.connection.manager.example. 6. Start sessions in RemoteConnection API methods and pass along external session info. This bridges session tracing across a connection manager so we can now trace a method call all the way from dialer, through telecom, through the connection manager, and finally into telephony. Test: Manual call testing with connection manager to verify log behavior. Bug: 153899641 Change-Id: I4518a50550203818374b4e0b52eccb84ffd561dc
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rwxr-xr-xtelecomm/java/android/telecom/ConnectionService.java58
1 files changed, 29 insertions, 29 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index a716b37f7efd..56cba1d3f913 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -2102,12 +2102,12 @@ public abstract class ConnectionService extends Service {
private void abort(String callId) {
- Log.d(this, "abort %s", callId);
+ Log.i(this, "abort %s", callId);
findConnectionForAction(callId, "abort").onAbort();
}
private void answerVideo(String callId, int videoState) {
- Log.d(this, "answerVideo %s", callId);
+ Log.i(this, "answerVideo %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "answer").onAnswer(videoState);
} else {
@@ -2116,7 +2116,7 @@ public abstract class ConnectionService extends Service {
}
private void answer(String callId) {
- Log.d(this, "answer %s", callId);
+ Log.i(this, "answer %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "answer").onAnswer();
} else {
@@ -2125,12 +2125,12 @@ public abstract class ConnectionService extends Service {
}
private void deflect(String callId, Uri address) {
- Log.d(this, "deflect %s", callId);
+ Log.i(this, "deflect %s", callId);
findConnectionForAction(callId, "deflect").onDeflect(address);
}
private void reject(String callId) {
- Log.d(this, "reject %s", callId);
+ Log.i(this, "reject %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "reject").onReject();
} else {
@@ -2139,34 +2139,34 @@ public abstract class ConnectionService extends Service {
}
private void reject(String callId, String rejectWithMessage) {
- Log.d(this, "reject %s with message", callId);
+ Log.i(this, "reject %s with message", callId);
findConnectionForAction(callId, "reject").onReject(rejectWithMessage);
}
private void reject(String callId, @android.telecom.Call.RejectReason int rejectReason) {
- Log.d(this, "reject %s with reason %d", callId, rejectReason);
+ Log.i(this, "reject %s with reason %d", callId, rejectReason);
findConnectionForAction(callId, "reject").onReject(rejectReason);
}
private void transfer(String callId, Uri number, boolean isConfirmationRequired) {
- Log.d(this, "transfer %s", callId);
+ Log.i(this, "transfer %s", callId);
findConnectionForAction(callId, "transfer").onTransfer(number, isConfirmationRequired);
}
private void consultativeTransfer(String callId, String otherCallId) {
- Log.d(this, "consultativeTransfer %s", callId);
+ Log.i(this, "consultativeTransfer %s", callId);
Connection connection1 = findConnectionForAction(callId, "consultativeTransfer");
Connection connection2 = findConnectionForAction(otherCallId, " consultativeTransfer");
connection1.onTransfer(connection2);
}
private void silence(String callId) {
- Log.d(this, "silence %s", callId);
+ Log.i(this, "silence %s", callId);
findConnectionForAction(callId, "silence").onSilence();
}
private void disconnect(String callId) {
- Log.d(this, "disconnect %s", callId);
+ Log.i(this, "disconnect %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "disconnect").onDisconnect();
} else {
@@ -2175,7 +2175,7 @@ public abstract class ConnectionService extends Service {
}
private void hold(String callId) {
- Log.d(this, "hold %s", callId);
+ Log.i(this, "hold %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "hold").onHold();
} else {
@@ -2184,7 +2184,7 @@ public abstract class ConnectionService extends Service {
}
private void unhold(String callId) {
- Log.d(this, "unhold %s", callId);
+ Log.i(this, "unhold %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "unhold").onUnhold();
} else {
@@ -2193,7 +2193,7 @@ public abstract class ConnectionService extends Service {
}
private void onCallAudioStateChanged(String callId, CallAudioState callAudioState) {
- Log.d(this, "onAudioStateChanged %s %s", callId, callAudioState);
+ Log.i(this, "onAudioStateChanged %s %s", callId, callAudioState);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "onCallAudioStateChanged").setCallAudioState(
callAudioState);
@@ -2204,7 +2204,7 @@ public abstract class ConnectionService extends Service {
}
private void playDtmfTone(String callId, char digit) {
- Log.d(this, "playDtmfTone %s %c", callId, digit);
+ Log.i(this, "playDtmfTone %s %c", callId, digit);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "playDtmfTone").onPlayDtmfTone(digit);
} else {
@@ -2213,7 +2213,7 @@ public abstract class ConnectionService extends Service {
}
private void stopDtmfTone(String callId) {
- Log.d(this, "stopDtmfTone %s", callId);
+ Log.i(this, "stopDtmfTone %s", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "stopDtmfTone").onStopDtmfTone();
} else {
@@ -2222,7 +2222,7 @@ public abstract class ConnectionService extends Service {
}
private void conference(String callId1, String callId2) {
- Log.d(this, "conference %s, %s", callId1, callId2);
+ Log.i(this, "conference %s, %s", callId1, callId2);
// Attempt to get second connection or conference.
Connection connection2 = findConnectionForAction(callId2, "conference");
@@ -2269,7 +2269,7 @@ public abstract class ConnectionService extends Service {
}
private void splitFromConference(String callId) {
- Log.d(this, "splitFromConference(%s)", callId);
+ Log.i(this, "splitFromConference(%s)", callId);
Connection connection = findConnectionForAction(callId, "splitFromConference");
if (connection == getNullConnection()) {
@@ -2284,7 +2284,7 @@ public abstract class ConnectionService extends Service {
}
private void mergeConference(String callId) {
- Log.d(this, "mergeConference(%s)", callId);
+ Log.i(this, "mergeConference(%s)", callId);
Conference conference = findConferenceForAction(callId, "mergeConference");
if (conference != null) {
conference.onMerge();
@@ -2292,7 +2292,7 @@ public abstract class ConnectionService extends Service {
}
private void swapConference(String callId) {
- Log.d(this, "swapConference(%s)", callId);
+ Log.i(this, "swapConference(%s)", callId);
Conference conference = findConferenceForAction(callId, "swapConference");
if (conference != null) {
conference.onSwap();
@@ -2300,7 +2300,7 @@ public abstract class ConnectionService extends Service {
}
private void addConferenceParticipants(String callId, List<Uri> participants) {
- Log.d(this, "addConferenceParticipants(%s)", callId);
+ Log.i(this, "addConferenceParticipants(%s)", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "addConferenceParticipants")
.onAddConferenceParticipants(participants);
@@ -2318,7 +2318,7 @@ public abstract class ConnectionService extends Service {
* @param callId The ID of the call to pull.
*/
private void pullExternalCall(String callId) {
- Log.d(this, "pullExternalCall(%s)", callId);
+ Log.i(this, "pullExternalCall(%s)", callId);
Connection connection = findConnectionForAction(callId, "pullExternalCall");
if (connection != null) {
connection.onPullExternalCall();
@@ -2335,7 +2335,7 @@ public abstract class ConnectionService extends Service {
* @param extras Extras associated with the event.
*/
private void sendCallEvent(String callId, String event, Bundle extras) {
- Log.d(this, "sendCallEvent(%s, %s)", callId, event);
+ Log.i(this, "sendCallEvent(%s, %s)", callId, event);
Connection connection = findConnectionForAction(callId, "sendCallEvent");
if (connection != null) {
connection.onCallEvent(event, extras);
@@ -2348,7 +2348,7 @@ public abstract class ConnectionService extends Service {
* @param callId The ID of the call which completed handover.
*/
private void notifyHandoverComplete(String callId) {
- Log.d(this, "notifyHandoverComplete(%s)", callId);
+ Log.i(this, "notifyHandoverComplete(%s)", callId);
Connection connection = findConnectionForAction(callId, "notifyHandoverComplete");
if (connection != null) {
connection.onHandoverComplete();
@@ -2368,7 +2368,7 @@ public abstract class ConnectionService extends Service {
* @param extras The new extras bundle.
*/
private void handleExtrasChanged(String callId, Bundle extras) {
- Log.d(this, "handleExtrasChanged(%s, %s)", callId, extras);
+ Log.i(this, "handleExtrasChanged(%s, %s)", callId, extras);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "handleExtrasChanged").handleExtrasChanged(extras);
} else if (mConferenceById.containsKey(callId)) {
@@ -2377,7 +2377,7 @@ public abstract class ConnectionService extends Service {
}
private void startRtt(String callId, Connection.RttTextStream rttTextStream) {
- Log.d(this, "startRtt(%s)", callId);
+ Log.i(this, "startRtt(%s)", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "startRtt").onStartRtt(rttTextStream);
} else if (mConferenceById.containsKey(callId)) {
@@ -2386,7 +2386,7 @@ public abstract class ConnectionService extends Service {
}
private void stopRtt(String callId) {
- Log.d(this, "stopRtt(%s)", callId);
+ Log.i(this, "stopRtt(%s)", callId);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "stopRtt").onStopRtt();
} else if (mConferenceById.containsKey(callId)) {
@@ -2395,7 +2395,7 @@ public abstract class ConnectionService extends Service {
}
private void handleRttUpgradeResponse(String callId, Connection.RttTextStream rttTextStream) {
- Log.d(this, "handleRttUpgradeResponse(%s, %s)", callId, rttTextStream == null);
+ Log.i(this, "handleRttUpgradeResponse(%s, %s)", callId, rttTextStream == null);
if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "handleRttUpgradeResponse")
.handleRttUpgradeResponse(rttTextStream);
@@ -2405,7 +2405,7 @@ public abstract class ConnectionService extends Service {
}
private void onPostDialContinue(String callId, boolean proceed) {
- Log.d(this, "onPostDialContinue(%s)", callId);
+ Log.i(this, "onPostDialContinue(%s)", callId);
findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed);
}