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

Commit a6e59ce1 authored by kaiyiz's avatar kaiyiz Committed by Linux Build Service Account
Browse files

Keyguard: Add config to always enable emergency call button

As the original design, emergency call button will be hidden on slide
lock screen. Add config_showEmergencyButton to control emergency call
button on slide lock screen.

CRs-Fixed: 640998
Change-Id: Ica29e1ec9043272e9d507307fb8744e8eef57b2e
parent 19dfe456
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -29,4 +29,7 @@
    <!-- Allow the menu hard key to be disabled in LockScreen on some devices [DO NOT TRANSLATE] -->
    <bool name="config_disableMenuKeyInLockScreen">false</bool>

    <!-- True if we need to show on "Slide" lock screen -->
    <bool name="config_showEmergencyButton">false</bool>

</resources>
+2 −1
Original line number Diff line number Diff line
@@ -122,7 +122,8 @@ public class EmergencyButton extends Button {
            } else {
                // True if we need to show a secure screen (pin/pattern/SIM pin/SIM puk);
                // hides emergency button on "Slide" screen if device is not secure.
                enabled = mLockPatternUtils.isSecure();
                enabled = mLockPatternUtils.isSecure() ||
                        mContext.getResources().getBoolean(R.bool.config_showEmergencyButton);
            }
        }
        mLockPatternUtils.updateEmergencyCallButtonState(this, enabled, false);