Merge "[Settings] subscription UI should be closed when SIM is removed"

This commit is contained in:
Bonian Chen
2020-09-11 06:46:36 +00:00
committed by Gerrit Code Review

View File

@@ -158,6 +158,11 @@ public class MobileNetworkActivity extends SettingsBaseActivity
// Remove the dialog if the subscription associated with this activity changes.
if (info == null) {
// Close the activity when subscription removed
if ((oldSubIndex != SUB_ID_NULL)
&& (!isFinishing()) && (!isDestroyed())) {
finish();
}
return;
}
int subIndex = info.getSubscriptionId();