private void saveLastMotion(MotionEvent ev) {
        final int pointerCount = MotionEventCompat.getPointerCount(ev);
        for (int i = 0; i < pointerCount; i++) {
            final int pointerId = MotionEventCompat.getPointerId(ev, i);
            final float x = MotionEventCompat.getX(ev, i);
            final float y = MotionEventCompat.getY(ev, i);
            // Sometimes we can try and save last motion for a pointer never recorded in initial motion. In this case we just discard it.
            if (mLastMotionX != null && mLastMotionY != null
                    && mLastMotionX.length > pointerId && mLastMotionY.length > pointerId) {
                mLastMotionX[pointerId] = x;
                mLastMotionY[pointerId] = y;
            }
        }
    }
Like all callback events this must happen on the UI thread, but release
involves some extra semantics. During a release (mReleaseInProgress)
is the only time it is valid to call {@link #settleCapturedViewAt(int, int)}
or {@link #flingCapturedView(int, int, int, int)}.
app/src/main/java/home/smart/fly/animations/widget/slidepanel/ViewDragHelper.java