Adjust app lock mechanism (#7924)

Now uses enum to also handle timed lock
This commit is contained in:
Ivan Iskandar
2022-09-02 22:48:48 +07:00
committed by GitHub
parent ff4a217730
commit 774a87a42a
4 changed files with 54 additions and 11 deletions

View File

@@ -53,6 +53,10 @@ class PreferencesHelper(val context: Context) {
fun lockAppAfter() = flowPrefs.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() = flowPrefs.getLong("last_app_closed", 0)
fun secureScreen() = flowPrefs.getEnum("secure_screen_v2", Values.SecureScreenMode.INCOGNITO)