Split security preferences from PrefrencesHelper (#8030)
This commit is contained in:
@@ -37,8 +37,6 @@ object PreferenceKeys {
|
||||
|
||||
const val librarySortingMode = "library_sorting_mode"
|
||||
|
||||
const val hideNotificationContent = "hide_notification_content"
|
||||
|
||||
const val autoUpdateMetadata = "auto_update_metadata"
|
||||
|
||||
const val autoUpdateTrackers = "auto_update_trackers"
|
||||
|
||||
@@ -74,10 +74,4 @@ object PreferenceValues {
|
||||
PACKAGEINSTALLER(R.string.ext_installer_packageinstaller),
|
||||
SHIZUKU(R.string.ext_installer_shizuku),
|
||||
}
|
||||
|
||||
enum class SecureScreenMode(val titleResId: Int) {
|
||||
ALWAYS(R.string.lock_always),
|
||||
INCOGNITO(R.string.pref_incognito_mode),
|
||||
NEVER(R.string.lock_never),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,20 +46,6 @@ class PreferencesHelper(
|
||||
|
||||
fun sideNavIconAlignment() = this.preferenceStore.getInt("pref_side_nav_icon_alignment", 0)
|
||||
|
||||
fun useAuthenticator() = this.preferenceStore.getBoolean("use_biometric_lock", false)
|
||||
|
||||
fun lockAppAfter() = this.preferenceStore.getInt("lock_app_after", 0)
|
||||
|
||||
/**
|
||||
* 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 secureScreen() = this.preferenceStore.getEnum("secure_screen_v2", Values.SecureScreenMode.INCOGNITO)
|
||||
|
||||
fun hideNotificationContent() = this.preferenceStore.getBoolean(Keys.hideNotificationContent, false)
|
||||
|
||||
fun autoUpdateMetadata() = this.preferenceStore.getBoolean(Keys.autoUpdateMetadata, false)
|
||||
|
||||
fun autoUpdateTrackers() = this.preferenceStore.getBoolean(Keys.autoUpdateTrackers, false)
|
||||
|
||||
Reference in New Issue
Block a user