Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e37055b authored by John Wang's avatar John Wang
Browse files

Update carrier display in lockscreen.

For bug 2352904, lockscreen need clearly show "Emergency Calls Only" status no matter with SIM status.

The change is to show both SIM card status and carrier PLMN including "Emergency Calls Only" status.
parent dc893738
Loading
Loading
Loading
Loading
+22 −6
Original line number Diff line number Diff line
@@ -470,8 +470,12 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
                mEmergencyCallButton.setVisibility(View.GONE);
                break;
            case NetworkLocked:
                //  text
                mCarrier.setText(R.string.lockscreen_network_locked_message);
                // The carrier string shows both sim card status (i.e. No Sim Card) and
                // carrier's name and/or "Emergency Calls Only" status
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                getContext().getText(R.string.lockscreen_network_locked_message)));
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
@@ -481,7 +485,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
                break;
            case SimMissing:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                getContext().getText(R.string.lockscreen_missing_sim_message_short)));
                mScreenLocked.setText(R.string.lockscreen_instructions_when_pattern_disabled);

                // layout
@@ -492,7 +499,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
                break;
            case SimMissingLocked:
                // text
                mCarrier.setText(R.string.lockscreen_missing_sim_message_short);
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                getContext().getText(R.string.lockscreen_missing_sim_message_short)));
                mScreenLocked.setText(R.string.lockscreen_missing_sim_instructions);

                // layout
@@ -503,7 +513,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
                break;
            case SimLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_locked_message);
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                getContext().getText(R.string.lockscreen_sim_locked_message)));

                // layout
                mScreenLocked.setVisibility(View.INVISIBLE);
@@ -512,7 +525,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
                break;
            case SimPukLocked:
                // text
                mCarrier.setText(R.string.lockscreen_sim_puk_locked_message);
                mCarrier.setText(
                        getCarrierString(
                                mUpdateMonitor.getTelephonyPlmn(),
                                getContext().getText(R.string.lockscreen_sim_puk_locked_message)));
                mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions);

                // layout