diff options
author | Adam Powell <adamp@google.com> | 2011-11-02 22:47:42 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-02 22:47:42 +0000 |
commit | e40b7136bf2718286482d15c410e43827f4dac91 (patch) | |
tree | 70b6c9acc11ffcb69c46afb733fc6d5a56825e14 | |
parent | 05c6756b5e3159fea91a1845c9fe7ff8ecf1228e (diff) | |
parent | b41d9f8a84a325241440b6e950dea6d240134823 (diff) | |
download | frameworks_base-e40b7136bf2718286482d15c410e43827f4dac91.zip frameworks_base-e40b7136bf2718286482d15c410e43827f4dac91.tar.gz frameworks_base-e40b7136bf2718286482d15c410e43827f4dac91.tar.bz2 |
am b41d9f8a: Merge "Fix bug 5557267 - [ViewPager] non-primary fragments unnecessary stopped if "defer start" is enabled" into ics-mr1
* commit 'b41d9f8a84a325241440b6e950dea6d240134823':
Fix bug 5557267 - [ViewPager] non-primary fragments unnecessary stopped if "defer start" is enabled
-rw-r--r-- | core/java/android/app/FragmentManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index 85aec4c..c4ba778 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -725,8 +725,9 @@ final class FragmentManagerImpl extends FragmentManager { // While removing a fragment, we can't change it to a higher state. newState = f.mState; } - // Defer start if requested; don't allow it to move to STARTED or higher. - if (f.mDeferStart && newState > Fragment.STOPPED) { + // Defer start if requested; don't allow it to move to STARTED or higher + // if it's not already started. + if (f.mDeferStart && f.mState < Fragment.STARTED && newState > Fragment.STOPPED) { newState = Fragment.STOPPED; } if (f.mState < newState) { |