Skip to content

fix: remove redundant scaleArtwork() call#55

Merged
chrisuthe merged 1 commit intomainfrom
fix/redundant-scale-artwork
Mar 8, 2026
Merged

fix: remove redundant scaleArtwork() call#55
chrisuthe merged 1 commit intomainfrom
fix/redundant-scale-artwork

Conversation

@chrisuthe
Copy link
Copy Markdown
Owner

Summary

  • Both callers of updateMediaSessionArtwork() (onArtwork and fetchArtwork) already call scaleArtwork() before passing the bitmap in
  • updateMediaSessionArtwork() then called scaleArtwork() again on the already-scaled bitmap, causing an unnecessary bitmap allocation
  • Removed the redundant second call so the pre-scaled bitmap is used directly

Test plan

  • Verify artwork displays correctly on lock screen / notification
  • Verify artwork displays correctly on Android Auto
  • Confirm no StrictMode violations for oversized bitmaps

@chrisuthe chrisuthe merged commit 6f4b7ee into main Mar 8, 2026
Both callers (onArtwork and fetchArtwork) already scale the bitmap
before passing it to updateMediaSessionArtwork(), which then scaled
it a second time. Remove the redundant call to avoid unnecessary
bitmap allocation and processing.
@chrisuthe chrisuthe deleted the fix/redundant-scale-artwork branch March 8, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant