From 8f26e477368837083cb7628019e3682ee2e5a07d Mon Sep 17 00:00:00 2001 From: Schneider Victor-tulias Date: Wed, 24 May 2023 10:04:05 -0700 Subject: [PATCH] Fix keyboard quick switch d-pad left/right traversal direction Flag: ENABLE_KEYBOARD_QUICK_SWITCH Fixes: 284156698 Test: tried keyboard quick switching with d-pad left/right in rtl/ltr Change-Id: Idb7466b316cb7cbd9f592c5949d2c95c3278d85f --- .../launcher3/taskbar/KeyboardQuickSwitchViewController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java index 7bd8898dfc..3230c661d5 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java @@ -185,8 +185,8 @@ public class KeyboardQuickSwitchViewController { return false; } boolean traverseBackwards = (keyCode == KeyEvent.KEYCODE_TAB && event.isShiftPressed()) - || (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT && !isRTL) - || (keyCode == KeyEvent.KEYCODE_DPAD_LEFT && isRTL); + || (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT && isRTL) + || (keyCode == KeyEvent.KEYCODE_DPAD_LEFT && !isRTL); int taskCount = mControllerCallbacks.getTaskCount(); int toIndex = mCurrentFocusIndex == -1 // Focus the second-most recent app if possible