Clean mPreviousSolution on change of CellLayout target
The previous reorder solution is not peropperly cleaned and
that leads to wrong solution being used. For example when
longpressing an icon, it triggers a drag but the drag never
finishes.
Fix: 261122618
Test: You can no longer overlap a shortcut in the same app icon (see attached bug)
Test: atest ReorderWidget
Change-Id: Iff8651926cc4179561761c7ce0ac5007f13fc9af
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index fdc52b5..ecfd230 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -2716,6 +2716,7 @@
*/
void onDragEnter() {
mDragging = true;
+ mPreviousSolution = null;
}
/**
@@ -2730,6 +2731,7 @@
}
// Invalidate the drag data
+ mPreviousSolution = null;
mDragCell[0] = mDragCell[1] = -1;
mDragCellSpan[0] = mDragCellSpan[1] = -1;
mDragOutlineAnims[mDragOutlineCurrent].animateOut();