Map META+L to lock the device

Fixes: 246657706
Test: META+L -> lock and go to the lockscreen
Change-Id: Ia928468318ba26ec19e4bb7aaf19c0f5a095d616
This commit is contained in:
Tracy Zhou
2023-06-07 03:59:12 +00:00
parent a8d522035e
commit 19fa8890c7

View File

@@ -3046,6 +3046,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return key_consumed;
}
break;
case KeyEvent.KEYCODE_L:
if (down && event.isMetaPressed() && repeatCount == 0) {
lockNow(null /* options */);
return key_consumed;
}
break;
case KeyEvent.KEYCODE_N:
if (down && event.isMetaPressed()) {
if (event.isCtrlPressed()) {