diff options
author | Adam Powell <adamp@google.com> | 2011-08-07 17:20:17 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2011-08-07 17:20:17 -0700 |
commit | 9520251003cc3a321028bb80693749e5047eb3f8 (patch) | |
tree | 10dd17efac4a158dfbef0dc859dcd619a661fe76 | |
parent | 5d4967884132647a75d05bcc2ca1f9ce490b372f (diff) | |
download | frameworks_base-9520251003cc3a321028bb80693749e5047eb3f8.zip frameworks_base-9520251003cc3a321028bb80693749e5047eb3f8.tar.gz frameworks_base-9520251003cc3a321028bb80693749e5047eb3f8.tar.bz2 |
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
-rw-r--r-- | core/java/android/app/FragmentManager.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index 712b55f..70e6866 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -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) { |