Merge "[Settings] Add NPE protection for the bundle"

This commit is contained in:
TreeHugger Robot
2022-07-14 10:25:21 +00:00
committed by Android (Google) Code Review

View File

@@ -213,7 +213,7 @@ public class MobileNetworkUtils {
return false; return false;
} }
PersistableBundle bundle = carrierConfigCache.getConfigForSubId(subId); PersistableBundle bundle = carrierConfigCache.getConfigForSubId(subId);
return bundle.getBoolean( return bundle == null ? false : bundle.getBoolean(
CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/) CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/)
|| bundle.getBoolean(CarrierConfigManager.Ims.KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, || bundle.getBoolean(CarrierConfigManager.Ims.KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL,
false /*default*/); false /*default*/);