summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2022-12-07 10:22:47 +0000
committer Riddle Hsu <riddlehsu@google.com> 2022-12-07 10:45:00 +0000
commitf23642b9af19de68c46b7fec5550cf5eb36f061f (patch)
treed6a7148b4b3bdce314c954d877c92e68c1319702 /libs/androidfw/StringPool.cpp
parentc868e22da9a216e75166439a33e4e1a6f7c68ede (diff)
Do not recreate navigation bar for screen layout change
According to the document, the screenLayout can be changed if orientation is changed: If you want to manually handle orientation changes in your app you must declare the "orientation", "screenSize", and "screenLayout" values in the android:configChanges attributes. The activity configuration follows the behavior for years, so [1] makes the calculation of display screen layout (sent to application) consistent, instead of computing a smallest value. NavigationBar was configured to recreate if it detects a screen layout change, then it may trigger an additional display config change since [2] considers the insets of decor windows as a factor to affect screen size. The InterestingConfigChanges flags of NavigationBar was just reused from [3] which is not added for NavigationBar. So a simple redraw is enough for screen layout change, that is also more efficient. [1]: If806e2a42a6c3c548d93ba43c1aed69889901193 [2]: If966bcc8125300d47d5cd631f7db17ff027e5261 [3]: I48af51cc4694ba5c492794631a1e1a54a60fce0b Bug: 233855302 Test: Simulate screen layout change (LONG) of rotation adb shell wm size 720x1280 adb shell wm density 320 atest ConfigChangeTests#testRotation90NoRelaunch Test: Simulate large screen change (width>600dp) The navigation bar shows correctly with adb shell wm size 2600x2200 Switch navigation mode / rotate device. adb shell wm size reset Change-Id: I7c47faabc66ac117a8429ca4d856865e581e1a3d
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions