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
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 2688e54..471cb3e 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1696,7 +1696,8 @@
folder.getInfo().opened = false;
ViewGroup parent = (ViewGroup) folder.getParent();
if (parent != null) {
- parent.removeView(folder);
+ CellLayout cl = (CellLayout) parent;
+ cl.removeViewWithoutMarkingCells(folder);
if (folder instanceof DropTarget) {
// Live folders aren't DropTargets.
mDragController.removeDropTarget((DropTarget)folder);