From 02b4711e74d0d328f4fedb747cfd1541f86bdae7 Mon Sep 17 00:00:00 2001 From: Sebastian Franco Date: Thu, 17 Nov 2022 14:23:09 -0800 Subject: [PATCH] Fix issue where the solution is not updated when the grid is empty Test: Manually move widgets and shortcuts around and the position should match the animation Fix: 259502044 Change-Id: I20a98f9366394c840bb3cd0577de26a181a229ac --- src/com/android/launcher3/Workspace.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 517bbf835a..191d063f34 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2385,6 +2385,9 @@ public class Workspace extends PagedView ItemInfo item = d.dragInfo; final View child = (mDragInfo == null) ? null : mDragInfo.cell; if (!nearestDropOccupied) { + mDragTargetLayout.performReorder((int) mDragViewVisualCenter[0], + (int) mDragViewVisualCenter[1], minSpanX, minSpanY, item.spanX, item.spanY, + child, mTargetCell, new int[2], CellLayout.MODE_SHOW_REORDER_HINT); mDragTargetLayout.visualizeDropLocation(mTargetCell[0], mTargetCell[1], item.spanX, item.spanY, d); } else if ((mDragMode == DRAG_MODE_NONE || mDragMode == DRAG_MODE_REORDER)