From 7c3ddcf0a127e0b1a2de7beffde808093f3808cf Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Thu, 8 Feb 2018 11:28:33 -0800 Subject: [PATCH] Updates to Telecom API docs for clarity. - Update Connection onAnswer/onReject docs to make it more clear for a self-managed connectionservice that these methods could be called by the framework or by a car mode in call service. - Update the Connection onShowIncomingCallUI method to take into account the new concurrent calling capabilities in P. Test: Docs only change Bug: 73112552 Change-Id: Icb47aa15d03d4bfc05380948e30686317124301e --- telecomm/java/android/telecom/Connection.java | 50 +++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 8150efa725712..22e5d4e4246b0 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -2731,7 +2731,20 @@ public abstract class Connection extends Conferenceable { /** * Notifies this Connection, which is in {@link #STATE_RINGING}, of * a request to accept. - * + *

+ * For managed {@link ConnectionService}s, this will be called when the user answers a call via + * the default dialer's {@link InCallService}. + *

+ * Although a self-managed {@link ConnectionService} provides its own incoming call UI, the + * Telecom framework may request that the call is answered in the following circumstances: + *

* @param videoState The video state in which to answer the connection. */ public void onAnswer(int videoState) {} @@ -2739,6 +2752,20 @@ public abstract class Connection extends Conferenceable { /** * Notifies this Connection, which is in {@link #STATE_RINGING}, of * a request to accept. + *

+ * For managed {@link ConnectionService}s, this will be called when the user answers a call via + * the default dialer's {@link InCallService}. + *

+ * Although a self-managed {@link ConnectionService} provides its own incoming call UI, the + * Telecom framework may request that the call is answered in the following circumstances: + *

*/ public void onAnswer() { onAnswer(VideoProfile.STATE_AUDIO_ONLY); @@ -2747,6 +2774,20 @@ public abstract class Connection extends Conferenceable { /** * Notifies this Connection, which is in {@link #STATE_RINGING}, of * a request to reject. + *

+ * For managed {@link ConnectionService}s, this will be called when the user rejects a call via + * the default dialer's {@link InCallService}. + *

+ * Although a self-managed {@link ConnectionService} provides its own incoming call UI, the + * Telecom framework may request that the call is rejected in the following circumstances: + *

*/ public void onReject() {} @@ -2829,9 +2870,10 @@ public abstract class Connection extends Conferenceable { * should show its own incoming call user interface. *

* Where there are ongoing calls in other self-managed {@link ConnectionService}s, or in a - * regular {@link ConnectionService}, the Telecom framework will display its own incoming call - * user interface to allow the user to choose whether to answer the new incoming call and - * disconnect other ongoing calls, or to reject the new incoming call. + * regular {@link ConnectionService}, and it is not possible to hold these other calls, the + * Telecom framework will display its own incoming call user interface to allow the user to + * choose whether to answer the new incoming call and disconnect other ongoing calls, or to + * reject the new incoming call. *

* You should trigger the display of the incoming call user interface for your application by * showing a {@link Notification} with a full-screen {@link Intent} specified.