More telephony updates for mainline.
Add new TelecomManager#getDefaultDialerPackage which is multiuse aware;
this is used when showing the voicemail notification.
Remove some @hide methods from Conference; push these inline.
Move ConferenceParticipantConnection into frameworks/opt/net/ims since
it is just an IMS implementation detail.
Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: I39b6955cb14cc1ca68b05c620c3d09a2cdfe30c9
Merged-In: I39b6955cb14cc1ca68b05c620c3d09a2cdfe30c9
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 0abd9fc..812b805 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -16,7 +16,11 @@
package android.telecom;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
+import android.annotation.SystemApi;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
@@ -2106,15 +2110,21 @@
/**
* Adds a connection created by the {@link ConnectionService} and informs telecom of the new
- * connection.
+ * connection, as well as adding that connection to the specified conference.
+ * <p>
+ * Note: This API is intended ONLY for use by the Telephony stack to provide an easy way to add
+ * IMS conference participants to be added to a conference in a single step; this helps ensure
+ * UI updates happen atomically, rather than adding the connection and then adding it to
+ * the conference in another step.
*
* @param phoneAccountHandle The phone account handle for the connection.
* @param connection The connection to add.
* @param conference The parent conference of the new connection.
* @hide
*/
- public final void addExistingConnection(PhoneAccountHandle phoneAccountHandle,
- Connection connection, Conference conference) {
+ @SystemApi
+ public final void addExistingConnection(@NonNull PhoneAccountHandle phoneAccountHandle,
+ @NonNull Connection connection, @NonNull Conference conference) {
String id = addExistingConnectionInternal(phoneAccountHandle, connection);
if (id != null) {