summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorTiger Huang <tigerhuang@google.com>2019-01-29 22:56:48 +0800
committerTiger Huang <tigerhuang@google.com>2019-02-14 14:14:04 +0800
commit3d2b89840f7493ee0cb5d6e24caabb2ebcc616c5 (patch)
treedb55f3131f7fbb053e0dea4c6d92547f3790cb21 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent9c6db23f79371ac1a7200fc013739d46cd35a031 (diff)
Fix rotation if the shape of display is close to square
For a close-to-square device, the user won't get reasonable benefits when the content on display is rotated. Worse, the rotation forces the user to turn their device into an unnatural orientation. In this CL, if the non-decor aspect ratio of a display is less than config_closeToSquareDisplayMaxAspectRatio, and the device is configured to force default orientation, we will ignore all the orientation requests on the display, and keep the orientation as the user rotation. For the activity which has a minAspectRatio, the logic will take account into its preferred orientation while computing its bounds. So the shape of bounds given to the app can meet its expectation. Bug: 123507947 Test: atest AspectRatioTests DisplayRotationTests Test: Manual test with wm size command and simulated display cutout Change-Id: If99a89d59c805cfc0d305a66067643ce35b3f2bd
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions