[Settings] NPE when finish MobileNetworkSettings

Add NPE protection when finish

Bug: 271524675
Test: local test
Change-Id: I74bb54f2e591534b411589c150ce0bd993c2e6dd
This commit is contained in:
Zoey Chen
2023-03-24 13:05:37 +00:00
parent d1d2374b89
commit 6929616581

View File

@@ -489,7 +489,7 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings impleme
Iterator<Integer> iterator = mSubscriptionInfoMap.keySet().iterator();
while (iterator.hasNext()) {
if (iterator.next() == mSubId) {
if (iterator.next() == mSubId && getActivity() != null) {
finishFragment();
return;
}