fragment/src/androidTest/java/androidx/fragment/app/FragmentManagerNonConfigTest.java
@Test
    @SdkSuppress(maxSdkVersion = Build.VERSION_CODES.O_MR1)
    public void nonConfigStop() throws Throwable {
        FragmentActivity activity = FragmentActivityUtils.recreateActivity(mActivityRule,
                mActivityRule.getActivity());

        // A fragment was added in onStop(), but we shouldn't see it here...
        assertTrue(activity.getSupportFragmentManager().getFragments().isEmpty());
    }
/**
     * When a fragment is added during onStop(), it shouldn't show up in non-config
     * state when restored before P, because OnSaveInstanceState was already called.
     */
When a fragment is added during onStop(), it shouldn't show up in non-config
state when restored before P, because OnSaveInstanceState was already called.
When a fragment is added during onStop () it shouldn ' t show up in non - config state when restored before P because OnSaveInstanceState was already called .
@Test
    @SdkSuppress(maxSdkVersion = Build.VERSION_CODES.O_MR1)
    public void nonConfigStop() throws Throwable {
        FragmentActivity activity = FragmentActivityUtils.recreateActivity(mActivityRule,
                mActivityRule.getActivity());
        assertTrue(activity.getSupportFragmentManager().getFragments().isEmpty());
    }
@ Test @ SdkSuppress ( maxSdkVersion = Build . VERSION_CODES . O_MR1 ) public void nonConfigStop ( ) throws Throwable { FragmentActivity activity = FragmentActivityUtils . recreateActivity ( mActivityRule , mActivityRule . getActivity ( ) ) ; assertTrue ( activity . getSupportFragmentManager ( ) . getFragments ( ) . isEmpty ( ) ) ; }
When a fragment is added during onStop(), it shouldn't show up in non-config
 state when restored before P, because OnSaveInstanceState was already called.
When a fragment is added during onStop () it shouldn ' t show up in non - config state when restored before P because OnSaveInstanceState was already called .
// A fragment was added in onStop(), but we shouldn't see it here...