am d5bda747: am 2cc95775: Merge "Fix possible crash in System UI" into klp-dev

* commit 'd5bda747971db5fc2dde78dcc5bb42e62659667d':
  Fix possible crash in System UI
This commit is contained in:
Jim Miller
2013-10-15 16:17:06 -07:00
committed by Android Git Automerger

View File

@@ -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);