diff options
author | Tony Wickham <twickham@google.com> | 2015-12-03 20:41:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-12-03 20:41:28 +0000 |
commit | b879abd2747c1c1473c8d2b9d9c97707da8218f3 (patch) | |
tree | 7220ef022d0ecfb0e1afc92f52b78ce9b3df0d16 /src/com/android/launcher3/FocusHelper.java | |
parent | aa4011e63ed3a226e2876850fd93e7eec01f8845 (diff) | |
parent | 6cbd22279e5e033c67863a3db851e0f43be9ddff (diff) | |
download | android_packages_apps_Trebuchet-b879abd2747c1c1473c8d2b9d9c97707da8218f3.tar.gz android_packages_apps_Trebuchet-b879abd2747c1c1473c8d2b9d9c97707da8218f3.tar.bz2 android_packages_apps_Trebuchet-b879abd2747c1c1473c8d2b9d9c97707da8218f3.zip |
Merge "Add special column for All Apps button in FocusLogic's sparse matrix." into ub-launcher3-burnaby-polish
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java index 44403e2df..4709488a0 100644 --- a/src/com/android/launcher3/FocusHelper.java +++ b/src/com/android/launcher3/FocusHelper.java @@ -223,20 +223,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()) { @@ -352,15 +350,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)) { |