[Settings] Fix crash when no SIM
Airplane mode enabler exception under the condition of no active subscription. This is due to incorrect null pointer checking within source code. Bug: 145830780 Test: manual Change-Id: I47cb4d82b7b99b4c34270023cd58f479347477da
This commit is contained in:
@@ -97,7 +97,7 @@ public class AirplaneModeEnabler extends GlobalSettingsChangeListener {
|
||||
mServiceStateListeners.add(new ServiceStateListener(mTelephonyManager,
|
||||
SubscriptionManager.INVALID_SUBSCRIPTION_ID, this));
|
||||
|
||||
if (subInfoList == null) {
|
||||
if (subInfoList != null) {
|
||||
for (SubscriptionInfo subInfo : subInfoList) {
|
||||
mServiceStateListeners.add(new ServiceStateListener(mTelephonyManager,
|
||||
subInfo.getSubscriptionId(), this));
|
||||
|
Reference in New Issue
Block a user