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

Commit 281045d5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Keyguard: Add config for showing emergency call only"

parents c0a4b22b f6645c12
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;
    }