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

Commit 04344384 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Update task top activity after applying launch flags" into sc-dev am: f0531b3f

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic2f374656969350b4e80f0aceaa207270930b340
parents e9b6324f f0531b3f
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -1989,6 +1989,13 @@ class ActivityStarter {
            return START_SUCCESS;
        }

        // The reusedActivity could be finishing, for example of starting an activity with
        // FLAG_ACTIVITY_CLEAR_TOP flag. In that case, use the top running activity in the
        // task instead.
        targetTaskTop = targetTaskTop.finishing
                ? targetTask.getTopNonFinishingActivity()
                : targetTaskTop;

        // At this point we are certain we want the task moved to the front. If we need to dismiss
        // any other always-on-top root tasks, now is the time to do it.
        if (targetTaskTop.canTurnScreenOn() && mService.mInternal.isDreaming()) {
@@ -2005,11 +2012,8 @@ class ActivityStarter {
        // We didn't do anything...  but it was needed (a.k.a., client don't use that intent!)
        // And for paranoia, make sure we have correctly resumed the top activity.
        resumeTargetRootTaskIfNeeded();
        // The reusedActivity could be finishing, for example of starting an activity with
        // FLAG_ACTIVITY_CLEAR_TOP flag. In that case, return the top running activity in the
        // task instead.
        mLastStartActivityRecord =
                targetTaskTop.finishing ? targetTask.getTopNonFinishingActivity() : targetTaskTop;
      
        mLastStartActivityRecord = targetTaskTop;
        return mMovedToFront ? START_TASK_TO_FRONT : START_DELIVERED_TO_TOP;
    }