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

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

Change-Id: I48fe2734fb01fd7a66796a1d8dbc9a515290901c
This commit is contained in:
TreeHugger Robot
2021-06-16 22:38:21 +00:00
committed by Automerger Merge Worker
+4
View File
@@ -2791,6 +2791,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) {