private boolean initSnappable(int x,int y){
  if ((Math.abs(mOldParam[0] - x) > mSensitivity) || (Math.abs(mOldParam[1] - y) > mSensitivity)) {
    mOldParam[0]=x;
    mOldParam[1]=y;
    discardTimeout();
    return false;
  }
  mOldParam[0]=x;
  mOldParam[1]=y;
  int newSnapGravity=0;
  if (x < mRange)   newSnapGravity=newSnapGravity | Gravity.LEFT;
  if (x > (mScreenWidth - mRange))   newSnapGravity=newSnapGravity | Gravity.RIGHT;
  if (y < mRange)   newSnapGravity=newSnapGravity | Gravity.TOP;
  if (y > (mScreenHeight - mRange))   newSnapGravity=newSnapGravity | Gravity.BOTTOM;
  mSnapWindowHolder.updateSnap(newSnapGravity);
  return mSnapWindowHolder.isSnapped;
}

private boolean initSnappable ( int x , int y ) { if ( ( Math . abs ( mOldParam [ 0 ] - x ) > mSensitivity ) || ( Math . abs ( mOldParam [ 1 ] - y ) > mSensitivity ) ) { mOldParam [ 0 ] = x ; mOldParam [ 1 ] = y ; discardTimeout ( ) ; return false ; } mOldParam [ 0 ] = x ; mOldParam [ 1 ] = y ; int newSnapGravity = 0 ; if ( x < mRange ) newSnapGravity = newSnapGravity | Gravity . LEFT ; if ( x > ( mScreenWidth - mRange ) ) newSnapGravity = newSnapGravity | Gravity . RIGHT ; if ( y < mRange ) newSnapGravity = newSnapGravity | Gravity . TOP ; if ( y > ( mScreenHeight - mRange ) ) newSnapGravity = newSnapGravity | Gravity . BOTTOM ; mSnapWindowHolder . updateSnap ( newSnapGravity ) ; return mSnapWindowHolder . isSnapped ; }
checks the range of the touch coordinates and set the respective side .
