diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 8a3f138cae1db..38bc64036de02 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -17,6 +17,7 @@ package android.telephony; import android.annotation.RequiresPermission; +import android.annotation.SuppressAutoDoc; import android.annotation.SystemApi; import android.app.ActivityThread; import android.app.PendingIntent; @@ -343,15 +344,16 @@ public final class SmsManager { * applications. Intended for internal carrier use only. *
* - *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 a4f77683202ec..7dff667ca6fa4 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1787,11 +1787,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() {