Stop clearing focus when snapping to a new workspace page.

Clearing the focus was causing the first child in the new page to
immediately take focus, which caused FocusIndicatorView jank when
using a keyboard.

Bug: 25256728
Change-Id: I5ab31ebc3fe370d7ac9e9792b30dab3467023738
This commit is contained in:
Tony Wickham
2015-10-30 18:04:48 -07:00
parent 4530aca912
commit 04e2c9ef56
2 changed files with 0 additions and 6 deletions

View File

@@ -397,7 +397,6 @@ public class FocusHelper {
if (newIconIndex == FocusLogic.PREVIOUS_PAGE_LEFT_COLUMN) {
newPageIndex = pageIndex - 1;
}
workspace.snapToPage(newPageIndex);
row = ((CellLayout.LayoutParams) v.getLayoutParams()).cellY;
parent = getCellLayoutChildrenForIndex(workspace, newPageIndex);
if (parent != null) {

View File

@@ -2078,11 +2078,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
whichPage = validateNewPage(whichPage);
mNextPage = whichPage;
View focusedChild = getFocusedChild();
if (focusedChild != null && whichPage != mCurrentPage &&
focusedChild == getPageAt(mCurrentPage)) {
focusedChild.clearFocus();
}
pageBeginMoving();
awakenScrollBars(duration);