From d697c5dc9b6e1350e8bc771a683d6f5ffc607b2c Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Wed, 17 Aug 2016 13:48:27 -0700 Subject: [PATCH] DO NOT MERGE ANYWHERE (nyc-dr1-dev) Add connection events for indicated when a connection is remotely held. Note: This is different than the existing EVENT_ON_HOLD_TONE_START and EVENT_ON_HOLD_TONE_END events, which trigger playing a hold tone for remotely held calls. Those events also take into account whether the call is foreground/background; it is left as a future exercise to clean that up. Bug: 30349182 Change-Id: I919365d243ae3b9fe56454c7a2b9d5805b2c03a2 (cherry picked from commit b5ed860de71fe165af63b4255da25d0295abaa69) --- telecomm/java/android/telecom/Connection.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 4da5ff28204e6..a093d54568d3c 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -461,6 +461,32 @@ public abstract class Connection extends Conferenceable { */ public static final String EVENT_CALL_MERGE_FAILED = "android.telecom.event.CALL_MERGE_FAILED"; + /** + * Connection event used to inform {@link InCallService}s when a call has been put on hold by + * the remote party. + *

+ * This is different than the {@link Connection#STATE_HOLDING} state which indicates that the + * call is being held locally on the device. When a capable {@link ConnectionService} receives + * signalling to indicate that the remote party has put the call on hold, it can send this + * connection event. + * @hide + */ + public static final String EVENT_CALL_REMOTELY_HELD = + "android.telecom.event.CALL_REMOTELY_HELD"; + + /** + * Connection event used to inform {@link InCallService}s when a call which was remotely held + * (see {@link #EVENT_CALL_REMOTELY_HELD}) has been un-held by the remote party. + *

+ * This is different than the {@link Connection#STATE_HOLDING} state which indicates that the + * call is being held locally on the device. When a capable {@link ConnectionService} receives + * signalling to indicate that the remote party has taken the call off hold, it can send this + * connection event. + * @hide + */ + public static final String EVENT_CALL_REMOTELY_UNHELD = + "android.telecom.event.CALL_REMOTELY_UNHELD"; + // Flag controlling whether PII is emitted into the logs private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG);