Skip to content

fix: resolve #1120 — UpgradePatch 建议#1797

Open
Nam0101 wants to merge 1 commit into
Tencent:devfrom
Nam0101:contribai/feat/mirror-visibility-change-in-the-no-op-up
Open

fix: resolve #1120 — UpgradePatch 建议#1797
Nam0101 wants to merge 1 commit into
Tencent:devfrom
Nam0101:contribai/feat/mirror-visibility-change-in-the-no-op-up

Conversation

@Nam0101
Copy link
Copy Markdown

@Nam0101 Nam0101 commented May 16, 2026

Summary

fix: resolve #1120 — UpgradePatch 建议

Problem

Severity: Low | File: tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/patch/UpgradePatch.java

The no-op variant of tinker-android-lib exposes the same UpgradePatch API surface as the real library. To keep the two artifacts swappable at build time, the same protected -> public visibility promotion must be applied here. If only the real lib is updated, consumers who depend on tinker-android-lib-no-op (typically for release/no-op flavors) would see a different API and lose access to the now-public helpers, which would defeat the purpose of the change.

Solution

In tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/patch/UpgradePatch.java, mirror the modifications made in the real lib: change protected to public on the same set of recover/merge helper methods (tryRecoverDexFiles, tryRecoverLibraryFiles, tryRecoverResourceFiles, and any other protected helpers present). Keep the method bodies as-is (they are no-ops in this module). Build the module with ./gradlew :tinker-android:tinker-android-lib-no-op:assemble to verify the change compiles cleanly.

Changes

  • tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/patch/UpgradePatch.java (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

Note: this change was drafted with AI assistance and reviewed locally before submission.

Fixes Tencent#1120

Signed-off-by: Nguyen Van Nam <nam.nv205106@gmail.com>
@tencent-adm
Copy link
Copy Markdown
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

UpgradePatch 建议

2 participants