Fix for 2133391: Allow menu hard key to be disabled in LockScreen on some devices
Changed to use config.xml and overlays to enable.
This commit is contained in:
@@ -81,6 +81,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
private java.text.DateFormat mDateFormat;
|
||||
private java.text.DateFormat mTimeFormat;
|
||||
private boolean mCreatedInPortrait;
|
||||
private boolean mDisableMenuKeyInLockScreen;
|
||||
|
||||
/**
|
||||
* The status of this lock screen.
|
||||
@@ -149,6 +150,9 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
mUpdateMonitor = updateMonitor;
|
||||
mCallback = callback;
|
||||
|
||||
mDisableMenuKeyInLockScreen = getResources()
|
||||
.getBoolean(R.bool.config_disableMenuKeyInLockScreen);
|
||||
|
||||
mCreatedInPortrait = updateMonitor.isInPortrait();
|
||||
|
||||
final LayoutInflater inflater = LayoutInflater.from(context);
|
||||
@@ -213,7 +217,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU) {
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU && !mDisableMenuKeyInLockScreen) {
|
||||
mCallback.goToUnlockScreen();
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user