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

Commit 1d4f841c authored by Muralidhar Reddy Mule's avatar Muralidhar Reddy Mule Committed by Android (Google) Code Review
Browse files

Merge "[MEP] EuiccManager API modifications to support carrier apps"

parents 0f939acb 19ef64e4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -994,6 +994,15 @@ public class EuiccController extends IEuiccController.Stub {
                forceDeactivateSim = true;
            }

            // if the caller is not privileged caller and does not have the carrier privilege over
            // any active subscription, do not continue.
            if (!callerCanWriteEmbeddedSubscriptions && usePortIndex
                    && (mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
                    != TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS)) {
                Log.e(TAG, "Not permitted to use switchToSubscription with portIndex");
                throw new SecurityException(
                        "Must have carrier privileges to use switchToSubscription with portIndex");
            }
            final String iccid;
            boolean passConsent = false;
            if (subscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {