Fixing issue where ItemInfo had errant cell coordinates leading to an array-out-of-bounds exception. (Bug 6333784)

Change-Id: I03c3fe32bd1d027143aeb8abf9275ecaa688070f
This commit is contained in:
Winson Chung
2012-04-24 14:49:03 -07:00
parent c3a8040428
commit d7e9e37cb7

View File

@@ -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;
}
}