Merge "Reattach LauncherAppWidgetHostView to its parent after canceling drag" into sc-dev am: 4176cb33bb am: 2fab58310a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14970490 Change-Id: I2a939b0fd4221e6d0c7ea8f7d4a02ece3038524d
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user