summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/CarrierText.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/CarrierText.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/CarrierText.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/CarrierText.java b/packages/Keyguard/src/com/android/keyguard/CarrierText.java
index 8dd56fa..f21ce7f 100644
--- a/packages/Keyguard/src/com/android/keyguard/CarrierText.java
+++ b/packages/Keyguard/src/com/android/keyguard/CarrierText.java
@@ -188,6 +188,25 @@ public class CarrierText extends TextView {
}
}
}
+ /*
+ * In the case where there is only one sim inserted in a multisim device, if
+ * the voice registration service state is reported as 12 (no service with emergency)
+ * for at least one of the sim concatenate the sim state with Emergency calls only"
+ */
+ if (N < TelephonyManager.getDefault().getPhoneCount() &&
+ mKeyguardUpdateMonitor.isEmergencyOnly()) {
+ int presentSubId = mKeyguardUpdateMonitor.getPresentSubId();
+
+ if (DEBUG) {
+ Log.d(TAG, " Present sim - sub id: " + presentSubId);
+ }
+ if (presentSubId != -1) {
+ CharSequence emergencyOnlyText =
+ getContext().getText(com.android.internal.R.string.emergency_calls_only);
+ displayText = getCarrierTextForSimState(
+ mKeyguardUpdateMonitor.getSimState(presentSubId), emergencyOnlyText);
+ }
+ }
if (allSimsMissing) {
if (N != 0) {
// Shows "No SIM card | Emergency calls only" on devices that are voice-capable.