[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.DialogInterface;
@@ -113,6 +115,15 @@ public class SelectSpecificDataSimDialogFragment extends SimDialogFragment imple
dismiss();
return;
}
if ((newSubInfo.isEmbedded() && newSubInfo.getProfileClass() == PROFILE_CLASS_PROVISIONING)
|| (currentDataSubInfo.isEmbedded()
&& currentDataSubInfo.getProfileClass() == PROFILE_CLASS_PROVISIONING)) {
Log.d(TAG, "do not set the provision eSIM");
dismiss();
return;
}
Log.d(TAG, "newSubId: " + newSubInfo.getSubscriptionId()
+ "currentDataSubID: " + currentDataSubInfo.getSubscriptionId());
setTargetSubscriptionInfo(newSubInfo);