OSDN Git Service

Ignore motion event of invalid pointer
authorLucas Dupin <dupin@google.com>
Mon, 13 May 2019 20:49:17 +0000 (13:49 -0700)
committerLucas Dupin <dupin@google.com>
Mon, 13 May 2019 20:49:17 +0000 (13:49 -0700)
Test: swipe up with multiple fingers
Fixes: 132635371
Change-Id: I27fbb193affb1f073c3feb294ba51ad6e74ac4f1

packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java

index d051def..cd0019c 100644 (file)
@@ -180,7 +180,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
                 }
                 int index = event.findPointerIndex(mActivePointerId);
                 int touchSlop = mViewConfiguration.getScaledTouchSlop();
-                if (mCurrentSecurityView != null
+                if (mCurrentSecurityView != null && index != -1
                         && mStartTouchY - event.getY(index) > touchSlop) {
                     mIsDragging = true;
                     return true;