Merge "Handle failing calls to TelephonyManager" into main
This commit is contained in:
@@ -75,7 +75,7 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll
|
|||||||
}
|
}
|
||||||
if (mTelephonyManager == null) {
|
if (mTelephonyManager == null) {
|
||||||
Log.w(LOG_TAG, "Telephony manager not yet initialized");
|
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
|
// 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() {
|
protected boolean areNotificationsEnabled() {
|
||||||
if (mTelephonyManager == null) {
|
if (mTelephonyManager == null) {
|
||||||
Log.w(LOG_TAG, "Telephony manager not yet initialized");
|
Log.w(LOG_TAG, "Telephony manager not yet initialized");
|
||||||
mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mTelephonyManager.isNullCipherNotificationsEnabled()
|
return mTelephonyManager.isNullCipherNotificationsEnabled()
|
||||||
|
Reference in New Issue
Block a user