Repository navigation
fix: AOD wallpaper overlay stuck on screen after wake on One UI - #1528
Merged
sameerasw merged 8 commits intoOct 24, 2026
Merged
Conversation
…andled by progress plugin
One UI stops animators of processes it considers in background
("CoreRune.SYSPERF_ACTIVE_APP_BBA_ENABLE : stop animation in background
states"). The overlay window was only removed from the fade-out
onAnimationEnd, so when the animator was paused the window stayed on
screen, half transparent, until the accessibility service restarted.
The same pause kept a newly picked image from being applied, since the
bitmap is swapped at the end of the crossfade.
- Remove the window from a Handler fallback if the fade-out has not
finished shortly after its duration, and finish any pending removal
before showing again or tearing down.
- Apply the target bitmap and opacity from a fallback if the crossfade
stalls, and set the final alpha if the fade-in stalls.
- Skip the fade-in on Samsung: One UI skips drawing app windows while
the AOD is showing, so only the first frame (alpha ~0) reached the
screen and the wallpaper was invisible on AOD.
Tested on Galaxy Z Fold 5 (One UI 8.5, Android 16), cover and inner
display, waking with double tap, power button and fingerprint.
Refs sameerasw#951
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picking a new custom image rewrites custom_aod_wallpaper.png and sets aod_wallpaper_custom_image to true. When a custom image was already set the pref does not change, so no change listener fires, the cache is never invalidated and the overlay keeps showing the old image until the service restarts. Track the file's last modified time when loading the wallpaper and drop the cached bitmap when it changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sameerasw
approved these changes
Oct 24, 2026
sameerasw
left a comment
Owner
There was a problem hiding this comment.
Thanks for your contributions <3
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.
Description
Should fix #951. On Samsung the AOD wallpaper sometimes stays on screen, half transparent, after waking the device (reproduced on a Z Fold 5 waking with double tap). Picking another custom image also has no effect on the overlay.
Cause
Choreographer: CoreRune.SYSPERF_ACTIVE_APP_BBA_ENABLE : stop animation in background states. The overlay window was only removed in the fade-outonAnimationEnd, so with the animator paused the window stayed attached until the accessibility service restarted.dumpsys windowconfirmed theACCESSIBILITY_OVERLAYwindow still attached while the device was awake.performDraw() was skipped by AOD_SHOW_STATE). Only the first frame reaches the screen, and with the 2 s fade-in that frame has alpha ≈ 0, so the wallpaper was basically invisible on AOD.custom_aod_wallpaper.pngand setsaod_wallpaper_custom_imagetotrue. When it is alreadytrueno change listener fires, so the cached bitmap is never invalidated.Fix
Handlerfallbacks put the overlay in its final state if the animators have not finished shortly after their duration: remove the window after the fade-out, apply the target bitmap and opacity after the crossfade, set the final alpha after the fade-in. When animators run normally nothing changes. A pending removal is also completed before showing again and inremoveOverlay().Type of change
UI changes
None.
Checklist
develop(notmain)../gradlew assembleDebug../gradlew testDebugUnitTest.SettingsRepositoryfor keys and getter/setter methods. (no new preferences)FeatureRegistry.ktfor search indexing. (no new settings)ui/core/(RoundedCardContainer,IconToggleItem, etc.). (no UI changes)res/values/strings.xmland drawables use rounded variants (R.drawable.rounded_*). (no new strings)Tested on a Galaxy Z Fold 5 (One UI 8.5, Android 16), cover and inner display, waking with double tap, power button and fingerprint: the overlay is removed ~0.5 s after every wake and the wallpaper now shows on AOD. The custom image refresh (last commit) was built and installed but has had less testing so far.
🤖 Generated with Claude Code