diff options
author | Tyler Gunn <tgunn@google.com> | 2021-02-05 11:12:57 -0800 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2021-02-25 23:08:29 +0000 |
commit | d582184178c1c68aa67bbc82d82f6a2c498e684b (patch) | |
tree | 5485901dd943affd9571b53167cbd583ddc04ca8 /telecomm/java/android/telecom/Connection.java | |
parent | 3341199c3336dc9528715a4c880600788b07fb04 (diff) |
CallDiagnosticService API
The CallDiagnosticService API is an OEM-backed API which allows an OEM
provided app to monitor the state of ongoing telephony calls on the
device and to help the user navigate connectivity or audio issues
related to these calls. It also provides a means for the app to send
and receive device to device messages between devices during an ongoing
call (where supported) in order to facilitate a better calling experience.
Test: Added new CTS test suite for API.
Test: Manual test of CDS behavior using telecom command line option to
override the active CDS to the telecom test app implementation.
Bug: 163085177
Change-Id: I1f37408d2aa6c630f0f9e3d6b6eb8a390d804d7e
Diffstat (limited to 'telecomm/java/android/telecom/Connection.java')
-rw-r--r-- | telecomm/java/android/telecom/Connection.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 335a10221d06..973b20ad0713 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -926,6 +926,46 @@ public abstract class Connection extends Conferenceable { public static final String EVENT_RTT_AUDIO_INDICATION_CHANGED = "android.telecom.event.RTT_AUDIO_INDICATION_CHANGED"; + /** + * Connection event used to signal between the telephony {@link ConnectionService} and Telecom + * when device to device messages are sent/received. + * <p> + * Device to device messages originating from the network are sent by telephony using + * {@link Connection#sendConnectionEvent(String, Bundle)} and are routed up to any active + * {@link CallDiagnosticService} implementation which is active. + * <p> + * Likewise, if a {@link CallDiagnosticService} sends a message using + * {@link DiagnosticCall#sendDeviceToDeviceMessage(int, int)}, it will be routed to telephony + * via {@link Connection#onCallEvent(String, Bundle)}. The telephony stack will relay the + * message to the other device. + * @hide + */ + @SystemApi + public static final String EVENT_DEVICE_TO_DEVICE_MESSAGE = + "android.telecom.event.DEVICE_TO_DEVICE_MESSAGE"; + + /** + * Sent along with {@link #EVENT_DEVICE_TO_DEVICE_MESSAGE} to indicate the device to device + * message type. + * + * See {@link DiagnosticCall} for more information. + * @hide + */ + @SystemApi + public static final String EXTRA_DEVICE_TO_DEVICE_MESSAGE_TYPE = + "android.telecom.extra.DEVICE_TO_DEVICE_MESSAGE_TYPE"; + + /** + * Sent along with {@link #EVENT_DEVICE_TO_DEVICE_MESSAGE} to indicate the device to device + * message value. + * <p> + * See {@link DiagnosticCall} for more information. + * @hide + */ + @SystemApi + public static final String EXTRA_DEVICE_TO_DEVICE_MESSAGE_VALUE = + "android.telecom.extra.DEVICE_TO_DEVICE_MESSAGE_VALUE"; + // Flag controlling whether PII is emitted into the logs private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG); |