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

Commit 51bc2e34 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Automerger Merge Worker
Browse files

Merge "Add permission check and clear callers identity for...

Merge "Add permission check and clear callers identity for setUiccApplicationsEnabled." am: c3c13de4

Change-Id: Id200007e416c01ac42584c74fdd8829b5f0a1614
parents 5ae70cb4 c3c13de4
Loading
Loading
Loading
Loading
+19 −12
Original line number Diff line number Diff line
@@ -1939,6 +1939,10 @@ public class SubscriptionController extends ISub.Stub {
    public int setUiccApplicationsEnabled(boolean enabled, int subId) {
        if (DBG) logd("[setUiccApplicationsEnabled]+ enabled:" + enabled + " subId:" + subId);

        enforceModifyPhoneState("setUiccApplicationsEnabled");

        long identity = Binder.clearCallingIdentity();
        try {
            ContentValues value = new ContentValues(1);
            value.put(SubscriptionManager.UICC_APPLICATIONS_ENABLED, enabled);

@@ -1956,6 +1960,9 @@ public class SubscriptionController extends ISub.Stub {
            }

            return result;
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
    }

    /**