Skip to content

ADFA-4843: Shrink high-resolution LeakCanary icons in debug builds#1575

Merged
davidschachterADFA merged 1 commit into
stagefrom
fix/ADFA-4843-remove-hires-leakcanary-icons
Jul 24, 2026
Merged

ADFA-4843: Shrink high-resolution LeakCanary icons in debug builds#1575
davidschachterADFA merged 1 commit into
stagefrom
fix/ADFA-4843-remove-hires-leakcanary-icons

Conversation

@davidschachterADFA

Copy link
Copy Markdown
Collaborator

Summary

  • LeakCanary (debugImplementation-only) ships its launcher icon and drawables at up to xxxhdpi resolution, wasting space in the debug APK for a debug-only "Leaks" launcher entry.
  • Override the xxhdpi/xxxhdpi density buckets for LeakCanary's leak_canary_icon, leak_canary_icon_foreground, leak_canary_icon_monochrome, leak_canary_tv_icon, leak_canary_leak, leak_canary_info, and leak_canary_dump resources with hdpi-sized copies, placed in app/src/debug/res/ (Android resource merging lets app-module resources of the same type/name/qualifier shadow a library dependency's).
  • Debug-only change, no effect on release builds; ~35KB of redundant pixels removed from the debug APK.

Test plan

  • Ran :app:processV8DebugResources and inspected the linked resources archive (linked-resources-binary-format-v8Debug.ap_) to confirm the override took effect: mipmap-xxhdpi-v4/leak_canary_icon.png and mipmap-xxxhdpi-v4/leak_canary_icon.png are both now 3746 bytes (previously 8503 / 12175), matching the pattern across all 7 drawables.
  • spotlessCheck passes (pre-push hook).

🤖 Generated with Claude Code

LeakCanary's launcher icon and drawables ship at xxhdpi/xxxhdpi
resolutions the debug-only "Leaks" activity doesn't need. Override
those two density buckets with hdpi-sized copies via debug-only
resource shadowing, cutting ~35KB of redundant pixels from the debug
APK.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@davidschachterADFA
davidschachterADFA merged commit 7242301 into stage Jul 24, 2026
4 checks passed
@davidschachterADFA
davidschachterADFA deleted the fix/ADFA-4843-remove-hires-leakcanary-icons branch July 24, 2026 22:18
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.

2 participants