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);