Merge "Restore mDragInfo when deferring onDropComplete() for uninstall." into ub-launcher3-master
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 3b9d690..2161e39 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -3597,8 +3597,10 @@
public void onDropCompleted(final View target, final DragObject d,
final boolean isFlingToDelete, final boolean success) {
if (mDeferDropAfterUninstall) {
+ final CellLayout.CellInfo dragInfo = mDragInfo;
mDeferredAction = new Runnable() {
public void run() {
+ mDragInfo = dragInfo; // Restore the drag info that was cleared in onDragEnd()
onDropCompleted(target, d, isFlingToDelete, success);
mDeferredAction = null;
}
@@ -3626,6 +3628,7 @@
&& mDragInfo.cell != null) {
mDragInfo.cell.setVisibility(VISIBLE);
}
+ mDragInfo = null;
if (!isFlingToDelete) {
// Fling to delete already exits spring loaded mode after the animation finishes.