Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 525a07ec authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Fix NPE if CarrierConfigManager is not available

Fixes: 155147094
Fixes: 155819375
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.telephony
Change-Id: Iecf3e385a88d18c7578eb520449f4042324e21f5
Merged-In: Iecf3e385a88d18c7578eb520449f4042324e21f5
parent 32ca9b27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }