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

Commit ec412eb8 authored by Yomna N's avatar Yomna N Committed by Android (Google) Code Review
Browse files

Merge "Handle failing calls to TelephonyManager" into main

parents 9e1e4f18 3d66e6b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll
        }
        if (mTelephonyManager == null) {
            Log.w(LOG_TAG, "Telephony manager not yet initialized");
            mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
            return CONDITIONALLY_UNAVAILABLE;
        }

        // Check there are valid SIM cards which can be displayed to the user, otherwise this
@@ -184,7 +184,7 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll
    protected boolean areNotificationsEnabled() {
        if (mTelephonyManager == null) {
            Log.w(LOG_TAG, "Telephony manager not yet initialized");
            mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
            return false;
        }

        return mTelephonyManager.isNullCipherNotificationsEnabled()