Fix bug where add to folder fails even when folder creation animation runs.

If the distance > max distance for folder creation, we clear the drag mode
if it was previously set.

Bug: 78919972
Change-Id: Ibd456c0981ebb20958c54d21ba3996172d2dd554
This commit is contained in:
Jon Miranda
2018-06-12 15:05:12 -07:00
parent 367a53ec13
commit 36f6359c21

View File

@@ -2386,7 +2386,12 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
private void manageFolderFeedback(CellLayout targetLayout,
int[] targetCell, float distance, DragObject dragObject) {
if (distance > mMaxDistanceForFolderCreation) return;
if (distance > mMaxDistanceForFolderCreation) {
if (mDragMode != DRAG_MODE_NONE) {
setDragMode(DRAG_MODE_NONE);
}
return;
}
final View dragOverView = mDragTargetLayout.getChildAt(mTargetCell[0], mTargetCell[1]);
ItemInfo info = dragObject.dragInfo;