diff options
author | Winson Chung <winsonc@google.com> | 2012-04-24 14:49:03 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-04-24 14:49:53 -0700 |
commit | d7e9e37cb7b253b4b68b8229e5baa7031b65d2e2 (patch) | |
tree | ed64fe042260fcd506221628e470fbe25862eb6c /src/com/android/launcher2/InstallShortcutReceiver.java | |
parent | c3a804042844dc4733b4bd4b6ac03bf4b2b015b7 (diff) | |
download | packages_apps_trebuchet-d7e9e37cb7b253b4b68b8229e5baa7031b65d2e2.zip packages_apps_trebuchet-d7e9e37cb7b253b4b68b8229e5baa7031b65d2e2.tar.gz packages_apps_trebuchet-d7e9e37cb7b253b4b68b8229e5baa7031b65d2e2.tar.bz2 |
Fixing issue where ItemInfo had errant cell coordinates leading to an array-out-of-bounds exception. (Bug 6333784)
Change-Id: I03c3fe32bd1d027143aeb8abf9275ecaa688070f
Diffstat (limited to 'src/com/android/launcher2/InstallShortcutReceiver.java')
-rw-r--r-- | src/com/android/launcher2/InstallShortcutReceiver.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher2/InstallShortcutReceiver.java b/src/com/android/launcher2/InstallShortcutReceiver.java index 19b1c69..f493701 100644 --- a/src/com/android/launcher2/InstallShortcutReceiver.java +++ b/src/com/android/launcher2/InstallShortcutReceiver.java @@ -174,8 +174,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver { cellY = item.cellY; spanX = item.spanX; spanY = item.spanY; - for (int x = cellX; x < cellX + spanX && x < xCount; x++) { - for (int y = cellY; y < cellY + spanY && y < yCount; y++) { + for (int x = cellX; 0 <= x && x < cellX + spanX && x < xCount; x++) { + for (int y = cellY; 0 <= y && y < cellY + spanY && y < yCount; y++) { occupied[x][y] = true; } } |