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:
Schneider Victor-tulias
2023-05-10 11:43:25 -07:00
parent 8f23be7b6f
commit b29355c192
8 changed files with 88 additions and 19 deletions

View File

@@ -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);