diff --git a/src/com/android/settings/network/CellularSecurityPreferenceController.java b/src/com/android/settings/network/CellularSecurityPreferenceController.java index 9ad2eac4ac0..ca7977ddcd3 100644 --- a/src/com/android/settings/network/CellularSecurityPreferenceController.java +++ b/src/com/android/settings/network/CellularSecurityPreferenceController.java @@ -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()