Skip to content

feat: introduce Conscious Gate for mindful app pauses - #852

Open
thomasborgogno wants to merge 4 commits into
sameerasw:developfrom
thomasborgogno:feat/consciousGate
Open

feat: introduce Conscious Gate for mindful app pauses#852
thomasborgogno wants to merge 4 commits into
sameerasw:developfrom
thomasborgogno:feat/consciousGate

Conversation

@thomasborgogno

Copy link
Copy Markdown
Contributor

Summary

Adds Conscious Gate: a new feature that shows a brief, dismissible pause screen before opening apps the user has chosen to be more intentional about (e.g. social media), with a "Continue" button that stays disabled for a configurable delay.

  • Reuses the existing App Lock detection pipeline (Accessibility Service / Usage Access) via a new checkConsciousGate hook in AppFlowHandler, and a new trampoline ConsciousGateActivity.
  • Settings screen lets the user pick gated apps, pause delay and reappear-after-usage timer (both with presnput), pause-screen icon/title/message, and a Material 3 Expressive countdown style (circular wavy, linearwavy, loading blob, breathing dot) with a live full-screen preview.
  • Countdown styles other than the linear bar render as a large (220dp) hero animation with the icon centereit halfway between the animation and the buttons.
  • The pause screen now fades in on appearance and fades out before Close/Continue/back-press take effect.
  • Fixes a pre-existing gap where the app's "Enable accessibility" shortcuts always opened the generic systew try to deep-link straight to Essentials' own service page on API 31+, falling back to the generic listwhere the OS doesn't allow it (deduplicated across ~13 call sites into PermissionUtils.openAccessibilitySettings).
  • Adds several missing rounded_*_24 icon drawables used by the pause-screen icon picker.

Why

Gives users a "speed bump" before opening apps they've flagged as distracting, similar to focus/wellbeing tals' existing permission and detection architecture (no new permissions required).

Testing

  • ./gradlew assembleDebug passes.
  • Manually verified end-to-end on a physical device (Samsung Galaxy S9, One UI) via adb: enabling the feature, selecting apps, opening a gated app → pause screen appears → Continue disabled during the configured delay → enabling → opening the app; Close returns to the launcher without opening the target app.
  • Verified all four countdown styles (icon contrast, sizing, hero-vs-compact layout) and the settings screen (custom delay/reappear inputs, live preview dialog, icon picker) via screenshots on-device.
  • Found and fixed a device-specific issue where ACTION_ACCESSIBILITY_DETAILS_SETTINGS requires a signatur; falls back gracefully to the generic Accessibility screen.

@sameerasw sameerasw added the enhancement New feature or request label Aug 26, 2026
@sameerasw sameerasw moved this from Backlog to In review in Essentials Progress Aug 26, 2026
@sameerasw
sameerasw self-requested a review August 26, 2026 17:36

@sameerasw sameerasw left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @thomasborgogno Can you address the comments and also make sure the styling follows the existing app as well?

And also please move the new feature into the Input and Actions category.

@sameerasw
sameerasw marked this pull request as draft August 26, 2026 17:40
@thomasborgogno
thomasborgogno marked this pull request as ready for review August 26, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants