Merge "Improve connection manager logging." into rvc-dev

This commit is contained in:
Tyler Gunn
2020-05-08 22:12:19 +00:00
committed by Android (Google) Code Review

View File

@@ -658,7 +658,6 @@ public final class RemoteConnection {
private int mCallerDisplayNamePresentation; private int mCallerDisplayNamePresentation;
private RemoteConference mConference; private RemoteConference mConference;
private Bundle mExtras; private Bundle mExtras;
private String mCallingPackage;
private String mCallingPackageAbbreviation; private String mCallingPackageAbbreviation;
/** /**
@@ -675,9 +674,9 @@ public final class RemoteConnection {
if (request != null && request.getExtras() != null if (request != null && request.getExtras() != null
&& request.getExtras().containsKey( && request.getExtras().containsKey(
Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME)) { Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME)) {
mCallingPackage = request.getExtras().getString( String callingPackage = request.getExtras().getString(
Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME); 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(); Bundle newExtras = new Bundle();
newExtras.putString(Connection.EXTRA_ORIGINAL_CONNECTION_ID, callId); newExtras.putString(Connection.EXTRA_ORIGINAL_CONNECTION_ID, callId);
putExtras(newExtras); putExtras(newExtras);
mCallingPackage = callingPackage; mCallingPackageAbbreviation = Log.getPackageAbbreviation(callingPackage);
mCallingPackageAbbreviation = Log.getPackageAbbreviation(mCallingPackage);
} }
/** /**
@@ -916,7 +914,8 @@ public final class RemoteConnection {
Log.startSession("RC.a", getActiveOwnerInfo()); Log.startSession("RC.a", getActiveOwnerInfo());
try { try {
if (mConnected) { if (mConnected) {
mConnectionService.abort(mConnectionId, Log.getExternalSession()); mConnectionService.abort(mConnectionId, Log.getExternalSession(
mCallingPackageAbbreviation));
} }
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} finally { } finally {
@@ -931,7 +930,8 @@ public final class RemoteConnection {
Log.startSession("RC.an", getActiveOwnerInfo()); Log.startSession("RC.an", getActiveOwnerInfo());
try { try {
if (mConnected) { if (mConnected) {
mConnectionService.answer(mConnectionId, Log.getExternalSession()); mConnectionService.answer(mConnectionId, Log.getExternalSession(
mCallingPackageAbbreviation));
} }
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} finally { } finally {
@@ -948,7 +948,8 @@ public final class RemoteConnection {
Log.startSession("RC.an2", getActiveOwnerInfo()); Log.startSession("RC.an2", getActiveOwnerInfo());
try { try {
if (mConnected) { if (mConnected) {
mConnectionService.answerVideo(mConnectionId, videoState, null /*Session.Info*/); mConnectionService.answerVideo(mConnectionId, videoState,
Log.getExternalSession(mCallingPackageAbbreviation));
} }
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} finally { } finally {
@@ -963,7 +964,8 @@ public final class RemoteConnection {
Log.startSession("RC.r", getActiveOwnerInfo()); Log.startSession("RC.r", getActiveOwnerInfo());
try { try {
if (mConnected) { if (mConnected) {
mConnectionService.reject(mConnectionId, null /*Session.Info*/); mConnectionService.reject(mConnectionId, Log.getExternalSession(
mCallingPackageAbbreviation));
} }
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} finally { } finally {
@@ -978,7 +980,8 @@ public final class RemoteConnection {
Log.startSession("RC.h", getActiveOwnerInfo()); Log.startSession("RC.h", getActiveOwnerInfo());
try { try {
if (mConnected) { if (mConnected) {
mConnectionService.hold(mConnectionId, null /*Session.Info*/); mConnectionService.hold(mConnectionId, Log.getExternalSession(
mCallingPackageAbbreviation));
} }
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} finally { } finally {
@@ -993,7 +996,8 @@ public final class RemoteConnection {
Log.startSession("RC.u", getActiveOwnerInfo()); Log.startSession("RC.u", getActiveOwnerInfo());
try { try {
if (mConnected) { if (mConnected) {
mConnectionService.unhold(mConnectionId, null /*Session.Info*/); mConnectionService.unhold(mConnectionId, Log.getExternalSession(
mCallingPackageAbbreviation));
} }
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} finally { } finally {