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

Commit f6645c12 authored by kaiyiz's avatar kaiyiz Committed by Gerrit - the friendly Code Review server
Browse files

Keyguard: Add config for showing emergency call only

Add a config item config_showEmergencyCallOnlyInLockScreen to
control whether show "Emergency call only" tips on lock screen
or not.

CRs-Fixed: 653516

Change-Id: I54a4198cd44b6c4969c84763a15b9341dac054ce
parent 9c000017
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
    <!-- True if we need to show on "Slide" lock screen -->
    <bool name="config_showEmergencyButton">false</bool>

    <bool name="config_showEmergencyCallOnlyInLockScreen">false</bool>

	<!-- display airplane mode in lock sreen when phone is in APM mode -->
	<bool name="config_display_APM">false</bool>
</resources>
+9 −1
Original line number Diff line number Diff line
@@ -1227,8 +1227,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    private CharSequence getTelephonyPlmnFrom(Intent intent) {
        if (intent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_PLMN, false)) {
            final String plmn = intent.getStringExtra(TelephonyIntents.EXTRA_PLMN);
            String strEmergencyCallOnly = mContext.getResources().getText(
                    com.android.internal.R.string.emergency_calls_only).toString();
            if (mContext.getResources().getBoolean(
                    R.bool.config_showEmergencyCallOnlyInLockScreen)
                && plmn.equalsIgnoreCase(strEmergencyCallOnly)) {
                    return getDefaultPlmn();
            } else {
                return (plmn != null) ? plmn : getDefaultPlmn();
            }
        }
        return null;
    }