[Settings] Provision status checking of eSIM in dialog fragment

Bug: 262679983
Bug: 257120311
Test: manual
Change-Id: Idc78741e445b5d6448e2288f2a1bc6c79e34bf4b
This commit is contained in:
Zoey Chen
2022-12-16 14:46:16 +00:00
parent d9f2de7abb
commit eeaf2a0125
4 changed files with 30 additions and 1 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.sim;
import static android.telephony.SubscriptionManager.PROFILE_CLASS_PROVISIONING;
import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.content.Context;
@@ -137,6 +139,11 @@ public class SimListDialogFragment extends SimDialogFragment {
dismiss();
return;
}
// Remove the provision eSIM from the subscription list.
currentSubscriptions.removeIf(info -> info.isEmbedded()
&& info.getProfileClass() == PROFILE_CLASS_PROVISIONING);
boolean includeAskEveryTime = getArguments().getBoolean(KEY_INCLUDE_ASK_EVERY_TIME);
boolean isCancelItemShowed = getArguments().getBoolean(KEY_SHOW_CANCEL_ITEM);
if (includeAskEveryTime || isCancelItemShowed) {