Separate and add more SizeCompat tests; add Display Builder
The number of SizeCompat tests is growing so this separates them out into their own class. Additionally, it streamlines display and activity creation for the variety of scenarios that need testing and facilitates consistent display creation for tests (previous code would create displays based on the device display which meant the tests would potentially test different things on different devices). Also added a Builder to TestActivityDisplay. This makes it possible to create displays with/without notch and custom windowingmode/rotatibility/density/etc. Also fixed a small bug where aspect-ratio was calculated incorrectly. Some SizeCompat tests were added too: testFixedAspOrientChangeOrient to verify that a sizecompat app can still change fixed orientation properly testMoveToDifferentOrientDisplay to verify that a sizecompat app properly moves between different non-rotateble displays testLetterboxFullscreenBounds to sanity check that sizecompat apps start properly when letterboxed by policy testFixedOrientRotateCutoutDisplay to verify that a sizecompat app stays fixed when on a rotating display with cutout. Bug: 138594779 Test: this Change-Id: Ic78374ae9e58297c609349c382efc6738521872c
Loading
Please register or sign in to comment