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

Commit 9496aad9 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Mark the task as reusable while clearing activities in the Task" into...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20513753



Change-Id: I0c6db0a2d1c35d66dbaac3b099576a4adbfc12a8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 61abb8f1 d7ab244c
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -5150,7 +5150,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();