From e46c7613a30a0e7225e5424abfe5bb215a8001dc Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 10 Jun 2021 14:50:17 -0700 Subject: [PATCH] Ensure we pass the pointer id to the velocity tracker and not the index Bug: 189259717 Test: Swipe up with two fingers using accessibility + gesture nav Change-Id: Icef48276c6da824d43dea0f7d567691af9cdedaf --- .../src/com/android/quickstep/util/MotionPauseDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java b/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java index 8151d412ab..1ed2da3051 100644 --- a/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java +++ b/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java @@ -121,7 +121,7 @@ public class MotionPauseDetector { mForcePauseTimeout.setAlarm(mMakePauseHarderToTrigger ? HARDER_TRIGGER_TIMEOUT : FORCE_PAUSE_TIMEOUT); - float newVelocity = mVelocityProvider.addMotionEvent(ev, pointerIndex); + float newVelocity = mVelocityProvider.addMotionEvent(ev, ev.getPointerId(pointerIndex)); if (mPreviousVelocity != null) { checkMotionPaused(newVelocity, mPreviousVelocity, ev.getEventTime()); }