diff options
| author | 2023-12-11 16:05:13 +0000 | |
|---|---|---|
| committer | 2023-12-12 07:30:34 +0000 | |
| commit | 51afcf8b187f183daf422f388106b5fecf1b6144 (patch) | |
| tree | 4a6c92a2ac22932483582d3e78b21a9bded1e840 /libs/androidfw/StringPool.cpp | |
| parent | bdd1caebf987f636339aa7992cb328b8c333493f (diff) | |
Return natural orientation according to available screen size
It aligns the same policy as
TaskFragment#computeConfigResourceOverrides to resolve orientation.
Otherwise when the display size is close to square. A nosensor
activity may get natural orientation in portrait but get task
orientation in landscape, which causes unexpected letterbox.
e.g. physical screen size is 1000x1010 -> portrait
But screenWidthDp=500, screenHeightDp=490 (occupied by insets)
-> landscape
Bug: 233855302
Test: atest DisplayContentTests#testOrientationForAspectRatio
Change-Id: I6d148e6dc5fe543f20c0b5aef0fc9255c2e481aa
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions