summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/FocusHelper.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-12-03 20:45:25 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-12-03 20:45:25 +0000
commit800550d63f759f4d5d27000b7f8bfbc429ac8245 (patch)
tree06ab8107fd9e1cec7e1b1975d7e690ade88d6e52 /src/com/android/launcher3/FocusHelper.java
parente7337e0c3e3482706fd89ee71ca4aaf90ebdc598 (diff)
parentb879abd2747c1c1473c8d2b9d9c97707da8218f3 (diff)
downloadandroid_packages_apps_Trebuchet-800550d63f759f4d5d27000b7f8bfbc429ac8245.tar.gz
android_packages_apps_Trebuchet-800550d63f759f4d5d27000b7f8bfbc429ac8245.tar.bz2
android_packages_apps_Trebuchet-800550d63f759f4d5d27000b7f8bfbc429ac8245.zip
Merge "Add special column for All Apps button in FocusLogic\'s sparse matrix." into ub-launcher3-burnaby-polish
am: b879abd274 * commit 'b879abd2747c1c1473c8d2b9d9c97707da8218f3': Add special column for All Apps button in FocusLogic's sparse matrix.
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-rw-r--r--src/com/android/launcher3/FocusHelper.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java
index ef351a98f..d64f8ee52 100644
--- a/src/com/android/launcher3/FocusHelper.java
+++ b/src/com/android/launcher3/FocusHelper.java
@@ -224,20 +224,18 @@ public class FocusHelper {
if (keyCode == KeyEvent.KEYCODE_DPAD_UP &&
!profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout,
- true /* hotseat horizontal */, profile.inv.hotseatAllAppsRank,
- iconRank == profile.inv.hotseatAllAppsRank /* include all apps icon */);
+ true /* hotseat horizontal */, profile.inv.hotseatAllAppsRank);
iconIndex += iconParent.getChildCount();
- countX = iconLayout.getCountX();
+ countX = hotseatLayout.getCountX();
countY = iconLayout.getCountY() + hotseatLayout.getCountY();
parent = iconParent;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT &&
profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout,
- false /* hotseat horizontal */, profile.inv.hotseatAllAppsRank,
- iconRank == profile.inv.hotseatAllAppsRank /* include all apps icon */);
+ false /* hotseat horizontal */, profile.inv.hotseatAllAppsRank);
iconIndex += iconParent.getChildCount();
countX = iconLayout.getCountX() + hotseatLayout.getCountX();
- countY = iconLayout.getCountY();
+ countY = hotseatLayout.getCountY();
parent = iconParent;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT &&
profile.isVerticalBarLayout()) {
@@ -353,15 +351,15 @@ public class FocusHelper {
// with the hotseat.
if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN && !profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout, true /* horizontal */,
- profile.inv.hotseatAllAppsRank,
- !hotseat.hasIcons() /* ignore all apps icon, unless there are no other icons */);
- countY = countY + 1;
+ profile.inv.hotseatAllAppsRank);
+ countX = hotseatLayout.getCountX();
+ countY = countY + hotseatLayout.getCountY();
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT &&
profile.isVerticalBarLayout()) {
matrix = FocusLogic.createSparseMatrix(iconLayout, hotseatLayout, false /* horizontal */,
- profile.inv.hotseatAllAppsRank,
- !hotseat.hasIcons() /* ignore all apps icon, unless there are no other icons */);
- countX = countX + 1;
+ profile.inv.hotseatAllAppsRank);
+ countX = countX + hotseatLayout.getCountX();
+ countY = hotseatLayout.getCountY();
} else if (isUninstallKeyChord(e)) {
matrix = FocusLogic.createSparseMatrix(iconLayout);
if (UninstallDropTarget.supportsDrop(launcher, itemInfo)) {