Fixing issue with cancelled drag blocking cell spaces (Issue 5386523)
Change-Id: I9cfc728edeeee2237c21935517107e7a2af49646
This commit is contained in:
@@ -361,6 +361,7 @@ public class DragController {
|
||||
if (mLastDropTarget != null) {
|
||||
mLastDropTarget.onDragExit(mDragObject);
|
||||
}
|
||||
mDragObject.cancelled = true;
|
||||
mDragObject.dragComplete = true;
|
||||
mDragObject.dragSource.onDropCompleted(null, mDragObject, false);
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ public interface DropTarget {
|
||||
/** Post drag animation runnable */
|
||||
public Runnable postAnimationRunnable = null;
|
||||
|
||||
/** Indicates that the drag operation was cancelled */
|
||||
public boolean cancelled = false;
|
||||
|
||||
public DragObject() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3051,6 +3051,9 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
cellLayout.onDropChild(mDragInfo.cell);
|
||||
}
|
||||
if (d.cancelled && mDragInfo.cell != null) {
|
||||
mDragInfo.cell.setVisibility(VISIBLE);
|
||||
}
|
||||
mDragOutline = null;
|
||||
mDragInfo = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user