If you click at the icon with mouse, then release without moving,
the framework won't generate DRAG_LOCATION events, and we'll assume
the the drag ended at (0,0) coordinate.
Fixing by updating coords at any event that has coordinates.
Bug: 22028725
Change-Id: I1872b479035e14aa9fece1532b05194fa86a4907
When drag exits Launcher window (for example, goes to Shelf) launcher doesn't get notified
and thinks the drag is still over it. For example if there is a moved shaking icon in Hotseat,
it will keep shaking.
Fixing this.
Bug: 22028725
Change-Id: Ie57572a57a324d426c9f6e57dc0bba56630e92df
Now DragDriver uses DragController through DragDriver.EventListener
interface. I hope that this will make relations between 2 classes clearer,
and will help avoiding mess during future development.
Also, some small cleanups.
Bug: 22609426
Change-Id: Ibaf61804ab931743f2f913fac11bf24ebf9a36c8
This CL doesn’t let the new code run, it’s under a compile-time flag,
and the behavior should be same as before.
The change introduces a concept of a DragDriver, which encapsulates
behavior of the existing DND (InternalDragDriver) or the framework-
driven DND (SystemDragDriver).
An instance of DragDriver gets created by DragController for the time
while a DND operation is in progress, and it takes care of translating
DND events for DragController.
Also did some cleanups, like removing meaningless fields etc.
Plans for future: keep working in Burnaby, and:
* Perhaps, better separate DragDriver from DragController
* Detect fling gesture for system DND
* Look at accessibility
* Polish animations and appearance
* Fix dragging from folders
* Support cancelling DND
Then, it will become possible to enable new dragging (based on Android
version).
Bug: 22028725
Change-Id: I41b40e9d512d83937f5b101ac8e3e8e7e807c269