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

Commit 521862de authored by George Mount's avatar George Mount
Browse files

Catch reentrancy while executing postponed transactions.

Bug 35349893

While executing postponed transactions, it was possible for
Fragments to call commitNow() or executePendingTransactions()
and therefore causing disallowed reentrancy.

This CL now prevents reentrancy while executing postponed
transactions.

Test: I11e10f4d9868a31b8b1616a051e381fe8c7af331

Change-Id: Icb0d4386657c35b4edf34f95dc48aa694e66b298
parent c535d122
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -1911,7 +1911,12 @@ final class FragmentManagerImpl extends FragmentManager implements LayoutInflate
            mTmpRecords = new ArrayList<>();
            mTmpRecords = new ArrayList<>();
            mTmpIsPop = new ArrayList<>();
            mTmpIsPop = new ArrayList<>();
        }
        }
        mExecutingActions = true;
        try {
            executePostponedTransaction(null, null);
            executePostponedTransaction(null, null);
        } finally {
            mExecutingActions = false;
        }
    }
    }


    public void execSingleAction(OpGenerator action, boolean allowStateLoss) {
    public void execSingleAction(OpGenerator action, boolean allowStateLoss) {