diff options
author | Winson Chung <winsonc@google.com> | 2015-05-20 15:03:13 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-05-21 00:37:50 +0000 |
commit | c393b0765df8d2d34b3b996b71700a705b7d0106 (patch) | |
tree | a082b4b71c6eadb86009a11c6c27c88bc572a783 /src/com/android/launcher3/FocusHelper.java | |
parent | db092a331ceb9b6cc72fd9b1a593cd77068bb66a (diff) | |
download | android_packages_apps_Trebuchet-c393b0765df8d2d34b3b996b71700a705b7d0106.tar.gz android_packages_apps_Trebuchet-c393b0765df8d2d34b3b996b71700a705b7d0106.tar.bz2 android_packages_apps_Trebuchet-c393b0765df8d2d34b3b996b71700a705b7d0106.zip |
Fixing issue where the prediction bar apps are not focused.
- Also fixes issue where all apps is not accessible by keyboard
when there are no other apps in the hotseat.
Bug: 21334471
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java index c77d41657..678ed0f82 100644 --- a/src/com/android/launcher3/FocusHelper.java +++ b/src/com/android/launcher3/FocusHelper.java @@ -314,12 +314,14 @@ public class FocusHelper { // with the hotseat. if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN && !profile.isVerticalBarLayout()) { matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout, true /* horizontal */, - hotseat.getAllAppsButtonRank(), false /* all apps icon is ignored */); + hotseat.getAllAppsButtonRank(), + !hotseat.hasIcons() /* ignore all apps icon, unless there are no other icons */); countY = countY + 1; } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT && profile.isVerticalBarLayout()) { matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout, false /* horizontal */, - hotseat.getAllAppsButtonRank(), false /* all apps icon is ignored */); + hotseat.getAllAppsButtonRank(), + !hotseat.hasIcons() /* ignore all apps icon, unless there are no other icons */); countX = countX + 1; } else if (keyCode == KeyEvent.KEYCODE_DEL || keyCode == KeyEvent.KEYCODE_FORWARD_DEL) { workspace.removeWorkspaceItem(v); |