summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2013-10-15 14:47:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-15 14:47:49 -0700
commitd5bda747971db5fc2dde78dcc5bb42e62659667d (patch)
tree06f4f07ad9d6667d8a5ceb9ac48409672df3bab2
parentd99b9fd3213fecbf987ab285228f985676ae86e5 (diff)
parent2cc95775750ccd46f3192c05804c38dc04c5d2d6 (diff)
downloadframeworks_base-d5bda747971db5fc2dde78dcc5bb42e62659667d.zip
frameworks_base-d5bda747971db5fc2dde78dcc5bb42e62659667d.tar.gz
frameworks_base-d5bda747971db5fc2dde78dcc5bb42e62659667d.tar.bz2
am 2cc95775: Merge "Fix possible crash in System UI" into klp-dev
* commit '2cc95775750ccd46f3192c05804c38dc04c5d2d6': Fix possible crash in System UI
-rw-r--r--packages/Keyguard/src/com/android/keyguard/PagedView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/PagedView.java b/packages/Keyguard/src/com/android/keyguard/PagedView.java
index 814ac982..9d237dc 100644
--- a/packages/Keyguard/src/com/android/keyguard/PagedView.java
+++ b/packages/Keyguard/src/com/android/keyguard/PagedView.java
@@ -1556,6 +1556,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
if (mTouchState == TOUCH_STATE_SCROLLING) {
final int activePointerId = mActivePointerId;
final int pointerIndex = ev.findPointerIndex(activePointerId);
+
+ if (pointerIndex == -1) return true;
+
final float x = ev.getX(pointerIndex);
final VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);