Skip to content

Commit 2fcd63b

Browse files
author
Jim Miller
committed
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
1 parent 258576a commit 2fcd63b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,14 @@ private void updateCarrierStateWithSimStatus(State simState) {
481481
break;
482482

483483
case SimMissing:
484+
// Shows "No SIM card | Emergency calls only" on devices that are voice-capable.
485+
// This depends on mPlmn containing the text "Emergency calls only" when the radio
486+
// has some connectivity. Otherwise, it should be null or empty and just show
487+
// "No SIM card"
484488
carrierText = getContext().getText(R.string.lockscreen_missing_sim_message_short);
489+
if (mLockPatternUtils.isEmergencyCallCapable()) {
490+
carrierText = makeCarierString(carrierText, mPlmn);
491+
}
485492
carrierHelpTextId = R.string.lockscreen_missing_sim_instructions_long;
486493
break;
487494

0 commit comments

Comments
 (0)