Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -43243,6 +43243,7 @@ package android.telecom { method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.READ_SMS, android.Manifest.permission.READ_PHONE_NUMBERS}, conditional=true) public String getLine1Number(android.telecom.PhoneAccountHandle); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_OWN_CALLS) public java.util.List<android.telecom.PhoneAccountHandle> getOwnSelfManagedPhoneAccounts(); method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle); method @FlaggedApi("com.android.server.telecom.flags.get_registered_phone_accounts") @NonNull public java.util.List<android.telecom.PhoneAccount> getRegisteredPhoneAccounts(); method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.List<android.telecom.PhoneAccountHandle> getSelfManagedPhoneAccounts(); method public android.telecom.PhoneAccountHandle getSimCallManager(); method @Nullable public android.telecom.PhoneAccountHandle getSimCallManagerForSubscription(int); telecomm/java/android/telecom/TelecomManager.java +25 −0 Original line number Diff line number Diff line Loading @@ -1433,6 +1433,31 @@ public class TelecomManager { throw new IllegalStateException("Telecom is not available"); } /** * This API will return all {@link PhoneAccount}s registered via * {@link TelecomManager#registerPhoneAccount(PhoneAccount)}. If a {@link PhoneAccount} appears * to be missing from the list, Telecom has either unregistered the {@link PhoneAccount} * or the caller registered the {@link PhoneAccount} under a different user and does not * have the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} permission. * * @return all the {@link PhoneAccount}s registered by the caller. */ @SuppressLint("RequiresPermission") @FlaggedApi(Flags.FLAG_GET_REGISTERED_PHONE_ACCOUNTS) public @NonNull List<PhoneAccount> getRegisteredPhoneAccounts() { ITelecomService service = getTelecomService(); if (service != null) { try { return service.getRegisteredPhoneAccounts( mContext.getOpPackageName(), mContext.getAttributionTag()).getList(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } throw new IllegalStateException("Telecom is not available"); } /** * Returns a list of {@link PhoneAccountHandle}s including those which have not been enabled * by the user. Loading telecomm/java/com/android/internal/telecom/ITelecomService.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,12 @@ interface ITelecomService { */ PhoneAccount getPhoneAccount(in PhoneAccountHandle account, String callingPackage); /** * @see TelecomManager#getPhoneAccount */ ParceledListSlice<PhoneAccount> getRegisteredPhoneAccounts(String callingPackage, String callingFeatureId); /** * @see TelecomManager#getAllPhoneAccountsCount */ Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -43243,6 +43243,7 @@ package android.telecom { method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.READ_SMS, android.Manifest.permission.READ_PHONE_NUMBERS}, conditional=true) public String getLine1Number(android.telecom.PhoneAccountHandle); method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_OWN_CALLS) public java.util.List<android.telecom.PhoneAccountHandle> getOwnSelfManagedPhoneAccounts(); method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle); method @FlaggedApi("com.android.server.telecom.flags.get_registered_phone_accounts") @NonNull public java.util.List<android.telecom.PhoneAccount> getRegisteredPhoneAccounts(); method @NonNull @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public java.util.List<android.telecom.PhoneAccountHandle> getSelfManagedPhoneAccounts(); method public android.telecom.PhoneAccountHandle getSimCallManager(); method @Nullable public android.telecom.PhoneAccountHandle getSimCallManagerForSubscription(int);
telecomm/java/android/telecom/TelecomManager.java +25 −0 Original line number Diff line number Diff line Loading @@ -1433,6 +1433,31 @@ public class TelecomManager { throw new IllegalStateException("Telecom is not available"); } /** * This API will return all {@link PhoneAccount}s registered via * {@link TelecomManager#registerPhoneAccount(PhoneAccount)}. If a {@link PhoneAccount} appears * to be missing from the list, Telecom has either unregistered the {@link PhoneAccount} * or the caller registered the {@link PhoneAccount} under a different user and does not * have the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} permission. * * @return all the {@link PhoneAccount}s registered by the caller. */ @SuppressLint("RequiresPermission") @FlaggedApi(Flags.FLAG_GET_REGISTERED_PHONE_ACCOUNTS) public @NonNull List<PhoneAccount> getRegisteredPhoneAccounts() { ITelecomService service = getTelecomService(); if (service != null) { try { return service.getRegisteredPhoneAccounts( mContext.getOpPackageName(), mContext.getAttributionTag()).getList(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } throw new IllegalStateException("Telecom is not available"); } /** * Returns a list of {@link PhoneAccountHandle}s including those which have not been enabled * by the user. Loading
telecomm/java/com/android/internal/telecom/ITelecomService.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,12 @@ interface ITelecomService { */ PhoneAccount getPhoneAccount(in PhoneAccountHandle account, String callingPackage); /** * @see TelecomManager#getPhoneAccount */ ParceledListSlice<PhoneAccount> getRegisteredPhoneAccounts(String callingPackage, String callingFeatureId); /** * @see TelecomManager#getAllPhoneAccountsCount */ Loading