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

Commit ac2a2dd5 authored by Shuo Qian's avatar Shuo Qian Committed by Android (Google) Code Review
Browse files

Merge "Change the permission for getActiveSubscriptionInfoForIccId for system API"

parents 4fe115b6 a97c13bf
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -557,19 +557,8 @@ public class SubscriptionController extends ISub.Stub {
    @Override
    public SubscriptionInfo getActiveSubscriptionInfoForIccId(String iccId, String callingPackage,
            String callingFeatureId) {
        // 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, callingFeatureId,
                "getActiveSubscriptionInfoForIccId")) {
            return null;
        }

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

    /**