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

Commit 2106f3e9 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

am: 8dd12a52

* commit '8dd12a52':
  Less lazy child FragmentManager creation

Change-Id: I67296b51104728619a9be0b589fb17e5d25dcd66
parents a1188ca7 8dd12a52
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