Load media notification images using Coil #3566
Open
+22
−34
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
This PR changes the source of files for the Media Notification. Previously, we were using two separate sources:
Coil
for general-purpose use of artwork inside the app.OkHttp
to fetch images inside the Content Provider when the Media Notification requested images.I removed the direct usage of
OkHttp
and ensured thatCoil
is always the source of truth. This has two main benefits:OkHttp
cache wasn’t cleared. It wasn’t even easy to do so since we didn’t use a custom directory for it.Fixes #1529
Fixes #3564
Testing Instructions
General Behavior
Smoke test the general artwork behavior—custom file, episodes artwork, etc. Pay special attention to the Media Notification and the lock screen.
Cache Update
Settings > Appearance > Refresh all podcast artwork
.Note: The mini player artwork doesn’t refresh automatically, as the image is cached for the episode. If you play another episode, it should update there as well.
Checklist
./gradlew spotlessApply
to automatically apply formatting/linting)I have considered whether it makes sense to add tests for my changesAll strings that need to be localized are inmodules/services/localization/src/main/res/values/strings.xml
Any jetpack compose components I added or changed are covered by compose previewsI have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.