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

Commit 95202510 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 5116342 - don't keep fragment state around once resumed

Clear out saved fragment/view state when a fragment is resumed in case
we didn't need to restore it. This keeps it from hanging around and
preventing proper save/restore behavior later.

Change-Id: Ie3fce5534ee4f8fdb4116281f9ac6a9cfa392561
parent 5d496788
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -829,6 +829,9 @@ final class FragmentManagerImpl extends FragmentManager {
                            throw new SuperNotCalledException("Fragment " + f
                                    + " did not call through to super.onResume()");
                        }
                        // Get rid of this in case we saved it and never needed it.
                        f.mSavedFragmentState = null;
                        f.mSavedViewState = null;
                    }
            }
        } else if (f.mState > newState) {