Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b981d02 authored by Adam Powell's avatar Adam Powell Committed by android-build-merger
Browse files

Merge "Less lazy child FragmentManager creation" into nyc-dev

am: 6437dac3

* commit '6437dac3':
  Less lazy child FragmentManager creation

Change-Id: Ic5917acbe07f67a577ce693680c132d07519d34a
parents e706e6cc 6437dac3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1486,6 +1486,10 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
        final int version = context != null ? context.getApplicationInfo().targetSdkVersion : 0;
        if (version >= Build.VERSION_CODES.N) {
            restoreChildFragmentState(savedInstanceState, true);
            if (mChildFragmentManager != null
                    && !mChildFragmentManager.isStateAtLeast(Fragment.CREATED)) {
                mChildFragmentManager.dispatchCreate();
            }
        }
    }

+4 −0
Original line number Diff line number Diff line
@@ -870,6 +870,10 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
        }
    }

    boolean isStateAtLeast(int state) {
        return mCurState >= state;
    }

    void moveToState(Fragment f, int newState, int transit, int transitionStyle,
            boolean keepActive) {
        if (DEBUG && false) Log.v(TAG, "moveToState: " + f