Merge "[Settings] Should back to previous page when removing the SIM (subinfo is null)"

This commit is contained in:
Zoey Chen
2021-12-24 03:18:49 +00:00
committed by Android (Google) Code Review

View File

@@ -280,6 +280,11 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
return; return;
} }
if (SubscriptionUtil.getSubscriptionOrDefault(getContext(), mSubId) == null) {
finishFragment();
return;
}
ThreadUtils.postOnMainThread(() -> { ThreadUtils.postOnMainThread(() -> {
mActiveSubscriptionsListenerCount = 0; mActiveSubscriptionsListenerCount = 0;
redrawPreferenceControllers(); redrawPreferenceControllers();