Files
fksar/docs/thijooree/15-settings-security.md
T
2026-06-13 21:30:12 +05:00

2.0 KiB

Settings — Security

Controls the app lock method, biometric options, auto-lock timeout, and screenshot restriction.


Fragment — SettingsSecurityFragment


Change Lock Method

A Change PIN or Change Pattern button (label reflects current method) opens the security setup flow (same SecuritySetupFragment as onboarding) in change-mode. The user must first authenticate with the current PIN/pattern/biometric before the new one is accepted.


Biometrics

A toggle to enable or disable biometric authentication (fingerprint / face — BIOMETRIC_WEAK).

  • When enabled, BiometricPrompt is offered at the lock screen as an alternative to PIN/pattern
  • A secondary toggle controls whether biometrics are also required for transfer confirmation

Biometric availability is checked via BiometricManager.canAuthenticate(). The toggle is disabled with an explanatory message if the device has no enrolled biometrics.


Auto-Lock Timeout

A MaterialButtonToggleGroup to set the inactivity timeout (SettingsSecurityFragment.kt:81-94). Default: 1 minute.

Option Timeout
30 seconds 30 s
1 minute 60 s (default)
3 minutes 180 s
5 minutes 300 s

There is no "Never" option — auto-lock cannot be disabled.

The selection is stored in SharedPreferences and read by HomeActivity on each timer reset.


Auto-Unlock on Correct PIN

When the lock method is PIN, an extra switchAutoUnlockPin toggle (SettingsSecurityFragment.kt:45-51) lets the entered PIN unlock immediately on the last correct digit, skipping the Confirm tap. Not available for the Pattern method.


Screenshots

A toggle for FLAG_SECURE on HomeActivity's window.

  • On (default): screenshots and screen recording are blocked system-wide while the app is in the foreground
  • Off: screenshots are allowed

The lock screen always has FLAG_SECURE regardless of this setting.


 


← Settings     Next → Settings — Appearance