Skip to content

fix: treat flattened accessibility ComponentName as enabled - #110

Open
dannyyol wants to merge 1 commit into
google:mainfrom
dannyyol:fix/helper-status-flattened-component
Open

dannyyol wants to merge 1 commit into
google:mainfrom
dannyyol:fix/helper-status-flattened-component

Conversation

@dannyyol

@dannyyol dannyyol commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Fixes #109.

artemis helper status reported Service enabled: no when the helper was actually enabled and bound. Some Android versions (observed on Android 11) store the accessibility component in flattened form (com.artemis.helper/com.artemis.helper.ArtemisAccessibilityService) instead of the short form Artemis writes (com.artemis.helper/.ArtemisAccessibilityService).

Status, enable, revive, and uninstall compared the settings list with exact string equality, so the flattened entry was treated as a different service.

This change normalizes both ComponentName notations (pkg/.Class and pkg/pkg.Class) before comparing, so the helper is recognized whichever form the platform stored.

Test plan

  • uv run pytest tests/unit/runtime/test_helper_manager.py — 48 passed, including:
    • status reports enabled when the platform stores the flattened name
    • enable does not append a duplicate short-form entry
    • enable still succeeds when settings put is flattened on read-back
    • uninstall/revive strip the flattened entry
  • uv run ruff check / ruff format --check on the two changed files — clean
  • Optional: artemis helper status on an Android 11 device where settings get secure enabled_accessibility_services shows the flattened component

Some Android versions store the helper as pkg/pkg.Class instead of
pkg/.Class, so helper status, enable, revive, and uninstall missed it.
Fixes google#109

Signed-off-by: Ayo Omotayo <ayonifeoluwa@gmail.com>
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.

helper status reports "Service enabled: no" when the platform stores the accessibility component in flattened form

1 participant