Adding delay upon user interaction to prevent the new-app animation from taking over your phone. (Bug 6248609)
- Fixing issue where we might have been reading the db items while handling previous broadcast and adding db items to invalid positions
- Making items add alternating from the center page (as opposed to the current page)
- Re-adding the strict-mode fix (really requires 1. to be true)
- Adding flag for enabling strict mode exceptions
- Removing items from the new apps add list on uninstall-shortcut broadcast
Change-Id: I495e80bf5f8dbb4b87dd709460937d6f2a1e05e7
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index 2a1d65a..9a61db6 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -440,6 +440,19 @@
return mTmpPoint;
}
+ private long mLastTouchUpTime = -1;
+ long getLastGestureUpTime() {
+ if (mDragging) {
+ return System.currentTimeMillis();
+ } else {
+ return mLastTouchUpTime;
+ }
+ }
+
+ void resetLastGestureUpTime() {
+ mLastTouchUpTime = -1;
+ }
+
/**
* Call this from a drag source view.
*/
@@ -467,6 +480,7 @@
mLastDropTarget = null;
break;
case MotionEvent.ACTION_UP:
+ mLastTouchUpTime = System.currentTimeMillis();
if (mDragging) {
PointF vec = isFlingingToDelete(mDragObject.dragSource);
if (vec != null) {