mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 05:02:50 +02:00
Treat bare activity names as package-relative when matching the alias target
Third review follow-up (PackageParser.buildClassName). Confirmed the targetActivity resource id 0x01010202 in Open Saber Plus's manifest. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9e9e5950d0
commit
038dcd48cd
1 file changed
+2
@@ -19,6 +19,8 @@ def inspect(data):
|
|||||||
package = attrs.get('package', (None, None, None))[2] or ''
|
package = attrs.get('package', (None, None, None))[2] or ''
|
||||||
if tag in ('activity', 'activity-alias'):
|
if tag in ('activity', 'activity-alias'):
|
||||||
owner = attrs.get('targetActivity', (None, None, None))[2] if tag == 'activity-alias' else value
|
owner = attrs.get('targetActivity', (None, None, None))[2] if tag == 'activity-alias' else value
|
||||||
|
if owner and '.' not in owner: # PackageParser.buildClassName: bare names are relative too
|
||||||
|
owner = '.' + owner
|
||||||
owner = package + owner if owner and owner.startswith('.') else owner
|
owner = package + owner if owner and owner.startswith('.') else owner
|
||||||
if tag == 'intent-filter' and stack and stack[-1] in ('activity', 'activity-alias'):
|
if tag == 'intent-filter' and stack and stack[-1] in ('activity', 'activity-alias'):
|
||||||
current = {'actions': set(), 'categories': set(), 'templates': [], 'alias': stack[-1] == 'activity-alias', 'activity': owner}
|
current = {'actions': set(), 'categories': set(), 'templates': [], 'alias': stack[-1] == 'activity-alias', 'activity': owner}
|
||||||
|
|||||||
Reference in new issue
Block a user