Merge "Make sure user can always get to next page with keyboard." into ub-launcher3-burnaby-polish

am: 0e2f3849b8

* commit '0e2f3849b84f59ed7c1c4336ca01ac17f096e265':
  Make sure user can always get to next page with keyboard.
This commit is contained in:
Tony Wickham
2015-11-06 18:11:49 +00:00
committed by android-build-merger
@@ -346,6 +346,18 @@ public class FocusLogic {
}
}
}
// Rule 3: if switching between pages, do a brute-force search to find an item that was
// missed by rules 1 and 2 (such as when going from a bottom right icon to top left)
if (iconIdx == PIVOT) {
for (int x = xPos + increment; 0 <= x && x < cntX; x = x + increment) {
for (int y = 0; y < cntY; y++) {
if ((newIconIndex = inspectMatrix(x, y, cntX, cntY, matrix)) != NOOP) {
return newIconIndex;
}
}
}
}
return newIconIndex;
}