Repository navigation
SystemUI: fix custom lockscreen clocks across rotation - #1382
Open
DubheBroken wants to merge 1 commit into
Open
DubheBroken wants to merge 1 commit into
DubheBroken wants to merge 1 commit into
Conversation
Share KeyguardClockStyleSection across default and split-shade blueprints. Blueprint transitions preserve same-class sections, so an unscoped instance can otherwise skip clock constraints with its enabled state uninitialized, collapsing the retained clock to zero width in landscape. Keep observing clock layout changes and recenter the scale pivot whenever the width settles. Ignore zero-width layouts and update only the pivot during later layouts so AOD scale animations retain control of the scale. This prevents a stale zero pivot from shifting a 150% clock to the right when returning to portrait. Remove the listener on replacement and detach. Validation: captured both failures on elish; diff checks passed. The user confirmed the lockscreen works after rebuilding and flashing the fix. (cherry picked from commit f4d5a93eec80a3afe16035902002e0096affd58d)
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.
Fix the custom lockscreen clock disappearing when switching from portrait to landscape, and shifting to the right after switching back to portrait.
Have the default layout and the landscape split-shade layout share the same clock section, avoiding missed constraints during transitions that cause the clock width to become 0. Also continuously update the scale pivot based on the effective layout size, preventing the enlarged clock from shifting due to a stale incorrect pivot, while preserving AOD animation control over the scale.
Rebuilt and flashed on Xiaomi Pad 5 Pro Wi-Fi (elish), confirming the lockscreen is back to normal.