Fix bug that allowed multiple items in one cell

Fixed issue where opening a folder allowed items to be placed on any cell, even if it was occupied.

Bug: 3094164

Change-Id: I392e7236f9cd7ea0b09f36e249d2a57c9934dc8e
This commit is contained in:
Michael Jurka
2010-10-20 17:08:24 -07:00
parent 8930822698
commit f3ca3ab695
3 changed files with 14 additions and 3 deletions
+2 -1
View File
@@ -364,7 +364,8 @@ public class Workspace extends SmoothPagedView
// Get the canonical child id to uniquely represent this view in this screen
int childId = LauncherModel.getCellLayoutChildId(-1, screen, x, y, spanX, spanY);
if (!group.addViewToCellLayout(child, insert ? 0 : -1, childId, lp)) {
boolean markCellsAsOccupied = !(child instanceof Folder);
if (!group.addViewToCellLayout(child, insert ? 0 : -1, childId, lp, markCellsAsOccupied)) {
// TODO: This branch occurs when the workspace is adding views
// outside of the defined grid
// maybe we should be deleting these items from the LauncherModel?