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

        assertThat(activity.getSupportFragmentManager().getFragments().size(), is(1));
    }
/**
     * When a fragment is added during onStop(), it shouldn't show up in non-config
     * state when restored after (>=) P, because OnSaveInstanceState isn't yet called.
     */
When a fragment is added during onStop(), it shouldn't show up in non-config
state when restored after (>=) P, because OnSaveInstanceState isn't yet called.
When a fragment is added during onStop () it shouldn ' t show up in non - config state when restored after ( > = ) P because OnSaveInstanceState isn ' t yet called .
@Test
    @SdkSuppress(minSdkVersion = Build.VERSION_CODES.P)
    public void nonConfigStopSavingFragment() throws Throwable {
        FragmentActivity activity = FragmentActivityUtils.recreateActivity(mActivityRule,
                mActivityRule.getActivity());
        assertThat(activity.getSupportFragmentManager().getFragments().size(), is(1));
    }
@ Test @ SdkSuppress ( minSdkVersion = Build . VERSION_CODES . P ) public void nonConfigStopSavingFragment ( ) throws Throwable { FragmentActivity activity = FragmentActivityUtils . recreateActivity ( mActivityRule , mActivityRule . getActivity ( ) ) ; assertThat ( activity . getSupportFragmentManager ( ) . getFragments ( ) . size ( ) , is ( 1 ) ) ; }
When a fragment is added during onStop(), it shouldn't show up in non-config
 state when restored after (>=) P, because OnSaveInstanceState isn't yet called.
When a fragment is added during onStop () it shouldn ' t show up in non - config state when restored after ( > = ) P because OnSaveInstanceState isn ' t yet called .