From 2fcd63b8cf94a947498f0aab24b9d702a6fe909b Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 14 Nov 2011 17:21:55 -0800 Subject: [PATCH] Fix 5602985: Show "Emergency calls only" when device has no SIM. Some countries require phones to show "Emergency calls only" when roaming on a device with no Sim. This changes causes the phone to now display the PLMN string on devices that are voice-capable when the sim is missing. This depends on the PLMN containing the text "Emergency calls only" when the radio has connectivity to any carrier. Otherwise, the PLMN is expected be null or empty which will cause the device to just show "No SIM card." Change-Id: I7c1d4624ae67074e2ca40161845ca8bb36031c42 --- .../internal/policy/impl/KeyguardStatusViewManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java index a7da96e4d5eac..22b2460863a0b 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java @@ -481,7 +481,14 @@ class KeyguardStatusViewManager implements OnClickListener { break; case SimMissing: + // Shows "No SIM card | Emergency calls only" on devices that are voice-capable. + // This depends on mPlmn containing the text "Emergency calls only" when the radio + // has some connectivity. Otherwise, it should be null or empty and just show + // "No SIM card" carrierText = getContext().getText(R.string.lockscreen_missing_sim_message_short); + if (mLockPatternUtils.isEmergencyCallCapable()) { + carrierText = makeCarierString(carrierText, mPlmn); + } carrierHelpTextId = R.string.lockscreen_missing_sim_instructions_long; break;