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
diff --git a/packages/Keyguard/res/values/config.xml b/packages/Keyguard/res/values/config.xml
index de17c4b..e8995a1 100644
--- a/packages/Keyguard/res/values/config.xml
+++ b/packages/Keyguard/res/values/config.xml
@@ -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>
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
index c571f8f..6aa7a6b 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -122,7 +122,8 @@
} 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);