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

Commit 556897f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix: fragment destroyed improperly during pop."

parents 0497eecf 8c4fa361
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2077,8 +2077,6 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
            } else {
                record.trackAddedFragmentsInPop(mTmpAddedFragments);
            }
            final int bumpAmount = isPop ? -1 : 1;
            record.bumpBackStackNesting(bumpAmount);
            addToBackStack = addToBackStack || record.mAddToBackStack;
        }
        mTmpAddedFragments.clear();
@@ -2281,8 +2279,10 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
            final BackStackRecord record = records.get(i);
            final boolean isPop = isRecordPop.get(i);
            if (isPop) {
                record.bumpBackStackNesting(-1);
                record.executePopOps();
            } else {
                record.bumpBackStackNesting(1);
                record.executeOps();
            }
        }