Merge "Fix stage split rotation" into sc-v2-dev

This commit is contained in:
Tony Huang
2021-07-23 02:54:09 +00:00
committed by Android (Google) Code Review

View File

@@ -780,10 +780,12 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
} }
return SCREEN_ORIENTATION_UNSPECIFIED; return SCREEN_ORIENTATION_UNSPECIFIED;
} else { } else {
// Apps and their containers are not allowed to specify an orientation of full screen // Apps and their containers are not allowed to specify an orientation of non floating
// tasks created by organizer. The organizer handles the orientation instead. // visible tasks created by organizer. The organizer handles the orientation instead.
final Task task = getTopRootTaskInWindowingMode(WINDOWING_MODE_FULLSCREEN); final Task nonFloatingTopTask =
if (task != null && task.isVisible() && task.mCreatedByOrganizer) { getRootTask(t -> !t.getWindowConfiguration().tasksAreFloating());
if (nonFloatingTopTask != null && nonFloatingTopTask.mCreatedByOrganizer
&& nonFloatingTopTask.isVisible()) {
return SCREEN_ORIENTATION_UNSPECIFIED; return SCREEN_ORIENTATION_UNSPECIFIED;
} }
} }