public boolean adjustGranularityAt(AccessibilityNodeInfoCompat node,int direction){
  setLockedNode(node);
  final int count=mSupportedGranularities.size();
  int currentIndex=mSupportedGranularities.indexOf(mCurrentGranularity);
  int nextIndex;
  nextIndex=(currentIndex + direction) % count;
  if (nextIndex < 0) {
    nextIndex=count - 1;
  }
  mCurrentGranularity=mSupportedGranularities.get(nextIndex);
  mSavedGranularity=mCurrentGranularity;
  return nextIndex != currentIndex;
}

public boolean adjustGranularityAt ( AccessibilityNodeInfoCompat node , int direction ) { setLockedNode ( node ) ; final int count = mSupportedGranularities . size ( ) ; int currentIndex = mSupportedGranularities . indexOf ( mCurrentGranularity ) ; int nextIndex ; nextIndex = ( currentIndex + direction ) % count ; if ( nextIndex < 0 ) { nextIndex = count - 1 ; } mCurrentGranularity = mSupportedGranularities . get ( nextIndex ) ; mSavedGranularity = mCurrentGranularity ; return nextIndex != currentIndex ; }
locks navigation within the specified node , if not already locked , and adjusts the current granularity in the specified direction .
