From 10279d82522a6609934c9f2ba4c67cf7c3b07485 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Thu, 14 Nov 2013 11:09:14 +0000 Subject: Change the way view ids are assigned (issue 11627801) Change-Id: I4d9c0542ea3ac581c4a9f4da68824f0b498ea337 --- src/com/android/launcher3/Workspace.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/com/android/launcher3/Workspace.java') diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index b097eaae2..9c3fcecab 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1027,7 +1027,9 @@ public class Workspace extends SmoothPagedView } // Get the canonical child id to uniquely represent this view in this screen - int childId = LauncherModel.getCellLayoutChildId(container, screenId, x, y, spanX, spanY); + ItemInfo info = (ItemInfo) child.getTag(); + int childId = mLauncher.getViewIdForItem(info); + boolean markCellsAsOccupied = !(child instanceof Folder); if (!layout.addViewToCellLayout(child, insert ? 0 : -1, childId, lp, markCellsAsOccupied)) { // TODO: This branch occurs when the workspace is adding views @@ -3038,8 +3040,6 @@ public class Workspace extends SmoothPagedView lp.cellHSpan = item.spanX; lp.cellVSpan = item.spanY; lp.isLockedToGrid = true; - cell.setId(LauncherModel.getCellLayoutChildId(container, mDragInfo.screenId, - mTargetCell[0], mTargetCell[1], mDragInfo.spanX, mDragInfo.spanY)); if (container != LauncherSettings.Favorites.CONTAINER_HOTSEAT && cell instanceof LauncherAppWidgetHostView) { -- cgit v1.2.3