Skip to content

Refactor debloater to use ManifestParser instead of ApkParser#1361

Merged
lihenggui merged 1 commit into
mainfrom
refactor/use-manifest-parser-in-debloater
Nov 5, 2025
Merged

Refactor debloater to use ManifestParser instead of ApkParser#1361
lihenggui merged 1 commit into
mainfrom
refactor/use-manifest-parser-in-debloater

Conversation

@lihenggui

Copy link
Copy Markdown
Owner

Replace ApkParser.getActivitiesWithIntentFilters() with ManifestParser.parseManifest() in LocalDebloatableComponentDataSource. This change:

  • Uses the new object-oriented ManifestParser implementation
  • Maintains identical filtering logic for debloatable activities
  • Filters activities with intent-filters containing:
    • Actions: VIEW, SEND, SEND_MULTIPLE
    • Categories: BROWSABLE
  • Converts ManifestActivity objects to ActivityIntentFilterInfo
  • Improves error handling with Result type

The migration enables future extensibility to other component types while preserving existing debloater functionality.

Change-Id: I3acb9e818bc8d734a4f468bc0eb8ab5bd59eb9f6

Replace ApkParser.getActivitiesWithIntentFilters() with ManifestParser.parseManifest()
in LocalDebloatableComponentDataSource. This change:

- Uses the new object-oriented ManifestParser implementation
- Maintains identical filtering logic for debloatable activities
- Filters activities with intent-filters containing:
  - Actions: VIEW, SEND, SEND_MULTIPLE
  - Categories: BROWSABLE
- Converts ManifestActivity objects to ActivityIntentFilterInfo
- Improves error handling with Result type

The migration enables future extensibility to other component types while
preserving existing debloater functionality.

Change-Id: I3acb9e818bc8d734a4f468bc0eb8ab5bd59eb9f6
@lihenggui lihenggui merged commit 3ae5e7b into main Nov 5, 2025
4 checks passed
@lihenggui lihenggui deleted the refactor/use-manifest-parser-in-debloater branch November 5, 2025 01:03
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.

1 participant