Fix letterbox and orientation request on DisplayAreaGroup
Before, with a multi displayarea policy setting, fixed-orientation app
may have incorrect bounds.
1. CompatDisplayInsets: use RootDisplayArea bounds as the mWidth and
mHeight
2. onDescendantOrientationChanged: stop calling super method if ignore,
otherwise it can return true from DC even though DAG is ignored. We
want it to be hanled by Task in such case.
3. DAG should adjust the configuration orientation based on its
dimensions, so a width > height DAG is considered landscape.
4. getRequestedConfigurationOrientation() should only reverse the
orientation at DC level, so that Task and ActivityRecord can handle
the bounds based on the request correctly.
5. Compare app bounds with RootDisplayArea bounds to check whether it
is letterboxed.
Bug: 155431879
Test: manual: test with a dual displayarea policy
Test: atest WmTests:SizeCompatTests
Test: atest WmTests:DisplayAreaTest
Test: atest WmTests:DisplayAreaGroupTest
Change-Id: I16277cb9984c87ed4bcd50b91e0d12c2c6bbd5b1
8 files changed