Cleaning up drag state management.

When the drag is started, the UI automatically goes into spring loaded mode. On a successful
drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded
mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode.

Bug: 34692289
Change-Id: Ic611739a43bb8d9279b587aaee3039326c143e8b
This commit is contained in:
Sunny Goyal
2017-10-06 13:29:57 -07:00
parent cbdfc598fa
commit 1797af41d1
16 changed files with 111 additions and 194 deletions

View File

@@ -229,7 +229,7 @@ public abstract class ButtonDropTarget extends TextView
public void run() {
completeDrop(d);
mDropTargetBar.onDragEnd();
mLauncher.exitSpringLoadedDragModeDelayed(true, 0, null);
mLauncher.exitSpringLoadedDragMode(true, 0);
}
};
dragLayer.animateView(d.dragView, from, to, scale, 1f, 1f, 0.1f, 0.1f,