@ UiThread public void rebindIfNeeded ( ) { ThreadUtils . ensureMainThread ( ) ; Iterator < RouterTransaction > backstackIterator = backstack . reverseIterator ( ) ; while ( backstackIterator . hasNext ( ) ) { RouterTransaction transaction = backstackIterator . next ( ) ; if ( transaction . controller . getNeedsAttach ( ) ) { performControllerChange ( transaction , null , true , new SimpleSwapChangeHandler ( false ) ) ; } else { setControllerRouter ( transaction . controller ) ; } } }
Attaches this Router s existing backstack to its container if one exists .