public boolean isFirstWindow(AccessibilityWindowInfo baseWindow,int windowType){
  int index=getWindowIndex(baseWindow);
  if (index <= 0) {
    return true;
  }
  for (int i=index - 1; i > 0; i--) {
    AccessibilityWindowInfo window=mWindows.get(i);
    if (window != null && window.getType() == windowType) {
      return false;
    }
  }
  return true;
}

public boolean isFirstWindow ( AccessibilityWindowInfo baseWindow , int windowType ) { int index = getWindowIndex ( baseWindow ) ; if ( index <= 0 ) { return true ; } for ( int i = index - 1 ; i > 0 ; i -- ) { AccessibilityWindowInfo window = mWindows . get ( i ) ; if ( window != null && window . getType ( ) == windowType ) { return false ; } } return true ; }
returns true if there is no window with windowtype before basewindow
