Repository navigation
Fix stale adaptive window metrics after delayed bounds updates - #66
Merged
Merged
Conversation
Invalidate the size cache when root geometry or the Resources Configuration used by WindowMetrics changes, in addition to the pending configuration flag. Observe pre-draw so bounds arriving after the final global-layout callback can refresh the cached size. Keep native WindowMetrics as the size source and resolve the current supported Context for each refresh. Register and remove both layout listeners together across View detach and reattach. Unchanged frames do not query native metrics. Validation: - SaltUI adaptive-window checks and SPA debug build succeeded; all 438 existing SPA unit tests passed. - Controlled callback/source-lag scenarios and same-View attachment lifecycle checks passed on API 30, 31 and 32 emulator windows. - Real fold/unfold, rotation and extreme display sizes passed 43 target-size checks. SPA's normal split-screen exit and rotation passed 52 size checks without crashes. - Without a debugger, ABBA scrolling comparisons had identical P90/P95 values of 18/19 ms. Display-resize measurements showed substantial emulator noise. - Huawei Mate 40 Pro hardware confirmation remains outstanding.
Owner
Author
|
用户已验证 HUAWEI Mate 40 Pro EMUI 13 Android 12 修复 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After rotation, the pending configuration update can be consumed before the native window bounds change. The adaptive window cache can then retain portrait dimensions inside a landscape window, leaving applications in the wrong layout. This follows up on #64.
Changes
Validation
:salt-adaptive-window:checkand the SPA debug build passed; all 438 existing SPA unit tests passed.Runtime validation used temporary diagnostic hosts and real platform input; no new automated UI test sources were added. The controlled reproductions demonstrate cache invalidation holes, while confirmation on the reported Huawei Mate 40 Pro/EMUI 13 hardware remains pending.