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

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

Use orientation to determine size compat bounds

If a display is resized to different orientation, the mapping between
rotation and orientation is also inverted. So it may be inaccurate to
calculate compat bounds according to current rotation. While the given
orientation is better because it is relative to the width and height.
That makes sure either the requested orientation takes effect or just
inherit parent's configuration.

Also consider the following cases:
 - Display rotation changed but activity orientation is not changed.
   The display is forced rotated and the activity is fixed orientation.
 - Display orientation changed but rotation is not changed.
   Resize fixed rotation display between portrait and landscape.

Fixes: 166822610
Test: SizeCompatTests#testFixedScreenBoundsWhenDisplaySizeChanged
Change-Id: I329325c134f37e08ecdb6311bff5cd331e3bc7c3
parent faead856
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