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: I5a92dc73ce2dcde24ea5fd7d826211e9d35a717e
This commit is contained in:
TreeHugger Robot
2021-06-16 22:39:09 +00:00
committed by Automerger Merge Worker
+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) {