public void removeActiveIndex ( final int index ) { boolean found = false ; for ( Iterator < AtomicInteger > iterator = mActiveIndexes . iterator ( ) ; iterator . hasNext ( ) && ! found ; ) { if ( iterator . next ( ) . get ( ) == index ) { iterator . remove ( ) ; found = true ; } } if ( mActiveIndexes . isEmpty ( ) ) { insertPending ( ) ; } }
Clear the active state for given index . Will insert any pending pairs if this call leads to a state where there are no active pairs .