navigation/runtime/src/main/java/androidx/navigation/NavController.java
public void restoreState(@Nullable Bundle navState) {
        if (navState == null) {
            return;
        }

        mGraphId = navState.getInt(KEY_GRAPH_ID);
        mNavigatorStateToRestore = navState.getBundle(KEY_NAVIGATOR_STATE);
        mBackStackToRestore = navState.getIntArray(KEY_BACK_STACK_IDS);
        if (mGraphId != 0) {
            // Set the graph right away, onGraphCreated will handle restoring the
            // rest of the saved state
            setGraph(mGraphId);
        }
    }
/**
     * Restores all navigation controller state from a bundle.
     *
     * <p>State may be saved to a bundle by calling {@link #saveState()}.
     * Restoring controller state is the responsibility of a {@link NavHost}.</p>
     *
     * @param navState state bundle to restore
     */
Restores all navigation controller state from a bundle.
State may be saved to a bundle by calling  #saveState().
Restoring controller state is the responsibility of a  NavHost.

@param navState state bundle to restore
Restores all navigation controller state from a bundle . State may be saved to a bundle by calling #saveState () . Restoring controller state is the responsibility of a NavHost . @param navState state bundle to restore
public void restoreState(@Nullable Bundle navState) {
        if (navState == null) {
            return;
        }
        mGraphId = navState.getInt(KEY_GRAPH_ID);
        mNavigatorStateToRestore = navState.getBundle(KEY_NAVIGATOR_STATE);
        mBackStackToRestore = navState.getIntArray(KEY_BACK_STACK_IDS);
        if (mGraphId != 0) {
            setGraph(mGraphId);
        }
    }
public void restoreState ( @ Nullable Bundle navState ) { if ( navState == null ) { return ; } mGraphId = navState . getInt ( KEY_GRAPH_ID ) ; mNavigatorStateToRestore = navState . getBundle ( KEY_NAVIGATOR_STATE ) ; mBackStackToRestore = navState . getIntArray ( KEY_BACK_STACK_IDS ) ; if ( mGraphId != 0 ) { setGraph ( mGraphId ) ; } }
Restores all navigation controller state from a bundle.
Restores all navigation controller state from a bundle .
// Set the graph right away, onGraphCreated will handle restoring the // rest of the saved state