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

Commit 19ef64e4 authored by Muralidhar Reddy's avatar Muralidhar Reddy
Browse files

[MEP] EuiccManager API modifications to support carrier apps

Remove deprecated tag from switchToSubscription API. Partially reverts the changes to switchToSubscription API with ag/16232869

Bug: 214055002
Test: build, atest FrameworksTelephonyTests
Change-Id: I5cf09d500df34e9a1fffc194e2ecac1dd319f20b
parent 6c069b62
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) {