Merge "Fix NPE if CarrierConfigManager is not available" am: d01838d8ce

Change-Id: I5ff6cfcf79cfeec14571ae4f34ea74fd658025d3
This commit is contained in:
Treehugger Robot
2020-05-27 01:52:00 +00:00
committed by Automerger Merge Worker

View File

@@ -98,7 +98,7 @@ public class ContactDiscoveryPreferenceController extends TelephonyTogglePrefere
@Override
public int getAvailabilityStatus(int subId) {
PersistableBundle bundle = mCarrierConfigManager.getConfigForSubId(subId);
boolean shouldShowPresence = bundle.getBoolean(
boolean shouldShowPresence = bundle != null && bundle.getBoolean(
CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL, false /*default*/);
return shouldShowPresence ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
}