private DragLock computeDragLock(float scrollDrag,float discardDrag){
  scrollDrag=Math.abs(scrollDrag);
  discardDrag=Math.abs(discardDrag);
  DragLock hintLock=(discardDrag * DRAG_ANGLE_THRESHOLD) > scrollDrag ? DragLock.DISCARD : DragLock.SCROLL;
  long timeMillisecond=System.currentTimeMillis();
  if ((timeMillisecond - mLastScrollUpdate) > DRAG_TIME_THRESHOLD) {
    mDragLock=DragLock.NONE;
  }
  if ((mDragLock == DragLock.NONE && Math.abs(scrollDrag - discardDrag) > mMinScrollMotion) || (mDragLock == DragLock.DISCARD && discardDrag > mMinScrollMotion) || (mDragLock == DragLock.SCROLL && scrollDrag > mMinScrollMotion)) {
    mLastScrollUpdate=timeMillisecond;
    if (mDragLock == DragLock.NONE) {
      mDragLock=hintLock;
    }
  }
  return mDragLock == DragLock.NONE ? hintLock : mDragLock;
}

private DragLock computeDragLock ( float scrollDrag , float discardDrag ) { scrollDrag = Math . abs ( scrollDrag ) ; discardDrag = Math . abs ( discardDrag ) ; DragLock hintLock = ( discardDrag * DRAG_ANGLE_THRESHOLD ) > scrollDrag ? DragLock . DISCARD : DragLock . SCROLL ; long timeMillisecond = System . currentTimeMillis ( ) ; if ( ( timeMillisecond - mLastScrollUpdate ) > DRAG_TIME_THRESHOLD ) { mDragLock = DragLock . NONE ; } if ( ( mDragLock == DragLock . NONE && Math . abs ( scrollDrag - discardDrag ) > mMinScrollMotion ) || ( mDragLock == DragLock . DISCARD && discardDrag > mMinScrollMotion ) || ( mDragLock == DragLock . SCROLL && scrollDrag > mMinScrollMotion ) ) { mLastScrollUpdate = timeMillisecond ; if ( mDragLock == DragLock . NONE ) { mDragLock = hintLock ; } } return mDragLock == DragLock . NONE ? hintLock : mDragLock ; }
determines which action was specified by the user ' s drag .
