Skip to content

Add optional post-unlock Mindful Launch check and harden Gemini target detection - #106

Draft
natakhot271 wants to merge 3 commits into
aload0:mainfrom
natakhot271:main
Draft

natakhot271 wants to merge 3 commits into
aload0:mainfrom
natakhot271:main

Conversation

@natakhot271

@natakhot271 natakhot271 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Definition: Debouncing here means skipping a repeat app check for the same package when events arrive in quick succession, so one app open triggers one prompt.

  • Optional post-unlock Mindful Launch check (MindfulLaunchManager, MindfulLaunchSettingsScreen, BlockerService):
    • Adds a Phone Unlock toggle in Mindful Launch settings (off bydefault) that runs a foreground Mindful Launch check on Intent.ACTION_USER_PRESENT.
    • The check runs as a window-state event. A content-change event just before it can't suppress it through debouncing (this applies to all apps).
  • Gemini package mapping hardening
    • Gemini target resolution (MindfulLaunchTargetEvaluator) maps additional Gemini Activity namespaces (assistant.surfaces.voice.robin, apps.bard) hosted under com.google.android.googlequicksearchbox.
    • Debouncing (lastCheckedTargetPackage) and foreground enforcement (enforcedForegroundPackage) track the resolved target package. This matters most for Gemini, where the raw package and resolved target differ.
    • Keeps the foreground Activity class name across transient overlays and widget content-change events. Enforcement resets when the raw or resolved target package changes.
  • Unit tests (MindfulLaunchTargetEvaluatorTest):
    • Adds tests for the expanded Gemini Activity hints, foreground class-name tracking across dialogs and navigation, and debounce behavior between content and window-state events.

@natakhot271
natakhot271 force-pushed the main branch 2 times, most recently from a02784f to 9f75f13 Compare November 22, 2026 05:15
@natakhot271
natakhot271 force-pushed the main branch 3 times, most recently from 1c2ad82 to 5d3eef6 Compare November 22, 2026 06:06
@PranavPurwar

Copy link
Copy Markdown
Member

Whenever you're finished with the PR, mark it as ready for review so I can merge!

…ervice

Match additional Gemini activity namespaces in MindfulLaunchTargetEvaluator, track foreground Activity class name across transient overlays and content events, key app-check debouncing and enforcement on the resolved target package without letting content events suppress window-state transitions, and add unit tests.
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.

2 participants