diff options
author | Jim Miller <jaggies@google.com> | 2013-05-23 14:08:18 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-23 14:08:18 -0700 |
commit | a62996e3c5e7f01a3e031a772dfebb7011942b06 (patch) | |
tree | 3ea19de126e46481cfecdc2fe31461d0cbe3176c /packages/Keyguard/src/com | |
parent | d078990429997788927d708e4e1c959ead5dfcac (diff) | |
parent | 2f567679f40ad0580928502972308ec540eeba3f (diff) | |
download | frameworks_base-a62996e3c5e7f01a3e031a772dfebb7011942b06.zip frameworks_base-a62996e3c5e7f01a3e031a772dfebb7011942b06.tar.gz frameworks_base-a62996e3c5e7f01a3e031a772dfebb7011942b06.tar.bz2 |
am 2f567679: am 2f48c4a7: Merge "Check for invalid pointer index in PagedView" into jb-mr2-dev
* commit '2f567679f40ad0580928502972308ec540eeba3f':
Check for invalid pointer index in PagedView
Diffstat (limited to 'packages/Keyguard/src/com')
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/PagedView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/PagedView.java b/packages/Keyguard/src/com/android/keyguard/PagedView.java index a3f5c24..881d14d 100644 --- a/packages/Keyguard/src/com/android/keyguard/PagedView.java +++ b/packages/Keyguard/src/com/android/keyguard/PagedView.java @@ -84,7 +84,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc private static final int MIN_SNAP_VELOCITY = 1500; private static final int MIN_FLING_VELOCITY = 250; - // We are disabling touch interaction of the widget region for factory ROM. + // We are disabling touch interaction of the widget region for factory ROM. private static final boolean DISABLE_TOUCH_INTERACTION = false; private static final boolean DISABLE_TOUCH_SIDE_PAGES = true; private static final boolean DISABLE_FLING_TO_DELETE = false; @@ -1348,6 +1348,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc if (mTouchState == TOUCH_STATE_SCROLLING) { // Scroll to follow the motion event final int pointerIndex = ev.findPointerIndex(mActivePointerId); + + if (pointerIndex == -1) return true; + final float x = ev.getX(pointerIndex); final float deltaX = mLastMotionX + mLastMotionXRemainder - x; |