Merge "Adding delay upon user interaction to prevent the new-app animation from taking over your phone. (Bug 6248609)"

This commit is contained in:
Winson Chung
2012-04-12 10:55:11 -07:00
committed by Android (Google) Code Review
4 changed files with 149 additions and 42 deletions
@@ -440,6 +440,19 @@ public class DragController {
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 @@ public class DragController {
mLastDropTarget = null;
break;
case MotionEvent.ACTION_UP:
mLastTouchUpTime = System.currentTimeMillis();
if (mDragging) {
PointF vec = isFlingingToDelete(mDragObject.dragSource);
if (vec != null) {