79178864

Date: 2024-11-11 19:21:41
Score: 1.5
Natty:
Report link

This is the right way to pre-grant permissions: https://source.android.com/docs/core/permissions/runtime_perms#creating-exceptions.

But an accessibility service isn't controlled by a permission. A service is enabled if it's in this list in settings: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/provider/Settings.java;drc=ad46de2aa9707021970cb929d016b639f98a1ac7;l=8615.

Modify the code maintaining that setting to pre-enable your service. Or using the existing defaultAccessibilityService configuration (set it with a product overlay file) might work.

The simplest way to stop a user from turning it off is probably to modify the accessibility settings UI.

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ahaan Ugale