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

Commit 61fa2d46 authored by Aurimas Liutikas's avatar Aurimas Liutikas
Browse files

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
parent 8190e5dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,