summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/Connection.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2020-04-17 14:03:35 -0700
committerTyler Gunn <tgunn@google.com>2020-08-05 13:45:33 -0700
commitc59fd0cd80d7ba3286e0d3e656b59e6547889afe (patch)
treee5c0f9da52d23515ec3ae1679002fa852023626e /telecomm/java/android/telecom/Connection.java
parent9255edfa7d63e3708b91695d10d2bd65b38d7d8d (diff)
Improve remote connection logging.
This CL improves traceability of calls initiated via a remote connection service. For regular incoming/outgoing calls, when initiating a request to create a remote connection in RemoteConnectionService, we set EXTRA_REQUESTING_PACKAGE_NAME in the parcelled request to the package name of the connection manager. In ConnectionService this serves as an indicator that the incoming request is via a connection manager and is used to trigger setting of EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE with the phone account handle the remote connection service uses to place the call. For conferences and existing connections, the initial request is from the remote connection service to the connection manager so we can just set the EXTRA_REMOTE_PHONE_ACCOUNT handle there directly. Also cleaned up logging in the telecom session logging to remove the assumption that the ownerInfo is an incall service. Test: Manual testing with connection manager to verify logging. Bug: 154353494 Fixes: 155097158 Merged-In: I916750e0f558db1eb9e581bab7a9fbc71f781709 Change-Id: Iee1b5cfd3334a5de08d7b04022b7c6d5af6a4b04
Diffstat (limited to 'telecomm/java/android/telecom/Connection.java')
-rwxr-xr-xtelecomm/java/android/telecom/Connection.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index b35452146e72..fe813763e3c7 100755
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -735,6 +735,31 @@ public abstract class Connection extends Conferenceable {
"android.telecom.extra.ORIGINAL_CONNECTION_ID";
/**
+ * Extra key set on a {@link Connection} when it was created via a remote connection service.
+ * For example, if a connection manager requests a remote connection service to create a call
+ * using one of the remote connection service's phone account handle, this extra will be set so
+ * that Telecom knows that the wrapped remote connection originated in a remote connection
+ * service. We stash this in the extras since connection managers will typically copy the
+ * extras from a {@link RemoteConnection} to a {@link Connection} (there is ultimately not
+ * other way to relate a {@link RemoteConnection} to a {@link Connection}.
+ * @hide
+ */
+ public static final String EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE =
+ "android.telecom.extra.REMOTE_PHONE_ACCOUNT_HANDLE";
+
+ /**
+ * Extra key set from a {@link ConnectionService} when using the remote connection APIs
+ * (e.g. {@link RemoteConnectionService#createRemoteConnection(PhoneAccountHandle,
+ * ConnectionRequest, boolean)}) to create a remote connection. Provides the receiving
+ * {@link ConnectionService} with a means to know the package name of the requesting
+ * {@link ConnectionService} so that {@link #EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE} can be set for
+ * better visibility in Telecom of where a connection ultimately originated.
+ * @hide
+ */
+ public static final String EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME =
+ "android.telecom.extra.REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME";
+
+ /**
* Boolean connection extra key set on the extras passed to
* {@link Connection#sendConnectionEvent} which indicates that audio is present
* on the RTT call when the extra value is true.