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

Commit 7a6c24d4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Consider the source task while evaluating the launch-root-task" into...

Merge "Consider the source task while evaluating the launch-root-task" into sc-v2-dev am: cec3c3cb am: 4f090e0b

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

Change-Id: Ia0fa429b04649bd5535cda98c247740db2a0f54b
parents 848a1bb9 4f090e0b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1336,12 +1336,11 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
        for (int i = mLaunchRootTasks.size() - 1; i >= 0; --i) {
            if (mLaunchRootTasks.get(i).contains(windowingMode, activityType)) {
                final Task launchRootTask = mLaunchRootTasks.get(i).task;
                // Return the focusable root task for improving the UX with staged split screen.
                final TaskFragment adjacentTaskFragment = launchRootTask != null
                        ? launchRootTask.getAdjacentTaskFragment() : null;
                final Task adjacentRootTask =
                        adjacentTaskFragment != null ? adjacentTaskFragment.asTask() : null;
                if (adjacentRootTask != null && adjacentRootTask.isFocusedRootTaskOnDisplay()) {
                if (sourceTask != null && sourceTask.getRootTask() == adjacentRootTask) {
                    return adjacentRootTask;
                } else {
                    return launchRootTask;