Expose adhoc conference calling API as public.
Bug: 159944852
Test: make
Change-Id: I2cf39a6fd8a02ca4f2d0c83c484ab12bb13f74c3
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index ead90bb..8b89412 100755
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -461,8 +461,8 @@
/**
* Call supports adding participants to the call via
- * {@link #addConferenceParticipants(List)}.
- * @hide
+ * {@link #addConferenceParticipants(List)}. Once participants are added, the call becomes
+ * an adhoc conference call ({@link #PROPERTY_IS_ADHOC_CONFERENCE}).
*/
public static final int CAPABILITY_ADD_PARTICIPANT = 0x02000000;
@@ -598,8 +598,11 @@
/**
* Indicates that the call is an adhoc conference call. This property can be set for both
- * incoming and outgoing calls.
- * @hide
+ * incoming and outgoing calls. An adhoc conference call is formed using
+ * {@link #addConferenceParticipants(List)},
+ * {@link TelecomManager#addNewIncomingConference(PhoneAccountHandle, Bundle)}, or
+ * {@link TelecomManager#startConference(List, Bundle)}, rather than by merging existing
+ * call using {@link #conference(Call)}.
*/
public static final int PROPERTY_IS_ADHOC_CONFERENCE = 0x00002000;
@@ -1766,7 +1769,6 @@
* See {@link Details#CAPABILITY_ADD_PARTICIPANT}.
*
* @param participants participants to be pulled to existing call.
- * @hide
*/
public void addConferenceParticipants(@NonNull List<Uri> participants) {
mInCallAdapter.addConferenceParticipants(mTelecomCallId, participants);
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index d960552..39c3ff9 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -181,8 +181,8 @@
/**
* Returns whether this conference is requesting that the system play a ringback tone
- * on its behalf.
- * @hide
+ * on its behalf. A ringback tone may be played when an outgoing conference is in the process of
+ * connecting to give the user an audible indication of that process.
*/
public final boolean isRingbackRequested() {
return mRingbackRequested;
@@ -329,7 +329,6 @@
/**
* Notifies the {@link Conference} of a request to add a new participants to the conference call
* @param participants that will be added to this conference call
- * @hide
*/
public void onAddConferenceParticipants(@NonNull List<Uri> participants) {}
@@ -340,7 +339,6 @@
* the default dialer's {@link InCallService}.
*
* @param videoState The video state in which to answer the connection.
- * @hide
*/
public void onAnswer(int videoState) {}
@@ -360,7 +358,6 @@
* 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}.
- * @hide
*/
public void onReject() {}
@@ -380,7 +377,6 @@
/**
* Sets state to be ringing.
- * @hide
*/
public final void setRinging() {
setState(Connection.STATE_RINGING);
@@ -506,7 +502,6 @@
* that do not play a ringback tone themselves in the conference's audio stream.
*
* @param ringback Whether the ringback tone is to be played.
- * @hide
*/
public final void setRingbackRequested(boolean ringback) {
if (mRingbackRequested != ringback) {
@@ -773,7 +768,6 @@
*
* @param disconnectCause The disconnect cause, ({@see android.telecomm.DisconnectCause}).
* @return A {@code Conference} which indicates failure.
- * @hide
*/
public @NonNull static Conference createFailedConference(
@NonNull DisconnectCause disconnectCause, @NonNull PhoneAccountHandle phoneAccount) {
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 9dfa3ac..b354521 100755
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -383,8 +383,10 @@
/**
* When set, indicates that this {@link Connection} supports initiation of a conference call
- * by directly adding participants using {@link #onAddConferenceParticipants(List)}.
- * @hide
+ * by directly adding participants using {@link #onAddConferenceParticipants(List)}. When
+ * participants are added to a {@link Connection}, it will be replaced by a {@link Conference}
+ * instance with {@link #PROPERTY_IS_ADHOC_CONFERENCE} set to indicate that it is an adhoc
+ * conference call.
*/
public static final int CAPABILITY_ADD_PARTICIPANT = 0x04000000;
@@ -526,10 +528,9 @@
public static final int PROPERTY_REMOTELY_HOSTED = 1 << 11;
/**
- * Set by the framework to indicate that it is an adhoc conference call.
+ * Set by the framework to indicate that a call is an adhoc conference call.
* <p>
- * This is used for Outgoing and incoming conference calls.
- * @hide
+ * This is used for outgoing and incoming conference calls.
*/
public static final int PROPERTY_IS_ADHOC_CONFERENCE = 1 << 12;
@@ -3009,7 +3010,6 @@
* Supports initiation of a conference call by directly adding participants to an ongoing call.
*
* @param participants with which conference call will be formed.
- * @hide
*/
public void onAddConferenceParticipants(@NonNull List<Uri> participants) {}
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 1b60e48..95c238e 100755
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -2638,15 +2638,15 @@
return null;
}
/**
- * Create a {@code Connection} given an incoming request. This is used to attach to existing
- * incoming conference call.
+ * Create a {@code Conference} given an incoming request. This is used to attach to an incoming
+ * conference call initiated via
+ * {@link TelecomManager#addNewIncomingConference(PhoneAccountHandle, Bundle)}.
*
* @param connectionManagerPhoneAccount See description at
* {@link #onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)}.
- * @param request Details about the incoming call.
- * @return The {@code Connection} object to satisfy this call, or {@code null} to
+ * @param request Details about the incoming conference call.
+ * @return The {@code Conference} object to satisfy this call, or {@code null} to
* not handle the call.
- * @hide
*/
public @Nullable Conference onCreateIncomingConference(
@Nullable PhoneAccountHandle connectionManagerPhoneAccount,
@@ -2731,7 +2731,6 @@
* @param connectionManagerPhoneAccount See description at
* {@link #onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)}.
* @param request The incoming connection request.
- * @hide
*/
public void onCreateIncomingConferenceFailed(
@Nullable PhoneAccountHandle connectionManagerPhoneAccount,
@@ -2752,7 +2751,6 @@
* @param connectionManagerPhoneAccount See description at
* {@link #onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest)}.
* @param request The outgoing connection request.
- * @hide
*/
public void onCreateOutgoingConferenceFailed(
@Nullable PhoneAccountHandle connectionManagerPhoneAccount,
@@ -2801,7 +2799,8 @@
/**
* Create a {@code Conference} given an outgoing request. This is used to initiate new
- * outgoing conference call.
+ * outgoing conference call requested via
+ * {@link TelecomManager#startConference(List, Bundle)}.
*
* @param connectionManagerPhoneAccount The connection manager account to use for managing
* this call.
@@ -2821,7 +2820,6 @@
* @param request Details about the outgoing call.
* @return The {@code Conference} object to satisfy this call, or the result of an invocation
* of {@link Connection#createFailedConnection(DisconnectCause)} to not handle the call.
- * @hide
*/
public @Nullable Conference onCreateOutgoingConference(
@Nullable PhoneAccountHandle connectionManagerPhoneAccount,
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index b3bf507..15b26dc 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -1850,11 +1850,13 @@
/**
* Registers a new incoming conference. A {@link ConnectionService} should invoke this method
- * when it has an incoming conference. For managed {@link ConnectionService}s, the specified
- * {@link PhoneAccountHandle} must have been registered with {@link #registerPhoneAccount} and
- * the user must have enabled the corresponding {@link PhoneAccount}. This can be checked using
- * {@link #getPhoneAccount}. Self-managed {@link ConnectionService}s must have
- * {@link android.Manifest.permission#MANAGE_OWN_CALLS} to add a new incoming call.
+ * when it has an incoming conference. An incoming {@link Conference} is an adhoc conference
+ * call initiated on another device which the user is being invited to join in. For managed
+ * {@link ConnectionService}s, the specified {@link PhoneAccountHandle} must have been
+ * registered with {@link #registerPhoneAccount} and the user must have enabled the
+ * corresponding {@link PhoneAccount}. This can be checked using
+ * {@link #getPhoneAccount(PhoneAccountHandle)}. Self-managed {@link ConnectionService}s must
+ * have {@link android.Manifest.permission#MANAGE_OWN_CALLS} to add a new incoming call.
* <p>
* The incoming conference you are adding is assumed to have a video state of
* {@link VideoProfile#STATE_AUDIO_ONLY}, unless the extra value
@@ -1862,8 +1864,9 @@
* <p>
* Once invoked, this method will cause the system to bind to the {@link ConnectionService}
* associated with the {@link PhoneAccountHandle} and request additional information about the
- * call (See {@link ConnectionService#onCreateIncomingConference}) before starting the incoming
- * call UI.
+ * call (See
+ * {@link ConnectionService#onCreateIncomingConference(PhoneAccountHandle, ConnectionRequest)})
+ * before starting the incoming call UI.
* <p>
* For a managed {@link ConnectionService}, a {@link SecurityException} will be thrown if either
* the {@link PhoneAccountHandle} does not correspond to a registered {@link PhoneAccount} or
@@ -1873,7 +1876,6 @@
* {@link #registerPhoneAccount}.
* @param extras A bundle that will be passed through to
* {@link ConnectionService#onCreateIncomingConference}.
- * @hide
*/
public void addNewIncomingConference(@NonNull PhoneAccountHandle phoneAccount,
@NonNull Bundle extras) {
@@ -2093,8 +2095,8 @@
/**
- * Place a new conference call with the provided participants using the system telecom service
- * This method doesn't support placing of emergency calls.
+ * Place a new adhoc conference call with the provided participants using the system telecom
+ * service. This method doesn't support placing of emergency calls.
*
* An adhoc conference call is established by providing a list of addresses to
* {@code TelecomManager#startConference(List<Uri>, int videoState)} where the
@@ -2112,7 +2114,6 @@
*
* @param participants List of participants to start conference with
* @param extras Bundle of extras to use with the call
- * @hide
*/
@RequiresPermission(android.Manifest.permission.CALL_PHONE)
public void startConference(@NonNull List<Uri> participants,