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

Commit 020d831c authored by Chen Xu's avatar Chen Xu
Browse files

fix the issue that clearCallingIdentity before appops check

we should restore CallingIndentity when do the appops check for
access device/subscriber identifier

Bug: 187147737
Test: Manual test
Change-Id: Id0abfee602823f56811799a6d5c2bbe8cd5e2cc1
parent ebd55b0f
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -917,9 +917,12 @@ public class SubscriptionController extends ISub.Stub {

        // Now that all security checks passes, perform the operation as ourselves.
        final long identity = Binder.clearCallingIdentity();
        List<SubscriptionInfo> subList;
        try {
            List<SubscriptionInfo> subList = null;
            subList = getSubInfo(null, null);
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
        if (subList != null) {
            if (VDBG) logd("[getAllSubInfoList]- " + subList.size() + " infos return");
            subList.stream().map(
@@ -930,9 +933,6 @@ public class SubscriptionController extends ISub.Stub {
            if (VDBG) logd("[getAllSubInfoList]- no info return");
        }
        return subList;
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
    }

    private List<SubscriptionInfo> makeCacheListCopyWithLock(List<SubscriptionInfo> cacheSubList) {