summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Vali Calinescu <vcalinescu@google.com> 2022-06-29 22:19:18 +0000
committer Vali Calinescu <vcalinescu@google.com> 2022-09-16 12:36:35 +0000
commitc022f353c5555d7253cecba35b71d9040bf21071 (patch)
tree2c7356693f3520728185ea0aa36a86f82dcc60b7 /libs/androidfw/StringPool.cpp
parent84e2c20b42f32eb387ac290f24968605044df6a4 (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions