SessionLockGate
Whole-app session lock — the Chase/banking model.
Wrap a host's entire Compose root in this once:
setContent { SessionLockGate { BBoardApp() } }While SessionLock.locked is true it covers the whole app with a re-auth screen: nothing behind it is visible or tappable, and the window is marked FLAG_SECURE so the recents/app-switcher thumbnail doesn't leak content either. This is what makes the lock real — unlike hiding one balance, the host never has to decide which screens hold sensitive data; everything is gated.
Unlock runs the genuine biometric (SessionLock.unlock → WalletSeedSource.ensureSeedReady). It auto-prompts when the app returns to the foreground while locked (like Face ID on app open); a manual "unlock" button is the fallback after a cancel. Cancelling keeps the app locked.
The host still calls SessionLock.attach from Application.onCreate and forwards onUserInteraction() for idle detection — the gate is only the presentation + unlock affordance.
Parameters
when true (default) the wrapped activity's window is marked FLAG_SECURE for its whole lifetime — no screenshots, clean recents thumbnail (the banking default). A host that needs screenshots (e.g. a game menu) can pass false; the lock overlay still covers content while locked.