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

Commit d1a611c3 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Change the permission for getActiveSubscriptionInfoForIccId for system...

Merge "Change the permission for getActiveSubscriptionInfoForIccId for system API" am: 1016da71 am: 174e38ec

Change-Id: I31dbb86b1daed6b10bdc1d526b997ef9e1c65a48
parents 592386e6 174e38ec
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -546,18 +546,8 @@ public class SubscriptionController extends ISub.Stub {
     */
    @Override
    public SubscriptionInfo getActiveSubscriptionInfoForIccId(String iccId, String callingPackage) {
        // Query the subscriptions unconditionally, and then check whether the caller has access to
        // the given subscription.
        final SubscriptionInfo si = getActiveSubscriptionInfoForIccIdInternal(iccId);

        final int subId = si != null
                ? si.getSubscriptionId() : SubscriptionManager.INVALID_SUBSCRIPTION_ID;
        if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
                mContext, subId, callingPackage, "getActiveSubscriptionInfoForIccId")) {
            return null;
        }

        return si;
        enforceReadPrivilegedPhoneState("getActiveSubscriptionInfoForIccId");
        return getActiveSubscriptionInfoForIccIdInternal(iccId);
    }

    /**