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

Commit bc835e66 authored by sqian's avatar sqian
Browse files

Change the permission for getActiveSubscriptionInfoForIccId for system API

Test: cts
Bug: 122015219
Change-Id: I451ed3bd331fa42141c24c2950637b183c7f995c
Merged-In: I451ed3bd331fa42141c24c2950637b183c7f995c
(cherry picked from commit a97c13bf)
parent 18c8c16f
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);
    }

    /**