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

Commit 4fe908a4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add getAdjacentTaskFragment check for the split screen case" into...

Merge "Add getAdjacentTaskFragment check for the split screen case" into tm-dev am: d60f5664 am: 4ce0717d am: 64ac9ea4

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



Change-Id: I37b3d81261db4ae4bcb62f8eb705380641a52398
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a20a4a05 64ac9ea4
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -656,13 +656,15 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
        }

        // Apps and their containers are not allowed to specify an orientation of non floating
        // visible tasks created by organizer. The organizer handles the orientation instead.
        // visible tasks created by organizer and that has an adjacent task.
        final Task nonFloatingTopTask =
                getRootTask(t -> !t.getWindowConfiguration().tasksAreFloating());
        if (nonFloatingTopTask != null && nonFloatingTopTask.mCreatedByOrganizer
                && nonFloatingTopTask.isVisible()) {
                getTask(t -> !t.getWindowConfiguration().tasksAreFloating());
        if (nonFloatingTopTask != null) {
            final Task task = nonFloatingTopTask.getCreatedByOrganizerTask();
            if (task != null && task.getAdjacentTaskFragment() != null && task.isVisible()) {
                return SCREEN_ORIENTATION_UNSPECIFIED;
            }
        }

        final int orientation = super.getOrientation(candidate);
        if (orientation != SCREEN_ORIENTATION_UNSET