summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Mariia Sandrikova <mariiasand@google.com> 2022-07-25 13:50:00 +0000
committer Mariia Sandrikova <mariiasand@google.com> 2023-01-05 01:36:04 +0000
commit5aa29ae51aebd56a934c76b0918c5d304ae3346d (patch)
tree7b4a19ab9a73dbb43f2d8b09bc574cd17067ecf7 /libs/androidfw/ApkParsing.cpp
parentfa71876cc023e55bd939cf7f39a991abbb2eb4f9 (diff)
Adjust smallestScreenWidthDp for letterbox
By definition, smallestScreenWidthDp is the smallest value of both screenWidthDp and screenHeightDp in both portrait and landscape orientations. When a different value is reported in smallestScreenWidthDp, the app can load incorrect layout. Also, move updateCompatDisplayInsets to ensureActivityConfiguration to guarantee that it is called after the full config is updated in ConfigurationContainer#onConfigurationChanged Revert "Revert "Adjust smallestScreenWidthDp for letterbox"" This reverts commit f20212adb868916170756b0300d3e21babba8a31. Reason for revert: Fixing the problem that led to the original revert: in the original CL, smallestScreenWidthDp for activities eligible for size-compat mode wasn't guaranteed to be constant and equal to a minimum between screenWidthDp and screenHeightDp because computeConfigResourceOverrides wasn't triggered from ActivityRecord with mCompatDisplayInsets passed as a parameter when activity was cold started in a configuration that didn't require letterboxing. Test: atest WmTests:SizeCompatTests Fix: 232406936 Change-Id: Ib4b88360312795097e33d422c444c0e855a06a7b
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions