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

Commit b9613ed1 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Mark the task as reusable while clearing activities in the Task" into tm-qpr-dev

parents 8ee0c719 52127d13
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -5183,7 +5183,16 @@ class Task extends TaskFragment {
        final Task task = taskTop.getTask();

        // If ActivityOptions are moved out and need to be aborted or moved to taskTop.
        final ActivityOptions topOptions = sResetTargetTaskHelper.process(task, forceReset);
        final ActivityOptions topOptions;

        // Set the task to be reused, so the TaskFragment#mClearedTaskForReuse can be set if the
        // embedded activities are finished while reset task.
        mReuseTask = true;
        try {
            topOptions = sResetTargetTaskHelper.process(task, forceReset);
        } finally {
            mReuseTask = false;
        }

        if (mChildren.contains(task)) {
            final ActivityRecord newTop = task.getTopNonFinishingActivity();