Further handover support changes.
Add handover extras key used when initiating handover.
Add handover complete / fail connection events which are sent to the
initiating IncallService when a handover is complete or fails.
Adding PhoneAccount extra to indicate that a self-managed CS should have
its calls logged to the call log.
Test: Manual
Bug: 37102939
Change-Id: Icbb6f1addf913de841a9c48089a7d8311668f3bc
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index f822d5e..c147578 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -165,20 +165,39 @@
"android.telecom.extra.HANDOVER_VIDEO_STATE";
/**
- * Call event sent from Telecom via {@link Connection#onCallEvent(String, Bundle)} to
- * inform a {@link Connection} that a handover initiated via {@link #EVENT_REQUEST_HANDOVER}
- * has completed.
+ * Extra key used with the {@link #EVENT_REQUEST_HANDOVER} call event. Used by the
+ * {@link InCallService} initiating a handover to provide a {@link Bundle} with extra
+ * information to the handover {@link ConnectionService} specified by
+ * {@link #EXTRA_HANDOVER_PHONE_ACCOUNT_HANDLE}.
+ * <p>
+ * This {@link Bundle} is not interpreted by Telecom, but passed as-is to the
+ * {@link ConnectionService} via the request extras when
+ * {@link ConnectionService#onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)}
+ * is called to initate the handover.
* @hide
*/
- public static final String EVENT_HANDOVER_COMPLETE = "android.telecom.event.HANDOVER_COMPLETE";
+ public static final String EXTRA_HANDOVER_EXTRAS = "android.telecom.extra.HANDOVER_EXTRAS";
/**
- * Call event sent from Telecom via {@link Connection#onCallEvent(String, Bundle)} to
- * inform a {@link Connection} that a handover initiated via {@link #EVENT_REQUEST_HANDOVER}
- * has failed to complete.
+ * Call event sent from Telecom to the handover {@link ConnectionService} via
+ * {@link Connection#onCallEvent(String, Bundle)} to inform a {@link Connection} that a handover
+ * to the {@link ConnectionService} has completed successfully.
+ * <p>
+ * A handover is initiated with the {@link #EVENT_REQUEST_HANDOVER} call event.
* @hide
*/
- public static final String EVENT_HANDOVER_FAILED = "android.telecom.event.HANDOVER_FAILED";
+ public static final String EVENT_HANDOVER_COMPLETE =
+ "android.telecom.event.HANDOVER_COMPLETE";
+ /**
+ * Call event sent from Telecom to the handover {@link ConnectionService} via
+ * {@link Connection#onCallEvent(String, Bundle)} to inform a {@link Connection} that a handover
+ * to the {@link ConnectionService} has failed.
+ * <p>
+ * A handover is initiated with the {@link #EVENT_REQUEST_HANDOVER} call event.
+ * @hide
+ */
+ public static final String EVENT_HANDOVER_FAILED =
+ "android.telecom.event.HANDOVER_FAILED";
public static class Details {