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

Commit b0fa8e32 authored by Thomas Nguyen's avatar Thomas Nguyen Committed by Automerger Merge Worker
Browse files

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

parents c688ba21 a04bc342
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