From a4a4c8aea7f7a16717eb758d17e3899911813008 Mon Sep 17 00:00:00 2001
From: Jeff Davidson
Requires Permission: - * {@link android.Manifest.permission#SEND_SMS} and - * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or the calling app has carrier - * privileges. - *
+ *Requires Permission: Both {@link android.Manifest.permission#SEND_SMS} and + * {@link android.Manifest.permission#MODIFY_PHONE_STATE}, or that the calling app has carrier + * privileges (see {@link TelephonyManager#hasCarrierPrivileges}), or that the calling app is + * the default IMS app (see + * {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}). * * @see #sendTextMessage(String, String, String, PendingIntent, PendingIntent) */ @SystemApi + @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges @RequiresPermission(allOf = { android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.SEND_SMS diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4a0027b7fd776..4296645c54b86 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1776,11 +1776,17 @@ public class TelephonyManager { * invalid subscription ID is pinned to the TelephonyManager, the returned config will contain * default values. * + *
This method may take several seconds to complete, so it should only be called from a + * worker thread. + * + *
Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} + * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}). + * * @see CarrierConfigManager#getConfigForSubId(int) * @see #createForSubscriptionId(int) * @see #createForPhoneAccountHandle(PhoneAccountHandle) */ - // TODO(b/73136824, b/70041899): Permit carrier-privileged callers as well. + @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges @WorkerThread @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public PersistableBundle getCarrierConfig() {