Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 51afcf8b authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent bdd1caeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment