public final void incrementIdCounterTo(int id){
  int diff=id - mIdCounter.get();
  if (diff < 0)   return;
  mIdCounter.addAndGet(diff);
  updateSharedPreference();
}

public final void incrementIdCounterTo ( int id ) { int diff = id - mIdCounter . get ( ) ; if ( diff < 0 ) return ; mIdCounter . addAndGet ( diff ) ; updateSharedPreference ( ) ; }
ensures the counter is at least as high as the specified value . the counter should always point to an unused id ( which will be handed out next time a request comes in ) . exposed so that anything externally loading tabs and ids can set enforce new tabs start at the correct id . todo ( dfalcantara ) : reduce the visibility of this method once all tabmodels are united in how the ids are assigned ( crbug . com / 502384 ) .
