Merge "[Settings] Add NPE protection for the bundle"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2fa2dc49c7
@@ -239,8 +239,8 @@ public class EnabledNetworkModePreferenceController extends
|
||||
void setPreferenceEntries() {
|
||||
mTelephonyManager = mTelephonyManager.createForSubscriptionId(mSubId);
|
||||
final PersistableBundle carrierConfig = mCarrierConfigCache.getConfigForSubId(mSubId);
|
||||
final boolean display2gOptions = carrierConfig
|
||||
.getBoolean(CarrierConfigManager.KEY_PREFER_2G_BOOL);
|
||||
final boolean display2gOptions = carrierConfig != null
|
||||
&& carrierConfig.getBoolean(CarrierConfigManager.KEY_PREFER_2G_BOOL);
|
||||
clearAllEntries();
|
||||
UiOptions.Builder uiOptions = UiOptions.newBuilder();
|
||||
uiOptions.setType(getEnabledNetworkType());
|
||||
|
Reference in New Issue
Block a user