Fix stage split rotation
On current implementation, it will use DC.getLastOrientation in TDA#getOrientation, it will got SCREEN_ORIENTATION_NOSENSOR so it didn't rotate. Fix this by adding checking if TDA non floating root task is visible and creadted by organize, it should all use SCREEN_ORIENTATION_UNSPECIFIED. Fix: 194158966 Test: active stage split and rotate divice Change-Id: Id78ebae24150e5d5f901b0f85c5a86cefe1d453f
This commit is contained in:
@@ -780,10 +780,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user