diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-05-29 15:54:16 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-05-29 15:54:59 -0700 |
commit | ab66067defad22a632c390df8d0afaecc04bbe19 (patch) | |
tree | 700ffbb0e3ce639327d72f238b98d1b41a6d2f2b | |
parent | 0512a6de57ebe8af9722964c6ade74b6d3df6175 (diff) | |
download | Launcher3-ab66067defad22a632c390df8d0afaecc04bbe19.tar.gz |
Update displacement on ACTION_UP as well, in case ACTION_UP and came in a different frame
than last ACTION_MOVE
Bug: 80292740
Change-Id: Ie75ac3ebb74024073965a7455a6503e8ed3f6d99
-rw-r--r-- | quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java index 23357ea597..c856282636 100644 --- a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java +++ b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java @@ -185,7 +185,7 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC case ACTION_UP: { TraceHelper.endSection("TouchInt"); - finishTouchTracking(); + finishTouchTracking(ev); break; } } @@ -268,8 +268,10 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC * Called when the gesture has ended. Does not correlate to the completion of the interaction as * the animation can still be running. */ - private void finishTouchTracking() { + private void finishTouchTracking(MotionEvent ev) { if (mPassedInitialSlop && mInteractionHandler != null) { + mInteractionHandler.updateDisplacement(getDisplacement(ev) - mStartDisplacement); + mVelocityTracker.computeCurrentVelocity(1000, ViewConfiguration.get(this).getScaledMaximumFlingVelocity()); |