public void endFakeDrag(){
  if (!mFakeDragging) {
    throw new IllegalStateException("No fake drag in progress. Call beginFakeDrag first.");
  }
  final VelocityTracker velocityTracker=mVelocityTracker;
  velocityTracker.computeCurrentVelocity(1000,mMaximumVelocity);
  int initialVelocity=(int)VelocityTrackerCompat.getYVelocity(velocityTracker,mActivePointerId);
  mPopulatePending=true;
  if ((Math.abs(initialVelocity) > mMinimumVelocity) || Math.abs(mInitialMotionX - mLastMotionX) >= (getWidth() / 3)) {
    if (mLastMotionX > mInitialMotionX) {
      setCurrentItemInternal(mCurItem - 1,true,true);
    }
 else {
      setCurrentItemInternal(mCurItem + 1,true,true);
    }
  }
 else {
    setCurrentItemInternal(mCurItem,true,true);
  }
  endDrag();
  mFakeDragging=false;
}

public void endFakeDrag ( ) { if ( ! mFakeDragging ) { throw new IllegalStateException ( "No fake drag in progress. Call beginFakeDrag first." ) ; } final VelocityTracker velocityTracker = mVelocityTracker ; velocityTracker . computeCurrentVelocity ( 1000 , mMaximumVelocity ) ; int initialVelocity = ( int ) VelocityTrackerCompat . getYVelocity ( velocityTracker , mActivePointerId ) ; mPopulatePending = true ; if ( ( Math . abs ( initialVelocity ) > mMinimumVelocity ) || Math . abs ( mInitialMotionX - mLastMotionX ) >= ( getWidth ( ) / 3 ) ) { if ( mLastMotionX > mInitialMotionX ) { setCurrentItemInternal ( mCurItem - 1 , true , true ) ; } else { setCurrentItemInternal ( mCurItem + 1 , true , true ) ; } } else { setCurrentItemInternal ( mCurItem , true , true ) ; } endDrag ( ) ; mFakeDragging = false ; }
end a fake drag of the pager .
