Merge "Restore mDragInfo when deferring onDropComplete() for uninstall." into ub-launcher3-master

This commit is contained in:
Tony Wickham
2016-10-27 21:05:52 +00:00
committed by Android (Google) Code Review

View File

@@ -3597,8 +3597,10 @@ public class Workspace extends PagedView
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 @@ public class Workspace extends PagedView
&& mDragInfo.cell != null) {
mDragInfo.cell.setVisibility(VISIBLE);
}
mDragInfo = null;
if (!isFlingToDelete) {
// Fling to delete already exits spring loaded mode after the animation finishes.