feat(theme): backport wallpaper color extraction to API < 31 - #1219
Merged
Conversation
Use WallpaperManager to extract the device wallpaper bitmap and derive a seed color via the existing Palette-based extractThemeColor(). On API < 31 this seed color feeds into MaterialKolor to produce a full M3 ColorScheme, giving Material You-style wallpaper-adaptive theming on older devices where the system dynamic color API is unavailable.
sang765
force-pushed
the
backport-wallpaper-color-api-31
branch
from
August 24, 2026 15:21
92704b8 to
82a546e
Compare
On API below 31, the random theme on startup toggle was visible even when dynamic theme was enabled (since wallpaper color now serves as the seed). Hide it unconditionally when dynamic theme is on — it has no effect in that mode anyway.
When dynamic theme is enabled on devices below API 31, show a "Wallpaper color permission" entry that opens the app settings page. This lets users grant READ_EXTERNAL_STORAGE on OEM devices that restrict wallpaper access beyond the standard API.
…ails Track wallpaper color extraction result via WallpaperExtractionFailedKey in DataStore. The permission entry now only appears when dynamic theme is enabled on API below 31 AND the wallpaper extraction actually failed, instead of showing unconditionally.
sang765
marked this pull request as ready for review
August 25, 2026 10:01
sang765
added a commit
to sang765/AT
that referenced
this pull request
Aug 28, 2026
…i#1219) Co-authored-by: morieeattonkatsu <107134739+rukamori@users.noreply.github.com>
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.
Summary
Uses WallpaperManager to extract the device wallpaper bitmap and derive a seed color via the existing Palette-based extractThemeColor(). On API below 31 this seed color feeds into MaterialKolor to produce a full M3 ColorScheme, giving Material You-style wallpaper-adaptive theming on older devices where the system dynamic color API is unavailable.
Changes
Behavior
Notes