Merge "[Settings] subscription UI should be closed when SIM is removed" am: b3efa585f2 am: 5dba10a956 am: 5975853b18 am: 0f2bc3bad9

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1425488

Change-Id: I2828a05151f0d5dc0a1ba314b15d0ec89710772f
This commit is contained in:
Bonian Chen
2020-09-11 09:28:28 +00:00
committed by Automerger Merge Worker

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();