trackslash
VAULT-33 P2

Add an auto-lock delay to the app lock

0
All issues

Description

Building on the app lock (VAULT-21), add a "Require Unlock" setting.

Options: Immediately (the default), After 1 Minute, After 5 Minutes and After 15 Minutes.

Behavior:

  • The delay counts from when the app went to the background.
  • The privacy cover still appears immediately, whatever the delay.
  • The setting only appears when the app lock is on.
  • Choosing a longer delay requires authenticating first, because it weakens the lock.

Measuring time: use a clock that can't be wound back by changing the device's date and time. Restarting the device should always lock the app.

Tests: unit tests for each delay, using an injected clock, including the clock-change and restart cases.

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in https://github.com/badbundle/vault-app/pull/619 (merged as de2b81a9).

The setting: "Require Unlock" appears under App Lock while the lock is on. The options are Immediately (the default), After 1 Minute, After 5 Minutes and After 15 Minutes. Choosing a longer delay needs authentication; a shorter one doesn't.

How the delay works:

  • It's measured with ContinuousClock from when the app went to the background, so changing the date or time doesn't affect it, and it keeps counting while the phone sleeps.
  • The background time is held only in memory, so a restart or relaunch always starts locked.
  • If the clock ever runs backwards, the app locks.
  • The privacy cover still appears immediately.
  • Coming back within the delay leaves the app exactly as it was. Coming back after it locks the app behind the cover, then asks for Face ID.
  • AutoFill still asks every time.

Tests: about 20 new service tests with a fake clock, covering each delay's boundary, duplicate background notifications, clock regression, relaunch and changing the delay. Settings snapshots in light and dark.