diff options
author | Tony Wickham <twickham@google.com> | 2015-11-04 17:44:32 -0800 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2015-11-04 17:44:32 -0800 |
commit | 25189851ace521c856faf7a9deacf1330b5bef92 (patch) | |
tree | 474559ae5089f04bfe1284afc6ba72e34d20a568 /src/com/android/launcher3/util | |
parent | 04e2c9ef5663262fc9dd08ffc4b59fe305a017f3 (diff) | |
download | android_packages_apps_Trebuchet-25189851ace521c856faf7a9deacf1330b5bef92.tar.gz android_packages_apps_Trebuchet-25189851ace521c856faf7a9deacf1330b5bef92.tar.bz2 android_packages_apps_Trebuchet-25189851ace521c856faf7a9deacf1330b5bef92.zip |
Stop explicitly snapping to page when navigating with keyboard.
When an icon grabs focus, it already snaps to its own page, so
the explicit snapToPage() is redundant. And in the case where no icon
will grab the focus, the explicit call puts us in a weird state
because the page snaps but the focus doesn't change (see bug).
(This happens, for instance, if you are moving from an icon on the
bottom right of page 1 and the only icon on page 2 is in the top
left. In this case, the second icon won't take focus because the
angle is too wide according to FocusLogic#handleDpadHorizontal().)
Bug: 25434120
Change-Id: I17b0ef7d86426a2599bc948bf2313dca7e112364
Diffstat (limited to 'src/com/android/launcher3/util')
-rw-r--r-- | src/com/android/launcher3/util/FocusLogic.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/util/FocusLogic.java b/src/com/android/launcher3/util/FocusLogic.java index 7f0da77e4..ba44f008a 100644 --- a/src/com/android/launcher3/util/FocusLogic.java +++ b/src/com/android/launcher3/util/FocusLogic.java @@ -494,9 +494,9 @@ public class FocusLogic { /** * @param edgeColumn the column of the new icon. either {@link #NEXT_PAGE_LEFT_COLUMN} or * {@link #NEXT_PAGE_RIGHT_COLUMN} - * @return the view adjacent to {@param oldView} in the {@param nextPage}. + * @return the view adjacent to {@param oldView} in the {@param nextPage} of the folder. */ - public static View getAdjacentChildInNextPage( + public static View getAdjacentChildInNextFolderPage( ShortcutAndWidgetContainer nextPage, View oldView, int edgeColumn) { final int newRow = ((CellLayout.LayoutParams) oldView.getLayoutParams()).cellY; |