Merge "[Settings] configuration for hidding SIM remove UI"

This commit is contained in:
Bonian Chen
2022-11-22 08:51:53 +00:00
committed by Gerrit Code Review
5 changed files with 23 additions and 3 deletions

View File

@@ -235,6 +235,9 @@ public class ResetNetwork extends InstrumentedFragment {
}
private List<SubscriptionInfo> getActiveSubscriptionInfoList() {
if (!SubscriptionUtil.isSimHardwareVisible(getActivity())) {
return Collections.emptyList();
}
SubscriptionManager mgr = getActivity().getSystemService(SubscriptionManager.class);
if (mgr == null) {
Log.w(TAG, "No SubscriptionManager");
@@ -264,6 +267,9 @@ public class ResetNetwork extends InstrumentedFragment {
}
private boolean showEuiccSettings(Context context) {
if (!SubscriptionUtil.isSimHardwareVisible(context)) {
return false;
}
EuiccManager euiccManager =
(EuiccManager) context.getSystemService(Context.EUICC_SERVICE);
if (!euiccManager.isEnabled()) {