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
This commit is contained in:
@@ -734,6 +734,31 @@ public abstract class Connection extends Conferenceable {
|
||||
public static final String EXTRA_ORIGINAL_CONNECTION_ID =
|
||||
"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
|
||||
|
||||
Reference in New Issue
Block a user