Merge "Add null check before detach content view from dragView at onDropComplete" into sc-dev am: 5b786ca88d

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

Change-Id: I837c61ddaecacf198ce89be0949e79f29a2c7a3d
This commit is contained in:
Steven Ng
2021-06-23 21:16:53 +00:00
committed by Automerger Merge Worker

View File

@@ -2792,7 +2792,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
}
} else if (mDragInfo != null) {
// When drag is cancelled, reattach content view back to its original parent.
if (mDragInfo.cell instanceof LauncherAppWidgetHostView) {
if (mDragInfo.cell instanceof LauncherAppWidgetHostView && d.dragView != null) {
d.dragView.detachContentView(/* reattachToPreviousParent= */ true);
}
final CellLayout cellLayout = mLauncher.getCellLayout(