[Settings] NPE when finish MobileNetworkSettings
Add NPE protection when finish Bug: 271524675 Test: local test Change-Id: I74bb54f2e591534b411589c150ce0bd993c2e6dd
This commit is contained in:
@@ -489,7 +489,7 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings impleme
|
|||||||
|
|
||||||
Iterator<Integer> iterator = mSubscriptionInfoMap.keySet().iterator();
|
Iterator<Integer> iterator = mSubscriptionInfoMap.keySet().iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
if (iterator.next() == mSubId) {
|
if (iterator.next() == mSubId && getActivity() != null) {
|
||||||
finishFragment();
|
finishFragment();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user