commit | 8e7aa20ff8f681f0f1d11904de78170841bb3bf1 | [log] [tgz] |
---|---|---|
author | Alireza Forouzan <alirezaf@google.com> | Mon Mar 22 19:24:06 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Mar 22 19:24:06 2021 +0000 |
tree | 850fd3b046e38ee72065eeae71d9f340c57e7cd0 | |
parent | 1ccdd2917dc7d525602685386380d77050a9f7ca [diff] | |
parent | 36cec8e097e27b392a7244a94154e0755713fa69 [diff] |
Merge "Check CarrierPriviledge for getPhoneAccountHandleForSubscriptionId" into sc-dev am: 36cec8e097 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telephony/+/13896538 Change-Id: I50e9750cbcaf226409b5a054adb9ab6f8767b5df
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java index 53f2030..672f7c8 100755 --- a/src/com/android/phone/PhoneInterfaceManager.java +++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -7354,8 +7354,11 @@ @Override public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) { - enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, " - + "subscriptionId: " + subscriptionId); + TelephonyPermissions + .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege( + mApp, + subscriptionId, + "getPhoneAccountHandleForSubscriptionId, " + "subscriptionId: " + subscriptionId); final long identity = Binder.clearCallingIdentity(); try { Phone phone = getPhone(subscriptionId);