Merge "Call noteStateNotSaved on child fragment managers." into oc-dev am: a62a3d8ec1

am: 4f5654cc8c

Change-Id: Ica919f836951c0c4aa970e6686f09c0f46dfa811
This commit is contained in:
George Mount
2017-04-06 02:20:01 +00:00
committed by android-build-merger
2 changed files with 14 additions and 1 deletions

View File

@@ -2608,6 +2608,12 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
}
}
void noteStateNotSaved() {
if (mChildFragmentManager != null) {
mChildFragmentManager.noteStateNotSaved();
}
}
@Deprecated
void performMultiWindowModeChanged(boolean isInMultiWindowMode) {
onMultiWindowModeChanged(isInMultiWindowMode);

View File

@@ -2893,8 +2893,15 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
public void noteStateNotSaved() {
mStateSaved = false;
final int addedCount = mAdded == null ? 0 : mAdded.size();
for (int i = 0; i < addedCount; i++) {
Fragment fragment = mAdded.get(i);
if (fragment != null) {
fragment.noteStateNotSaved();
}
}
}
public void dispatchCreate() {
mStateSaved = false;
dispatchMoveToState(Fragment.CREATED);