diff --git a/src/com/android/settings/network/CellularSecurityPreferenceController.java b/src/com/android/settings/network/CellularSecurityPreferenceController.java index 6ab32e31729..f8699cbe77c 100644 --- a/src/com/android/settings/network/CellularSecurityPreferenceController.java +++ b/src/com/android/settings/network/CellularSecurityPreferenceController.java @@ -77,7 +77,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 @@ -186,7 +186,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()