Skip to content

v0.1.0-alpha.17 — Brick: NFC tap-to-block app blocking (Foqos-style), 3s vault hold, fixes - #18

Merged
codebooo merged 1 commit into
mainfrom
claude/lifeos-production-plan-v3-dmynx3
Jul 27, 2026
Merged

v0.1.0-alpha.17 — Brick: NFC tap-to-block app blocking (Foqos-style), 3s vault hold, fixes#18
codebooo merged 1 commit into
mainfrom
claude/lifeos-production-plan-v3-dmynx3

Conversation

@codebooo

Copy link
Copy Markdown
Owner

1. Brick — new module

Foqos-style tap-to-block, built on the only mechanism Android gives a sideloaded app (Family Link's supervision APIs are restricted to Google's own package): an accessibility service that watches which app comes to the front and replaces blocked ones with a full-screen wall.

  • Modes (profiles) — name, blocked app list (installed-app picker w/ search + system-app toggle), optional per-app daily allowances (15/30/60 min or hard block).
  • Activators — NFC tag, time window, or manual. Independent on/off triggers: e.g. tag-on, time-off.
  • NFC — pair any tag/card in the editor via reader mode; tapping it later opens a no-history activity that flips the matching mode and closes. Tag id is the tag's hardware UID, so no writing to the tag is needed. Foil for the intended flow: keep the tag far away, and it's the only key.
  • Strict mode — refuses the in-app end button, so only the real condition unlocks.
  • Block wall — full-screen "Blocked" screen with the unlock hint; Back is swallowed and only leads Home. Blocked-attempt counter per session.
  • Allowances — the service accounts foreground seconds per app per day itself (no Usage Access needed) and walls the app once the allowance is spent.
  • Time windows — AlarmManager (setAndAllowWhileIdle) arms the next start/end edge per profile; re-armed on every refresh, so reboots are covered when the service reconnects.

Verification: the rules that must never be wrong were extracted into a pure BrickPolicy and covered by 12 JVM unit tests, all passing — blocked vs allowed vs allowance-spent, zero-minute allowance is a hard block, allowances don't leak between apps, LifeOS itself is never blockable (or you couldn't unlock), NFC-only modes reject manual/time exits, strict modes reject everything but their condition, force-stop still works if a running profile is deleted. Debug + minified release builds pass.

Honest caveat: a determined user can still disable the accessibility service in system settings — no non-privileged Android app can prevent that. Everything short of that is enforced.

2. Vault reveal

Hold on the Home "LifeOS" title reduced from 5s to 3s.

3. General fixes

  • Brick state reloads at app start, so a live mode and its time alarms survive reboots.
  • Screen Time sync no longer re-queries all 45 days on every refresh — stored days are skipped (today/yesterday still refresh), which removes a multi-second stall on opening the module.
  • Settings gains an "App blocking (Brick)" accessibility shortcut next to the other system grants.

Room v14 (4 Brick tables, auto-migration). versionCode 17.

🤖 Generated with Claude Code


Generated by Claude Code

…s, block wall), 3s vault hold, screen-time sync perf

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codebooo
codebooo merged commit d36548d into main Jul 27, 2026
1 check passed
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