This is per an earlier CR comment "we should probably move all this code to its own package (launcher3.dragndrop) in a separate cl".
I'm not moving DragSource because it's referred from gsa code.
Bug: 22609426
Change-Id: Ia7204dab99c0c395c66b77143a2d60411153f5f3
> Renaming Lmp to Lollipop
> Lollipop_MR1 instead of directly using 22
> Using M APIs directly instead of reflection
Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
It’s unlikely, but still possible that something interesting will happen
during the 150 ms that DragWindows takes to slightly increase in size
before it gets hidden and replaced by the framework DND drag shadow.
This fix covers 2 possible events that can happen during that time:
1. The drag gets cancelled (for example because of an app uninstall).
Here, we eliminate a crash.
2. The user starts dragging the shadow. Before, this would start
scrolling the home page. Now, SystemDragDriver starts processing touch
events exactly as the InternalDragDriver would, until the growing
finishes. Afterwards, it switches to framework dragging.
Bug: 22609426
Change-Id: I73cc09fea45fcdcc6b75b13be1347da3e7c95509
* commit 'd21f9404da5c8cdc959b483a40876b02ced35e43':
Disabling auto restore of widgets. > Always show "Setup" button for a widget which has a config activity.
> Instead of resizing the rect for dragoutline in onDrow, store the resized rect itself
> Remove unnecessary inverse matrix calculation
Change-Id: If13c3c5aaecba5a1d3a4f5d39199ed82e9662c62
* commit 'd468ee90911bee4d83e119500b52df1984107411':
Reloading launcher whenever there is an external update to contentprovider, irrespective of the uri
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
This fixes perhaps an old bug.
If we started an accessible drag for an only item on a page,
then uninstalled the app while dragging, the page was removed
without unsetting its accessibility delegate. Later, the system asks
the delegate to do something, but the drag is over, and some pointers
are null, so everything crashes.
Fixing this.
Bug: 22028725
Change-Id: I85adcd42ae896603634994e20a7790792f7e84b1
(cherry picked from commit de1e67c388)
We don't want to start a framework DND (with drop shadow etc.) in the accessibility mode.
Besides, framework DND fails to start and immediately cancels the DND operation
if it's started in the accessibility mode. Presumably, this happens because
the finger doesn't press the screen when this happens.
The right solution is not to instantiate a drag driver at all when an accessible
DND starts, which is what this CL does.
Bug: 22028725
Change-Id: Ic743ba3f8de037c15d4e70e3b7687cdd3518b2a3
This fixes perhaps an old bug.
If we started an accessible drag for an only item on a page,
then uninstalled the app while dragging, the page was removed
without unsetting its accessibility delegate. Later, the system asks
the delegate to do something, but the drag is over, and some pointers
are null, so everything crashes.
Fixing this.
Bug: 22028725
Change-Id: I85adcd42ae896603634994e20a7790792f7e84b1
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
There was a jump upon a transition from DragView to the framework shadow
for hotseat icons (which are scaled down).
Bug: 22028725
Change-Id: If4f5ed4501836667ff3a8eaa9da4577bdf98e880
Upon the end if the growth animation for DragView, we hide DragView and
show the framework DND drag shadow. Rounding problems caused shifting of the
drag image by 1 pixel when the transition happened.
Bug: 22028725
Change-Id: I2a2275a6d18c1a10ceecaecf8a279c6d11d8c7d8