Components/xamandroidsupportv4-18-19.1.0/lib/android/19.1.0/content/support/v4/src/java/android/support/v4/app/FragmentActivity.java
@Override
    public final Object onRetainNonConfigurationInstance() {
        if (mStopped) {
            doReallyStop(true);
        }

        Object custom = onRetainCustomNonConfigurationInstance();

        ArrayList<Fragment> fragments = mFragments.retainNonConfig();
        boolean retainLoaders = false;
        if (mAllLoaderManagers != null) {
            // prune out any loader managers that were already stopped and so
            // have nothing useful to retain.
            final int N = mAllLoaderManagers.size();
            LoaderManagerImpl loaders[] = new LoaderManagerImpl[N];
            for (int i=N-1; i>=0; i--) {
                loaders[i] = mAllLoaderManagers.valueAt(i);
            }
            for (int i=0; i<N; i++) {
                LoaderManagerImpl lm = loaders[i];
                if (lm.mRetaining) {
                    retainLoaders = true;
                } else {
                    lm.doDestroy();
                    mAllLoaderManagers.remove(lm.mWho);
                }
            }
        }
        if (fragments == null && !retainLoaders && custom == null) {
            return null;
        }
        
        NonConfigurationInstances nci = new NonConfigurationInstances();
        nci.activity = null;
        nci.custom = custom;
        nci.children = null;
        nci.fragments = fragments;
        nci.loaders = mAllLoaderManagers;
        return nci;
    }
/**
     * Retain all appropriate fragment and loader state.  You can NOT
     * override this yourself!  Use {@link #onRetainCustomNonConfigurationInstance()}
     * if you want to retain your own state.
     */
Retain all appropriate fragment and loader state.  You can NOT
override this yourself.  Use  #onRetainCustomNonConfigurationInstance()
if you want to retain your own state.
Retain all appropriate fragment and loader state . You can NOT override this yourself . Use #onRetainCustomNonConfigurationInstance () if you want to retain your own state .
@Override
    public final Object onRetainNonConfigurationInstance() {
        if (mStopped) {
            doReallyStop(true);
        }
        Object custom = onRetainCustomNonConfigurationInstance();
        ArrayList<Fragment> fragments = mFragments.retainNonConfig();
        boolean retainLoaders = false;
        if (mAllLoaderManagers != null) {
            final int N = mAllLoaderManagers.size();
            LoaderManagerImpl loaders[] = new LoaderManagerImpl[N];
            for (int i=N-1; i>=0; i--) {
                loaders[i] = mAllLoaderManagers.valueAt(i);
            }
            for (int i=0; i<N; i++) {
                LoaderManagerImpl lm = loaders[i];
                if (lm.mRetaining) {
                    retainLoaders = true;
                } else {
                    lm.doDestroy();
                    mAllLoaderManagers.remove(lm.mWho);
                }
            }
        }
        if (fragments == null && !retainLoaders && custom == null) {
            return null;
        }
        NonConfigurationInstances nci = new NonConfigurationInstances();
        nci.activity = null;
        nci.custom = custom;
        nci.children = null;
        nci.fragments = fragments;
        nci.loaders = mAllLoaderManagers;
        return nci;
    }
@ Override public final Object onRetainNonConfigurationInstance ( ) { if ( mStopped ) { doReallyStop ( true ) ; } Object custom = onRetainCustomNonConfigurationInstance ( ) ; ArrayList < Fragment > fragments = mFragments . retainNonConfig ( ) ; boolean retainLoaders = false ; if ( mAllLoaderManagers != null ) { final int N = mAllLoaderManagers . size ( ) ; LoaderManagerImpl loaders [ ] = new LoaderManagerImpl [ N ] ; for ( int i = N - 1 ; i >= 0 ; i -- ) { loaders [ i ] = mAllLoaderManagers . valueAt ( i ) ; } for ( int i = 0 ; i < N ; i ++ ) { LoaderManagerImpl lm = loaders [ i ] ; if ( lm . mRetaining ) { retainLoaders = true ; } else { lm . doDestroy ( ) ; mAllLoaderManagers . remove ( lm . mWho ) ; } } } if ( fragments == null && ! retainLoaders && custom == null ) { return null ; } NonConfigurationInstances nci = new NonConfigurationInstances ( ) ; nci . activity = null ; nci . custom = custom ; nci . children = null ; nci . fragments = fragments ; nci . loaders = mAllLoaderManagers ; return nci ; }
Retain all appropriate fragment and loader state.
Retain all appropriate fragment and loader state .
// prune out any loader managers that were already stopped and so // have nothing useful to retain.