Merge "Fix CellLayout cast exception when drag is canceled" into sc-dev am: 76f5572648

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14948453

Change-Id: I8d814a3459ff208c38e2eae6b2cfc6fb88def043
This commit is contained in:
TreeHugger Robot
2021-06-12 12:38:54 +00:00
committed by Automerger Merge Worker
+5
View File
@@ -1922,6 +1922,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
CellLayout layout = (CellLayout) cell.getParent().getParent();
layout.markCellsAsOccupiedForView(cell);
}
} else {
// When drag is cancelled, reattach content view back to its original parent.
if (mDragInfo.cell instanceof LauncherAppWidgetHostView) {
d.dragView.detachContentView(/* reattachToPreviousParent= */ true);
}
}
final CellLayout parent = (CellLayout) cell.getParent().getParent();