diff options
author | 2018-02-28 20:00:43 -0800 | |
---|---|---|
committer | 2018-03-14 19:32:23 -0700 | |
commit | 5b65aea4f21b9e3322f8fd46a2f809a9aa11074c (patch) | |
tree | 37e89f3edd4d2823e0d7bdd8b411ad8c288f24a9 | |
parent | dbeb6bc3f14d51cfee7b16214c348e2824a9d5ef (diff) |
Check AppOps bit for TelephonyManager#getForbiddenPlmns
Bug: 73884967
Test: Telephony Sanity and Compile
Merged-In: I0cf7920e138892fbcab71fae0eed1293f0b2e404
(cherry picked from commit 52102d28685b8b75a7f290ad42b31fc4029ee5cd)
Change-Id: I9e3456e5f1e479b0e2b102f6c90db57cd0e977fe
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 2 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7add893e3ff4..4a0027b7fd77 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -5183,7 +5183,7 @@ public class TelephonyManager { ITelephony telephony = getITelephony(); if (telephony == null) return null; - return telephony.getForbiddenPlmns(subId, appType); + return telephony.getForbiddenPlmns(subId, appType, mContext.getOpPackageName()); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index afbb94776641..7c7700bb9a7d 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -1444,13 +1444,12 @@ interface ITelephony { * Returns a list of Forbidden PLMNs from the specified SIM App * Returns null if the query fails. * - * - * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE + * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE * * @param subId subscription ID used for authentication * @param appType the icc application type, like {@link #APPTYPE_USIM} */ - String[] getForbiddenPlmns(int subId, int appType); + String[] getForbiddenPlmns(int subId, int appType, String callingPackage); /** * Check if phone is in emergency callback mode |