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

Commit 2a2e25c4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure activity added to existing task if not resetting the task"

parents 07ae3bec 2dcb1274
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1834,7 +1834,9 @@ class ActivityStarter {
     */
    private void complyActivityFlags(TaskRecord targetTask, ActivityRecord reusedActivity) {
        ActivityRecord targetTaskTop = targetTask.getTopActivity();
        if (reusedActivity != null && (mLaunchFlags & FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
        final boolean resetTask =
                reusedActivity != null && (mLaunchFlags & FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0;
        if (resetTask) {
            targetTaskTop = mTargetStack.resetTaskIfNeededLocked(targetTaskTop, mStartActivity);
        }

@@ -1926,7 +1928,7 @@ class ActivityStarter {
            } else if (reusedActivity == null) {
                mAddingToTask = true;
            }
        } else if ((mLaunchFlags & FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) == 0) {
        } else if (!resetTask) {
            // In this case an activity is being launched in to an existing task, without
            // resetting that task. This is typically the situation of launching an activity
            // from a notification or shortcut. We want to place the new activity on top of the