summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorBryce Lee <brycelee@google.com>2017-03-30 09:34:15 -0700
committerBryce Lee <brycelee@google.com>2017-03-31 21:34:30 -0700
commit7566d76c618a48b8dcc981dac3cab1e42f864063 (patch)
treeaa34d69d39a9e42db2b0f96dce2d86f0f8e68093 /tools/aapt2/diff/Diff.cpp
parent8371f96e9967c93e482dfb995c6092b2e7b78cec (diff)
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
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions