Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6dcd254 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Gerrit Code Review
Browse files

Merge "Remove UID packageName check in checkCarrierPrivilegeOnSubList."

parents fd773f8e 6148ebbd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2846,6 +2846,9 @@ public class SubscriptionController extends ISub.Stub {
        if (subIdList == null || subIdList.length == 0) {
            throw new IllegalArgumentException("Invalid subIdList " + subIdList);
        }

        // Makes sure calling package matches caller UID.
        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
        // If it doesn't have modify phone state permission, or carrier privilege permission,
        // a SecurityException will be thrown.
        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
@@ -3071,7 +3074,6 @@ public class SubscriptionController extends ISub.Stub {
     *  @return true if checking passes on all subId, false otherwise.
     */
    private boolean checkCarrierPrivilegeOnSubList(int[] subIdList, String callingPackage) {
        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
        // Check carrier privilege permission on active subscriptions first.
        // If it fails, they could be inactive. So keep them in a HashSet and later check
        // access rules in our database.