Prevent dragging widgets to another page in tests when starting a drag.
The function Launchable.startDrag it's supposed to grab and icon or widget and start the dragging by moving it only in the verticall position but because it uses the coordinates of the object before entering the SPRING_LOADED_STATE_ORDINAL state then the coordiates where it moves are outisde of the cell layout and it moves to a new page. This only happens if the phone is too slow and it triggers the page change, otherwise it would be too fast. To fix it, I'm moving the icon/widget to the center of the screen minus getStartDragThreshold() to ensure the drag is always triggered. Fix: 242323136 Fix: 244224955 Fix: 241019568 Fix: 241583798 Test: atest ReorderWidgets Change-Id: I0e431b994aa4a3d5c8be45b6c73263732553b36c
Loading
Please register or sign in to comment