Appear On Top (System Overlay)
The Appear On Top permission (known natively as theSYSTEM_ALERT_WINDOW or System Overlay permission) is critical to CommitT’s digital enforcement engine. It allows the background blocker thread to render an interactive, un-skippable blocking screen when a user attempts to launch a restricted app.
Why it is Required
When a restricted app (like Instagram) is opened:- The Accessibility Service detects the app launch.
- The service queries the local SQLite engine for active block rules.
- If active, the overlay window is spawned immediately using WindowManager.
- The overlay intercepts touch events, rendering the CommitT blocking UI.
Native Implementation
The permission is checked using the system’sSettings.canDrawOverlays API on Android Marshmallow (API 23) and above: