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

Commit c5045a32 authored by George Mount's avatar George Mount Committed by android-build-merger
Browse files

Merge "Allow committing allowing state loss on detached FragmentManager." into...

Merge "Allow committing allowing state loss on detached FragmentManager." into oc-dev am: e9679db5
am: 834752d4

Change-Id: I8f60a0e8b45d6c9c0944b47d867cbb5727fafc7a
parents d8113d32 834752d4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1844,6 +1844,10 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
        }
        synchronized (this) {
            if (mDestroyed || mHost == null) {
                if (allowStateLoss) {
                    // This FragmentManager isn't attached, so drop the entire transaction.
                    return;
                }
                throw new IllegalStateException("Activity has been destroyed");
            }
            if (mPendingActions == null) {
@@ -1960,6 +1964,10 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
    }

    public void execSingleAction(OpGenerator action, boolean allowStateLoss) {
        if (allowStateLoss && (mHost == null || mDestroyed)) {
            // This FragmentManager isn't attached, so drop the entire transaction.
            return;
        }
        ensureExecReady(allowStateLoss);
        if (action.generateOps(mTmpRecords, mTmpIsPop)) {
            mExecutingActions = true;