[1/n] Create AppCompatLetterboxPolicyState abstraction
The AppCompatLetterboxPolicyState abstraction allows to
decouple the letterbox state from the actual letterbox
presentation implementation.
LegacyLetterboxPolicyState is the existing implementation
which creates and updates surfaces depending on letterbox bounds.
ShellLetterboxPolicyState is the implementation which delegates
the letterbox presentation to Shell. It basically only handles
inner and outer bounds along with insets. They are useful for
creating/updating Surfaces which will exist in shell.
The AppCompatLetterboxUtils class contains methods used by different
AppCompatLetterboxPolicyState implementations.
Flag: com.android.window.flags.app_compat_refactoring
Bug: 309593314
Test: atest WmTests:LetterboxTest
Test: atest WmTests:AppCompatLetterboxPolicyTest
Test: atest WmTests:AppCompatLetterboxUtilsTest
Change-Id: I2c0bd7264c73936093909eee05477d0937270762
5 files changed