diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-01-08 16:59:04 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-01-16 17:40:41 -0800 |
commit | 71b5c0b988a64b3a0613ded5403749bc537ee8a5 (patch) | |
tree | dec5e13b1ef53a7005a9776387fc0a4c1895c39c /src/com/android/launcher3/CellLayout.java | |
parent | 08f7261d11a53ae4b330ad4fa897b8519de3d750 (diff) | |
download | android_packages_apps_Trebuchet-71b5c0b988a64b3a0613ded5403749bc537ee8a5.tar.gz android_packages_apps_Trebuchet-71b5c0b988a64b3a0613ded5403749bc537ee8a5.tar.bz2 android_packages_apps_Trebuchet-71b5c0b988a64b3a0613ded5403749bc537ee8a5.zip |
Adding accessibility controls
> Adding 'Remove' option to workspace items
> Adding 'Add to workspace' to all apps and widget list items, which
adds the item to the first available space, giving preference to
the current workspace screen
> Adding 'App info' and 'Uninstall' options to appropriate items
Bug: 18482913
Change-Id: Ifab7423af2d9ba502b5a2771b37bb5436b3df937
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 7424d61c1..e6865b2e6 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -2981,11 +2981,11 @@ public class CellLayout extends ViewGroup { static boolean findVacantCell(int[] vacant, int spanX, int spanY, int xCount, int yCount, boolean[][] occupied) { - for (int y = 0; y < yCount; y++) { - for (int x = 0; x < xCount; x++) { + for (int y = 0; (y + spanY) <= yCount; y++) { + for (int x = 0; (x + spanX) <= xCount; x++) { boolean available = !occupied[x][y]; -out: for (int i = x; i < x + spanX - 1 && x < xCount; i++) { - for (int j = y; j < y + spanY - 1 && y < yCount; j++) { +out: for (int i = x; i < x + spanX; i++) { + for (int j = y; j < y + spanY; j++) { available = available && !occupied[i][j]; if (!available) break out; } |