Loading packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java +6 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,12 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView { private void setLockedSimMessage() { boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId); int count = TelephonyManager.getDefault().getSimCount(); int count = 1; TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager != null) { count = telephonyManager.getActiveModemCount(); } Resources rez = getResources(); String msg; TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor }); Loading packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java +6 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,12 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView { } boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId); int count = TelephonyManager.getDefault().getSimCount(); int count = 1; TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager != null) { count = telephonyManager.getActiveModemCount(); } Resources rez = getResources(); String msg; TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor }); Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +4 −2 Original line number Diff line number Diff line Loading @@ -2649,8 +2649,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // that don't return the complete set of values and have different types. In Keyguard we // need IccCardConstants, but TelephonyManager would only give us // TelephonyManager.SIM_STATE*, so we retrieve it manually. final TelephonyManager tele = TelephonyManager.from(mContext); int simState = tele.getSimState(slotId); final TelephonyManager tele = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); int simState = (tele != null) ? tele.getSimState(slotId) : TelephonyManager.SIM_STATE_UNKNOWN; State state; try { state = State.intToState(simState); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -649,7 +649,7 @@ public class NetworkControllerImpl extends BroadcastReceiver } private boolean hasAnySim() { int simCount = mPhone.getSimCount(); int simCount = mPhone.getActiveModemCount(); for (int i = 0; i < simCount; i++) { int state = mPhone.getSimState(i); if (state != TelephonyManager.SIM_STATE_ABSENT Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java +5 −2 Original line number Diff line number Diff line Loading @@ -463,8 +463,11 @@ public class UserSwitcherController implements Dumpable { } private void listenForCallState() { TelephonyManager.from(mContext).listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); final TelephonyManager tele = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (tele != null) { tele.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); } } private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java +6 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,12 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView { private void setLockedSimMessage() { boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId); int count = TelephonyManager.getDefault().getSimCount(); int count = 1; TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager != null) { count = telephonyManager.getActiveModemCount(); } Resources rez = getResources(); String msg; TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor }); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java +6 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,12 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView { } boolean isEsimLocked = KeyguardEsimArea.isEsimLocked(mContext, mSubId); int count = TelephonyManager.getDefault().getSimCount(); int count = 1; TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager != null) { count = telephonyManager.getActiveModemCount(); } Resources rez = getResources(); String msg; TypedArray array = mContext.obtainStyledAttributes(new int[] { R.attr.wallpaperTextColor }); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +4 −2 Original line number Diff line number Diff line Loading @@ -2649,8 +2649,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // that don't return the complete set of values and have different types. In Keyguard we // need IccCardConstants, but TelephonyManager would only give us // TelephonyManager.SIM_STATE*, so we retrieve it manually. final TelephonyManager tele = TelephonyManager.from(mContext); int simState = tele.getSimState(slotId); final TelephonyManager tele = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); int simState = (tele != null) ? tele.getSimState(slotId) : TelephonyManager.SIM_STATE_UNKNOWN; State state; try { state = State.intToState(simState); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -649,7 +649,7 @@ public class NetworkControllerImpl extends BroadcastReceiver } private boolean hasAnySim() { int simCount = mPhone.getSimCount(); int simCount = mPhone.getActiveModemCount(); for (int i = 0; i < simCount; i++) { int state = mPhone.getSimState(i); if (state != TelephonyManager.SIM_STATE_ABSENT Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java +5 −2 Original line number Diff line number Diff line Loading @@ -463,8 +463,11 @@ public class UserSwitcherController implements Dumpable { } private void listenForCallState() { TelephonyManager.from(mContext).listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); final TelephonyManager tele = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (tele != null) { tele.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); } } private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { Loading