Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java +22 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,14 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback { mVelocityTracker.addMovement(createMotionEventForStackScroll(ev)); break; } case MotionEvent.ACTION_POINTER_DOWN: { final int index = ev.getActionIndex(); mActivePointerId = ev.getPointerId(index); mLastMotionX = (int) ev.getX(index); mLastMotionY = (int) ev.getY(index); mLastP = mSv.mLayoutAlgorithm.screenYToCurveProgress(mLastMotionY); break; } case MotionEvent.ACTION_MOVE: { if (mActivePointerId == INACTIVE_POINTER_ID) break; Loading @@ -182,6 +190,20 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback { mLastP = layoutAlgorithm.sCurve.xToP(mLastMotionY, layoutAlgorithm.mStackRect); break; } case MotionEvent.ACTION_POINTER_UP: { int pointerIndex = ev.getActionIndex(); int pointerId = ev.getPointerId(pointerIndex); if (pointerId == mActivePointerId) { // Select a new active pointer id and reset the motion state final int newPointerIndex = (pointerIndex == 0) ? 1 : 0; mActivePointerId = ev.getPointerId(newPointerIndex); mLastMotionX = (int) ev.getX(newPointerIndex); mLastMotionY = (int) ev.getY(newPointerIndex); mLastP = mSv.mLayoutAlgorithm.screenYToCurveProgress(mLastMotionY); mVelocityTracker.clear(); } break; } case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: { // Animate the scroll back if we've cancelled Loading Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java +22 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,14 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback { mVelocityTracker.addMovement(createMotionEventForStackScroll(ev)); break; } case MotionEvent.ACTION_POINTER_DOWN: { final int index = ev.getActionIndex(); mActivePointerId = ev.getPointerId(index); mLastMotionX = (int) ev.getX(index); mLastMotionY = (int) ev.getY(index); mLastP = mSv.mLayoutAlgorithm.screenYToCurveProgress(mLastMotionY); break; } case MotionEvent.ACTION_MOVE: { if (mActivePointerId == INACTIVE_POINTER_ID) break; Loading @@ -182,6 +190,20 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback { mLastP = layoutAlgorithm.sCurve.xToP(mLastMotionY, layoutAlgorithm.mStackRect); break; } case MotionEvent.ACTION_POINTER_UP: { int pointerIndex = ev.getActionIndex(); int pointerId = ev.getPointerId(pointerIndex); if (pointerId == mActivePointerId) { // Select a new active pointer id and reset the motion state final int newPointerIndex = (pointerIndex == 0) ? 1 : 0; mActivePointerId = ev.getPointerId(newPointerIndex); mLastMotionX = (int) ev.getX(newPointerIndex); mLastMotionY = (int) ev.getY(newPointerIndex); mLastP = mSv.mLayoutAlgorithm.screenYToCurveProgress(mLastMotionY); mVelocityTracker.clear(); } break; } case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: { // Animate the scroll back if we've cancelled Loading