Skip to content

ADFA-4841: Fix trivial build warnings#1572

Merged
davidschachterADFA merged 4 commits into
stagefrom
fix/ADFA-4841-fix-trivial-build-warnings
Jul 24, 2026
Merged

ADFA-4841: Fix trivial build warnings#1572
davidschachterADFA merged 4 commits into
stagefrom
fix/ADFA-4841-fix-trivial-build-warnings

Conversation

@davidschachterADFA

Copy link
Copy Markdown
Collaborator

Summary

Based on the build log for run 30053583432 / job 89360621449, which had 4,409 warning lines. Three genuinely trivial fixes:

  • Trim tools:replace in AndroidManifest.xml to only supportsRtl,theme - icon/name/allowBackup had nothing to replace (no other manifest declares them), producing 3 manifest-merger warnings with zero effect on the merged output.
  • Remove 7 orphaned translation-only strings (git_clone*, idepref_github_summary) across 11 locale files - no default value, zero code references anywhere, dead weight from a removed/never-shipped feature. AAPT2 already silently drops them for lacking a default; this removes the dead source and 14 "removing resource ... without required default value" warnings.
  • Fix 12 -Wwritable-strings warnings in adb_pairing.cpp - JNINativeMethod's legacy NDK struct fields are typed char*, so literal string init needs an explicit cast.

Not attempted here (flagged as bigger, separate work):

  • ~4,346 of the 4,409 warning lines (98.6%!) are a single repeated D8 warning: R8 (bundled with our AGP 8.8.2) can't fully parse Kotlin 2.3.0's metadata format. Same root cause as two smaller warnings ("Unsupported Kotlin plugin version" from kotlin-dsl's embedded Kotlin, and "recommend a newer AGP for compileSdk=36"). All three stem from the AGP/Gradle/Kotlin toolchain being out of sync - a real fix means bumping AGP, which is a much bigger, riskier change than "trivial."
  • GitHub Actions Node.js 20 deprecation warnings - the flagged actions need major version bumps (checkout v4->v7, google-github-actions/auth v2->v3, setup-uv v6->v9, cancel-workflow-action 0.12.1->0.13.1) across 9 workflow files. Verifiable only via live CI runs, not something to do blindly under "trivial."

Test plan

  • :app:assembleV8Debug builds successfully
  • Confirmed via fresh (non-cached) task execution that all three warning categories are gone: 0 manifest-merger warnings, 0 orphaned-resource warnings, 0 -Wwritable-strings warnings

davidschachterADFA and others added 3 commits July 23, 2026 18:52
android:icon, android:name, and android:allowBackup had nothing to
actually replace (no other manifest declares them), producing 3
manifest-merger warnings per build. supportsRtl/theme are genuinely
overridden elsewhere, so those stay.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
git_clone, git_clone_failed, git_clone_in_progress, git_clone_repo_url,
git_clone_repo, git_clone_success, and idepref_github_summary existed
in 11 locale files with no default (English) value and zero code
references anywhere - dead translations for a removed/never-shipped
feature. AAPT2 already silently drops them at build time for lacking a
default value; this just removes the dead source and the 14 resulting
"removing resource ... without required default value" warnings.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
JNINativeMethod's name/signature fields are typed char* (not const
char*) in the NDK's legacy JNI headers, so initializing them directly
with string literals triggers -Wwritable-strings under C++11. Cast
each literal explicitly, matching the field type - eliminates all 12
warnings (6 entries x 2 fields) with no behavior change.

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.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 77bd0b76-bb4e-4c8f-a550-c4d29c32ae35

📥 Commits

Reviewing files that changed from the base of the PR and between 870ed53 and 6b44360.

📒 Files selected for processing (13)
  • app/src/main/AndroidManifest.xml
  • resources/src/main/res/values-ar-rSA/strings.xml
  • resources/src/main/res/values-bn-rIN/strings.xml
  • resources/src/main/res/values-de-rDE/strings.xml
  • resources/src/main/res/values-es-rES/strings.xml
  • resources/src/main/res/values-fr-rFR/strings.xml
  • resources/src/main/res/values-hi-rIN/strings.xml
  • resources/src/main/res/values-pt-rBR/strings.xml
  • resources/src/main/res/values-ro-rRO/strings.xml
  • resources/src/main/res/values-ru-rRU/strings.xml
  • resources/src/main/res/values-tr-rTR/strings.xml
  • resources/src/main/res/values-zh-rCN/strings.xml
  • subprojects/shizuku-manager/src/main/jni/adb_pairing.cpp
💤 Files with no reviewable changes (11)
  • resources/src/main/res/values-fr-rFR/strings.xml
  • resources/src/main/res/values-bn-rIN/strings.xml
  • resources/src/main/res/values-tr-rTR/strings.xml
  • resources/src/main/res/values-pt-rBR/strings.xml
  • resources/src/main/res/values-ro-rRO/strings.xml
  • resources/src/main/res/values-hi-rIN/strings.xml
  • resources/src/main/res/values-ru-rRU/strings.xml
  • resources/src/main/res/values-ar-rSA/strings.xml
  • resources/src/main/res/values-es-rES/strings.xml
  • resources/src/main/res/values-de-rDE/strings.xml
  • resources/src/main/res/values-zh-rCN/strings.xml

📝 Walkthrough
  • Removed stale Android manifest tools:replace entries, retaining only supportsRtl and theme.
  • Deleted seven unused GitHub/ Git-cloning translation strings across 11 locale files.
  • Added explicit casts for legacy JNINativeMethod string fields in adb_pairing.cpp without changing JNI bindings.
  • Verified :app:assembleV8Debug succeeds and targeted warnings are absent.
  • Risk: manifest merge behavior could change if removed overrides were still needed; the C++ casts preserve compatibility but bypass const-correctness in the legacy JNI API.

Walkthrough

The pull request narrows manifest merge replacements, updates localized IDE and Git strings across eleven locales, and adds explicit casts to PairingContext JNI method names without changing their bindings.

Changes

Manifest merge configuration

Layer / File(s) Summary
Application replacement rules
app/src/main/AndroidManifest.xml
The application tools:replace list now covers only android:supportsRtl and android:theme.

Localized resource cleanup

Layer / File(s) Summary
Localized IDE and Git strings
resources/src/main/res/values-*/strings.xml
GitHub preference summaries and Git clone translations are removed across locales; Arabic adds IDE preference strings, while Russian adds replacement preference entries.

JNI registration compatibility

Layer / File(s) Summary
PairingContext method registration
subprojects/shizuku-manager/src/main/jni/adb_pairing.cpp
All six registered JNI method names now use (char *) casts while descriptors and native function pointers remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: hal-eisen-adfa, jatezzz

Poem

A rabbit hops through strings so bright,
Trims old Git words from left to right.
The manifest’s rules grow neat,
JNI names stand on steady feet—
Carrots cheer this tidy feat! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change set: it summarizes the build-warning fixes without unnecessary detail.
Description check ✅ Passed The description is clearly about the same warning-fix changes described in the diff and objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ADFA-4841-fix-trivial-build-warnings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@davidschachterADFA
davidschachterADFA merged commit 3ef9ff0 into stage Jul 24, 2026
4 checks passed
@davidschachterADFA
davidschachterADFA deleted the fix/ADFA-4841-fix-trivial-build-warnings branch July 24, 2026 15:36
@davidschachterADFA

Copy link
Copy Markdown
Collaborator Author

@claude review

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.

3 participants