summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-11-23 01:47:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-11-23 01:47:14 +0000
commit2c3c209beb4473e3fc5298fb21c2e4a429e3781d (patch)
treeb1b287a00306778495f1d710374df3c972cd3853
parent0faed91c21229c58b24b394dd70bec4a64787e48 (diff)
parent2ed36f4960111e331854206a9bdafe4496076107 (diff)
downloadbase-2c3c209beb4473e3fc5298fb21c2e4a429e3781d.tar.gz
Merge "RESTRICT AUTOMERGE Fix stage split rotation" into android12-gsi
-rw-r--r--services/core/java/com/android/server/wm/TaskDisplayArea.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/TaskDisplayArea.java b/services/core/java/com/android/server/wm/TaskDisplayArea.java
index ee4c629189dc..6ecc11094e53 100644
--- a/services/core/java/com/android/server/wm/TaskDisplayArea.java
+++ b/services/core/java/com/android/server/wm/TaskDisplayArea.java
@@ -800,10 +800,12 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
}
return SCREEN_ORIENTATION_UNSPECIFIED;
} else {
- // Apps and their containers are not allowed to specify an orientation of full screen
- // tasks created by organizer. The organizer handles the orientation instead.
- final Task task = getTopRootTaskInWindowingMode(WINDOWING_MODE_FULLSCREEN);
- if (task != null && task.isVisible() && task.mCreatedByOrganizer) {
+ // 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.
+ final Task nonFloatingTopTask =
+ getRootTask(t -> !t.getWindowConfiguration().tasksAreFloating());
+ if (nonFloatingTopTask != null && nonFloatingTopTask.mCreatedByOrganizer
+ && nonFloatingTopTask.isVisible()) {
return SCREEN_ORIENTATION_UNSPECIFIED;
}
}