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

Skip to content
Commit c022f353 authored by Vali Calinescu's avatar Vali Calinescu
Browse files

Fix display cutout vertical centering bug

The current way of computing bounds inside `updateResolvedBoundsPosition` is broken because it can result in negative results for the top bounds if the aspect ratio restriction makes the bounds of the app larger than parentAppBounds. We are fixing this by matching the parentBounds inside `applyAspecRatio` if we find out that the new bounds computed here overlap with the parentAppBounds.

We also found out that the vertical and horizontal insets have separate treatment for the aspect ratio restriction, so we decided to cut both insets inside `applyAspectRatio` and only add back the vertical insets inside `updateResolvedBoundsPosition` if the top of the appBounds aligns with the top of parentAppBounds so that the app content gets aligned with the status bar.

Bug: 236226770
Test: atest WmTests:SizeCompatTests
Change-Id: I183b5dded5276b50f6f8a2d56c09774ab76818a4
parent 84e2c20b
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