summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2017-11-29 14:36:12 -0800
committer Winson Chung <winsonc@google.com> 2017-11-29 22:57:43 +0000
commit1310e094b5430c6e1eb59fbff386d5fac4013460 (patch)
tree819e312878119779761fa48b1ab7b3abe845c6ec
parent241d98785ac73c0d49fe682ff6b2873a2f121358 (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java3
1 files changed, 3 insertions, 0 deletions
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) {