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
ContinuousClockfrom 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.