Change fragment removal order for fragment replacement.
Before this patch it for loop was accessing mManager.mAdded elements using an integer index and also removing the fragments from mAdded using mManager.removeFragment(). Bug: 24693644 Change-Id: I8e32fffa9f65c2795141f61670956740399960e4
This commit is contained in:
@@ -719,7 +719,7 @@ final class BackStackRecord extends FragmentTransaction implements
|
||||
Fragment f = op.fragment;
|
||||
int containerId = f.mContainerId;
|
||||
if (mManager.mAdded != null) {
|
||||
for (int i = 0; i < mManager.mAdded.size(); i++) {
|
||||
for (int i = mManager.mAdded.size() - 1; i >= 0; i--) {
|
||||
Fragment old = mManager.mAdded.get(i);
|
||||
if (FragmentManagerImpl.DEBUG) {
|
||||
Log.v(TAG,
|
||||
|
||||
Reference in New Issue
Block a user