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

Commit 5cf46dc2 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Do not allow NPE if CarrierConfigManager service is null.

Change-Id: Ie4980526e670d3964ac37174a48a8d25dbb650d0
Test: atest CtsTelecomTestCases
Bug: 300090796
parent baccd54a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -436,8 +436,8 @@ public final class CallLogManager extends CallsManagerListenerBase {
        boolean okToLogEmergencyNumber = false;
        CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService(
                Context.CARRIER_CONFIG_SERVICE);
        PersistableBundle configBundle = configManager.getConfigForSubId(
                mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle));
        PersistableBundle configBundle = (configManager != null) ? configManager.getConfigForSubId(
                mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle)) : null;
        if (configBundle != null) {
            okToLogEmergencyNumber = configBundle.getBoolean(
                    CarrierConfigManager.KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL);