Expose new Telecom APIs for use by Telephony
Expose TelecomManager#getCallCapablePhoneAccounts(boolean) and
ConnectionRequest#getTelecomCallId
Bug: 141576153
Test: CTS
Change-Id: Ie0214fc93682229a3e5781f62743f00f68472702
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index cda3387..20862c5 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -18,6 +18,7 @@
import android.Manifest;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SuppressAutoDoc;
@@ -1028,12 +1029,16 @@
* by the user.
*
* @param includeDisabledAccounts When {@code true}, disabled phone accounts will be included,
- * when {@code false}, only
+ * when {@code false}, only enabled phone accounts will be
+ * included.
* @return A list of {@code PhoneAccountHandle} objects.
* @hide
*/
- @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 119305590)
- public List<PhoneAccountHandle> getCallCapablePhoneAccounts(boolean includeDisabledAccounts) {
+ @SystemApi
+ @TestApi
+ @RequiresPermission(READ_PRIVILEGED_PHONE_STATE)
+ public @NonNull List<PhoneAccountHandle> getCallCapablePhoneAccounts(
+ boolean includeDisabledAccounts) {
try {
if (isServiceConnected()) {
return getTelecomService().getCallCapablePhoneAccounts(