Add app bounds to configuration.
The system previously overrode the display size for a specific scope (task/activity/etc.) by setting the associated Configuration's screenWidthDp/screenHeightDp. This leads to two issues. First, the conversion of screen size from pixels to display independent pixels and then upconverting later on leads to rounding errors. Secondly, the screenWidthDp and screenHeightDp values account for insets, such as the status bar. These however are not reflected in the display size when returned from Display#getMetrics/getSize. This changelist addresses the issue by adding a Rect value to Configuration which stores the app display bounds. This is always set at the display level and overridden as appropriate. As the proper app insets are accounted for at the root configuration, all overrides (outside of specific exceptions) are the result of the intersection between the requested bound and the parent bound. Change-Id: I2c4fcd0bee92af12aabbca258de05b4ec061d0e1 Fixes: 34338931 Bug: 36812336 Bug: 36676979 Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsAppTestCases android.app.cts.AspectRatioTests Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerDisplayTests Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Loading
Please register or sign in to comment