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

Commit 2ce7d20b authored by mqi's avatar mqi Committed by Gerrit - the friendly Code Review server
Browse files

SystemUI: Fix no emergency call button on lock screen

Someone added system property check before showing emergency call
button which is always false.

Replace the conditon check with config value check.

Change-Id: I823ca081bfa887e7c0fa9d3ef66a500023cf1d32
CRs-Fixed: 963192
parent a3da7f04
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -34,4 +34,7 @@

    <!-- config for showing AM/PM on lock screen in 12hour format -->
    <bool name="config_showAmpm">true</bool>

    <!-- whether to show emergency button in lock screen -->
    <bool name="config_showEmergencyButton">true</bool>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ public class EmergencyButton extends Button {
                } else {
                    // Only show if there is a secure screen (pin/pattern/SIM pin/SIM puk);
                    visible = mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser()) ||
                            SystemProperties.getBoolean("persist.radio.emgcy_btn_onswipe", false);
                              mContext.getResources().getBoolean(R.bool.config_showEmergencyButton);
                }
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -706,7 +706,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
    }

    private void updateEmergencyButton() {
        if (SystemProperties.getBoolean("persist.radio.emgcy_btn_onswipe",false)) {
        if(mContext.getResources().getBoolean(R.bool.config_showEmergencyButton)){
            if (mEmergencyButton != null) {
                mEmergencyButton.updateEmergencyCallButton();
            }