diff options
| author | 2021-03-20 00:02:52 +0000 | |
|---|---|---|
| committer | 2021-03-20 00:02:52 +0000 | |
| commit | 9f15b8d17aa4d8d79fdbc80fee92116778dcbcd4 (patch) | |
| tree | fe8f761361d49a0bd7019571f9176d967ff3301b | |
| parent | de3fb7e9b342501948414049bcf30e5a681aacfa (diff) | |
| parent | d6653310332cd59a4c175d28900c06fc3d35de5d (diff) | |
Merge "Updates to API based on API council feedback." into sc-dev
| -rw-r--r-- | core/api/current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/SmsManager.java | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 9dd3a4be049a..5fcafc7104bc 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -41806,7 +41806,7 @@ package android.telephony { method @NonNull public android.os.Bundle getCarrierConfigValues(); method @Deprecated public static android.telephony.SmsManager getDefault(); method public static int getDefaultSmsSubscriptionId(); - method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getSmsCapacityOnIcc(); + method @IntRange(from=0) @RequiresPermission(anyOf={android.Manifest.permission.READ_PHONE_STATE, "android.permission.READ_PRIVILEGED_PHONE_STATE"}) public int getSmsCapacityOnIcc(); method @Deprecated public static android.telephony.SmsManager getSmsManagerForSubscriptionId(int); method @RequiresPermission(android.Manifest.permission.SMS_FINANCIAL_TRANSACTIONS) public void getSmsMessagesForFinancialApp(android.os.Bundle, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.SmsManager.FinancialSmsCallback); method @Nullable @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSmscAddress(); diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 4926687f6724..17af4638c874 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -19,6 +19,7 @@ package android.telephony; import android.Manifest; import android.annotation.CallbackExecutor; import android.annotation.IntDef; +import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; @@ -2207,7 +2208,9 @@ public final class SmsManager { * * @return the total number of SMS records which can be stored on the SIM card. */ - @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) + @RequiresPermission(anyOf = {android.Manifest.permission.READ_PHONE_STATE, + android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE}) + @IntRange(from = 0) public int getSmsCapacityOnIcc() { int ret = 0; try { |