You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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.