Merge "Reattach LauncherAppWidgetHostView to its parent after canceling drag" into sc-dev am: 4176cb33bb am: 447b5aa442

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

Change-Id: I25b91625187d7abef59d1be3294cdfc6a623df3a
This commit is contained in:
TreeHugger Robot authored and Automerger Merge Worker committed 2021-06-16 22:48:49 +00:00
commit 6cbbb14bae
1 file changed
+4
+4
View File
@@ -2838,6 +2838,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
removeWorkspaceItem(mDragInfo.cell);
}
} else if (mDragInfo != null) {
// When drag is cancelled, reattach content view back to its original parent.
if (mDragInfo.cell instanceof LauncherAppWidgetHostView) {
d.dragView.detachContentView(/* reattachToPreviousParent= */ true);
}
final CellLayout cellLayout = mLauncher.getCellLayout(
mDragInfo.container, mDragInfo.screenId);
if (cellLayout != null) {