Display-level relative display rotation should be 0

Because duh. DisplayContent is root, so it can't have a
relative rotation.

The problem is that RootWindowContainer ends up with the
default display's rotation because we store the "global"
configuration at that level. This is a legacy thing, so
until we clean that up, we have to just fix things at the
display level.

Bug: 249250882
Test: atest ChangeAppRotationTest, look at the trace and see that
      the recording display doesn't get rotated.
Change-Id: I76dc12be8ba934799dbc2ade3e00476f73bf3c71
This commit is contained in:
Evan Rosky
2022-09-29 22:59:27 +00:00
parent 3fd2b83e1f
commit 657cc738e9

View File

@@ -6729,4 +6729,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
DisplayContent asDisplayContent() {
return this;
}
@Override
@Surface.Rotation
int getRelativeDisplayRotation() {
// Display is the root, so it's not rotated relative to anything.
return Surface.ROTATION_0;
}
}