void flush ( ) { for ( int i = 0 ; i < filters . size ( ) ; i ++ ) { TouchFilter filter = filters . get ( i ) ; while ( filter . flush ( flushState ) ) { if ( MonocleSettings . settings . traceEventsVerbose ) { MonocleTrace . traceEvent ( "Flushing %s from %s" , flushState , filter ) ; } boolean consumed = false ; for ( int j = i + 1 ; j < filters . size ( ) && ! consumed ; j ++ ) { consumed = filters . get ( j ) . filter ( flushState ) ; } if ( ! consumed ) { touch . setState ( flushState ) ; } } } }
Flushes any remaining data in the pipeline possibly pushing more state objects to TouchInput .