Remove redundant preference keys

This commit is contained in:
arkon
2022-09-20 00:13:33 -04:00
parent c2a831dded
commit 2b089648a3
11 changed files with 149 additions and 213 deletions

View File

@ -8,19 +8,19 @@ class SecurityPreferences(
private val preferenceStore: PreferenceStore
) {
fun useAuthenticator() = this.preferenceStore.getBoolean("use_biometric_lock", false)
fun useAuthenticator() = preferenceStore.getBoolean("use_biometric_lock", false)
fun lockAppAfter() = this.preferenceStore.getInt("lock_app_after", 0)
fun lockAppAfter() = preferenceStore.getInt("lock_app_after", 0)
fun secureScreen() = this.preferenceStore.getEnum("secure_screen_v2", SecureScreenMode.INCOGNITO)
fun secureScreen() = preferenceStore.getEnum("secure_screen_v2", SecureScreenMode.INCOGNITO)
fun hideNotificationContent() = this.preferenceStore.getBoolean("hide_notification_content", false)
fun hideNotificationContent() = preferenceStore.getBoolean("hide_notification_content", false)
/**
* For app lock. Will be set when there is a pending timed lock.
* Otherwise this pref should be deleted.
*/
fun lastAppClosed() = this.preferenceStore.getLong("last_app_closed", 0)
fun lastAppClosed() = preferenceStore.getLong("last_app_closed", 0)
enum class SecureScreenMode(val titleResId: Int) {
ALWAYS(R.string.lock_always),