ADFA-4843: Shrink high-resolution LeakCanary icons in debug builds#1575
Merged
davidschachterADFA merged 1 commit intoJul 24, 2026
Merged
Conversation
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 <noreply@anthropic.com>
There was a problem hiding this comment.
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.
jatezzz
approved these changes
Jul 24, 2026
davidschachterADFA
deleted the
fix/ADFA-4843-remove-hires-leakcanary-icons
branch
July 24, 2026 22:18
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
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.xxhdpi/xxxhdpidensity buckets for LeakCanary'sleak_canary_icon,leak_canary_icon_foreground,leak_canary_icon_monochrome,leak_canary_tv_icon,leak_canary_leak,leak_canary_info, andleak_canary_dumpresources withhdpi-sized copies, placed inapp/src/debug/res/(Android resource merging lets app-module resources of the same type/name/qualifier shadow a library dependency's).Test plan
:app:processV8DebugResourcesand inspected the linked resources archive (linked-resources-binary-format-v8Debug.ap_) to confirm the override took effect:mipmap-xxhdpi-v4/leak_canary_icon.pngandmipmap-xxxhdpi-v4/leak_canary_icon.pngare both now 3746 bytes (previously 8503 / 12175), matching the pattern across all 7 drawables.spotlessCheckpasses (pre-push hook).🤖 Generated with Claude Code