From 1310e094b5430c6e1eb59fbff386d5fac4013460 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 29 Nov 2017 14:36:12 -0800 Subject: Adding pointer index check to recents touch handler. - Also fix issue with wrong pointer index used to update last position when pointer changes Bug: 65030830 Test: Manual - multitouch in recents Change-Id: I75249594f48619b123b79e0188a0dc05a52b5416 --- .../com/android/systemui/recents/views/TaskStackViewTouchHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java index bfaa8cdb8e27..c91cdfc379c4 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java @@ -256,6 +256,9 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback { } case MotionEvent.ACTION_MOVE: { int activePointerIndex = ev.findPointerIndex(mActivePointerId); + if (activePointerIndex == -1) { + break; + } int y = (int) ev.getY(activePointerIndex); int x = (int) ev.getX(activePointerIndex); if (!mIsScrolling) { -- cgit v1.2.3-59-g8ed1b