Search in sources :

Example 11 with EuiccManager

use of android.telephony.euicc.EuiccManager in project android_frameworks_opt_telephony by LineageOS.

the class MultiSimSettingController method deactivateSubscription.

private void deactivateSubscription(SubscriptionInfo info) {
    // TODO: b/133379187 have a way to deactivate pSIM.
    if (info.isEmbedded()) {
        log("[deactivateSubscription] eSIM profile " + info.getSubscriptionId());
        EuiccManager euiccManager = (EuiccManager) mContext.getSystemService(Context.EUICC_SERVICE);
        euiccManager.switchToSubscription(SubscriptionManager.INVALID_SUBSCRIPTION_ID, PendingIntent.getService(mContext, 0, new Intent(), PendingIntent.FLAG_IMMUTABLE));
    }
}
Also used : EuiccManager(android.telephony.euicc.EuiccManager) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent)

Aggregations

EuiccManager (android.telephony.euicc.EuiccManager)11 ContentResolver (android.content.ContentResolver)4 SubscriptionInfo (android.telephony.SubscriptionInfo)3 DataEnabledOverride (com.android.internal.telephony.dataconnection.DataEnabledOverride)3 PendingIntent (android.app.PendingIntent)2 Intent (android.content.Intent)2 TelephonyManager (android.telephony.TelephonyManager)2 ContentValues (android.content.ContentValues)1 UiccSlotInfo (android.telephony.UiccSlotInfo)1 Test (org.junit.Test)1 Config (org.robolectric.annotation.Config)1