Close and disable SIM lock dialogs when SIM removed from device.

Bug: 157102550
Test: Manually open the PIN toggle dialog and PIN edit dialog, then
remove SIM from DUT

Change-Id: Ied875909e9cbcb1cad1ae045578747a0a5810491
This commit is contained in:
Grace Jia
2020-05-20 14:32:04 -07:00
parent cb8be1de6f
commit f203a66a74

View File

@@ -301,6 +301,9 @@ public class IccLockSettings extends SettingsPreferenceFragment
if (mPinDialog != null) {
mPinDialog.setEnabled(sir != null);
if (mSubId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
mPinDialog.getDialog().dismiss();
}
}
if (mPinToggle != null) {
mPinToggle.setEnabled(sir != null);