Skip to content

V1.0.5

Choose a tag to compare

@github-actions github-actions released this 01 Aug 09:06
72d9cd2
Fix targetActivity rewrite regression for absolutely-declared activities

Android only re-resolves a component name against the manifest's
current package attribute when it's written with a leading dot
(".ui.main.MainActivity"). A fully-qualified absolute name (no
leading dot) is used verbatim, unaffected by the package rename,
even when it happens to start with the same text as the old
package.

The previous fix for targetActivity/parentActivityName rewrote any
value starting with oldPkg unconditionally. This was correct when
the referenced activity was itself declared relatively (its resolved
name shifts with the rename), but wrong when the referenced activity
was declared with its full absolute name — that activity's resolved
name never changes, so rewriting the reference to it broke the
cross-reference instead of fixing it (reproduced with
com.anthropic.claude: PermissionsRationaleActivity, declared
absolutely, failed to resolve after targetActivity was rewritten to
a class that doesn't exist in the manifest).

Add a first pass (collectRelativeComponentNames) that scans the
manifest for leading-dot android:name declarations before the
rewriting pass runs. targetActivity/parentActivityName are now only
rewritten when they reference one of those relatively-declared
names; absolute references are left untouched to match how the
platform parser actually resolves them.