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

Commit 569f8ab0 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

am: 2106f3e9

* commit '2106f3e9':
  Less lazy child FragmentManager creation

Change-Id: I1b07f7d3cac74cd782a5c4d8d85eb4bc2eab7d78
parents 5d3136a8 2106f3e9
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