Skip to content

chore(res): remove unused strings, bool and drawables - #839

Merged
LeanBitLab merged 1 commit into
mainfrom
chore/remove-unused-resources
Nov 15, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
chore/remove-unused-resources

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Summary

Remove 12 strings/bool and 2 drawables that lint reports as unused and that I confirmed are really unused:

  • No reference in code, resources, assets, tests, or any source set (main, standard, offline).
  • Not reachable by name: not a ToolbarKey name (resolved via getStringResourceOrName("")), not a layout_/label_/popup_keys_/style_name_/theme_name_/toolbar_mode_ lookup, not in the custom icon picker list (customIconIds only resolves names the picker can offer).
  • The PREF_* key constants with the same names are unchanged, only the string resources go.

Removed: spoken_current_text_is, spoken_description_search, spoken_description_upper_case, next_word_boost_level, gesture_method, clipboard_keys_alignment, auto_show_toolbar, toolbar_swipe_down_dismiss, custom_subtype, voice_futo_models_summary, unicode_panel, config_default_key_preview_popup (all locales and form-factor variants), ic_launcher_foreground, ic_open_in_full.

The 19 other UnusedResources hits are real and stay: custom_ai_1..10, touchpad, select_mode, ocr, gif, font_style, force_auto_caps (toolbar key labels) and layout_tamil, layout_tamil_v4, layout_functional_keys_khipro (layout names), all resolved by name at runtime.

i18n hook side effect

Staging the base strings.xml ran the pre-commit hook, which re-added no_dictionary_message in el, ml and ur (6 lines). I had removed those stale 1-argument translations in #836, and the hook fills any locale missing a key. They have the correct %1$s %2$s %3$s placeholders, but the spacing around the link placeholder is slightly off (cosmetic, 3 locales).

Verification

  • ./gradlew :app:assembleStandardDebug, compileOfflineRunTestsKotlin pass
  • lintStandardDebug: 0 errors, ExtraTranslation 0, MissingDefaultResource 0, UnusedResources 33 -> 19, warnings 197 -> 183
  • Resource-only change, so CI does not trigger (path filter is app/src/main/java**)

12 strings/bool and 2 drawables have no references in code, resources, assets or
tests, and none can be reached by name (not a ToolbarKey name, not a layout_ /
label_ / popup_keys_ / style_name_ / theme_name_ / toolbar_mode_ lookup, not in
the custom icon picker list). The matching pref key constants are unchanged.

Removed: spoken_current_text_is, spoken_description_search,
spoken_description_upper_case, next_word_boost_level, gesture_method,
clipboard_keys_alignment, auto_show_toolbar, toolbar_swipe_down_dismiss,
custom_subtype, voice_futo_models_summary, unicode_panel,
config_default_key_preview_popup (all locales and form-factor variants),
ic_launcher_foreground, ic_open_in_full.
@LeanBitLab
LeanBitLab merged commit 731b5f2 into main Nov 15, 2026
@LeanBitLab
LeanBitLab deleted the chore/remove-unused-resources branch November 15, 2026 17:51
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

⌂ Proxy