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

Commit a04bc342 authored by Thomas Nguyen's avatar Thomas Nguyen Committed by Android (Google) Code Review
Browse files

Merge "Clear calling identity before querying SIM INFO table" into tm-qpr-dev

parents 02339838 d7da8c85
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -3525,9 +3525,7 @@ public class SubscriptionController extends ISub.Stub {
        try {
            int ret = setSubscriptionProperty(subId, SubscriptionManager.IS_OPPORTUNISTIC,
                    String.valueOf(opportunistic ? 1 : 0));

            if (ret != 0) notifySubscriptionInfoChanged();

            return ret;
        } finally {
            Binder.restoreCallingIdentity(token);
@@ -3544,8 +3542,15 @@ public class SubscriptionController extends ISub.Stub {

        SubscriptionManager subManager = (SubscriptionManager)
                mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
        List<SubscriptionInfo> subInfo = getSubInfo(

        List<SubscriptionInfo> subInfo;
        long token = Binder.clearCallingIdentity();
        try {
            subInfo = getSubInfo(
                    SubscriptionManager.UNIQUE_KEY_SUBSCRIPTION_ID + "=" + subId, null);
        } finally {
            Binder.restoreCallingIdentity(token);
        }

        try {
            if (!isActiveSubId(subId) && subInfo != null && subInfo.size() == 1