mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Add a no recent tasks message to the keyboard quick switch view
Flag: ENABLE_KEYBOARD_QUICK_SWITCH Fixes: 280652620 Test: launched the keyboard quick switch with 0, <=6 and >6 tasks launched Change-Id: I560707645b83b79ba2203460e62e4c540f5da421
This commit is contained in:
@@ -169,7 +169,7 @@ public class KeyboardQuickSwitchViewController {
|
||||
|
||||
class ViewCallbacks {
|
||||
|
||||
boolean onKeyUp(int keyCode, KeyEvent event, boolean isRTL) {
|
||||
boolean onKeyUp(int keyCode, KeyEvent event, boolean isRTL, boolean allowTraversal) {
|
||||
if (keyCode != KeyEvent.KEYCODE_TAB
|
||||
&& keyCode != KeyEvent.KEYCODE_DPAD_RIGHT
|
||||
&& keyCode != KeyEvent.KEYCODE_DPAD_LEFT
|
||||
@@ -181,6 +181,9 @@ public class KeyboardQuickSwitchViewController {
|
||||
closeQuickSwitchView(true);
|
||||
return true;
|
||||
}
|
||||
if (!allowTraversal) {
|
||||
return false;
|
||||
}
|
||||
boolean traverseBackwards = (keyCode == KeyEvent.KEYCODE_TAB && event.isShiftPressed())
|
||||
|| (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT && !isRTL)
|
||||
|| (keyCode == KeyEvent.KEYCODE_DPAD_LEFT && isRTL);
|
||||
|
||||
Reference in New Issue
Block a user