diff options
author | Tyler Gunn <tgunn@google.com> | 2020-05-06 11:33:26 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2020-05-07 15:33:26 -0700 |
commit | 6b0cfc3878e33e89b45e30c83d0bce46fbc437d8 (patch) | |
tree | 6b4350f0ec1f39b54dbd18057c064c1c1f4c3bd6 /telecomm/java/android/telecom/RemoteConnection.java | |
parent | f93bd9b068281ab2ed3af3268368a8fde84d9028 (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: Ic081237737359aadbec8a8a0b0640c9e31443ef6
Diffstat (limited to 'telecomm/java/android/telecom/RemoteConnection.java')
-rw-r--r-- | telecomm/java/android/telecom/RemoteConnection.java | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java index f947d34e5baf..df3362578680 100644 --- a/telecomm/java/android/telecom/RemoteConnection.java +++ b/telecomm/java/android/telecom/RemoteConnection.java @@ -658,7 +658,6 @@ public final class RemoteConnection { private int mCallerDisplayNamePresentation; private RemoteConference mConference; private Bundle mExtras; - private String mCallingPackage; private String mCallingPackageAbbreviation; /** @@ -675,9 +674,9 @@ public final class RemoteConnection { if (request != null && request.getExtras() != null && request.getExtras().containsKey( Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME)) { - mCallingPackage = request.getExtras().getString( + String callingPackage = request.getExtras().getString( Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME); - mCallingPackageAbbreviation = Log.getPackageAbbreviation(mCallingPackage); + mCallingPackageAbbreviation = Log.getPackageAbbreviation(callingPackage); } } @@ -717,8 +716,7 @@ public final class RemoteConnection { Bundle newExtras = new Bundle(); newExtras.putString(Connection.EXTRA_ORIGINAL_CONNECTION_ID, callId); putExtras(newExtras); - mCallingPackage = callingPackage; - mCallingPackageAbbreviation = Log.getPackageAbbreviation(mCallingPackage); + mCallingPackageAbbreviation = Log.getPackageAbbreviation(callingPackage); } /** @@ -916,7 +914,8 @@ public final class RemoteConnection { Log.startSession("RC.a", getActiveOwnerInfo()); try { if (mConnected) { - mConnectionService.abort(mConnectionId, Log.getExternalSession()); + mConnectionService.abort(mConnectionId, Log.getExternalSession( + mCallingPackageAbbreviation)); } } catch (RemoteException ignored) { } finally { @@ -931,7 +930,8 @@ public final class RemoteConnection { Log.startSession("RC.an", getActiveOwnerInfo()); try { if (mConnected) { - mConnectionService.answer(mConnectionId, Log.getExternalSession()); + mConnectionService.answer(mConnectionId, Log.getExternalSession( + mCallingPackageAbbreviation)); } } catch (RemoteException ignored) { } finally { @@ -948,7 +948,8 @@ public final class RemoteConnection { Log.startSession("RC.an2", getActiveOwnerInfo()); try { if (mConnected) { - mConnectionService.answerVideo(mConnectionId, videoState, null /*Session.Info*/); + mConnectionService.answerVideo(mConnectionId, videoState, + Log.getExternalSession(mCallingPackageAbbreviation)); } } catch (RemoteException ignored) { } finally { @@ -963,7 +964,8 @@ public final class RemoteConnection { Log.startSession("RC.r", getActiveOwnerInfo()); try { if (mConnected) { - mConnectionService.reject(mConnectionId, null /*Session.Info*/); + mConnectionService.reject(mConnectionId, Log.getExternalSession( + mCallingPackageAbbreviation)); } } catch (RemoteException ignored) { } finally { @@ -978,7 +980,8 @@ public final class RemoteConnection { Log.startSession("RC.h", getActiveOwnerInfo()); try { if (mConnected) { - mConnectionService.hold(mConnectionId, null /*Session.Info*/); + mConnectionService.hold(mConnectionId, Log.getExternalSession( + mCallingPackageAbbreviation)); } } catch (RemoteException ignored) { } finally { @@ -993,7 +996,8 @@ public final class RemoteConnection { Log.startSession("RC.u", getActiveOwnerInfo()); try { if (mConnected) { - mConnectionService.unhold(mConnectionId, null /*Session.Info*/); + mConnectionService.unhold(mConnectionId, Log.getExternalSession( + mCallingPackageAbbreviation)); } } catch (RemoteException ignored) { } finally { |