File tree Expand file tree Collapse file tree
app/src/main/java/dev/pranav/applock/core/navigation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,20 +33,20 @@ class NavigationManager(private val context: Context) {
3333
3434 private fun isPasswordSet (): Boolean {
3535 val appLockPrefs = context.getSharedPreferences(PREFS_NAME , Context .MODE_PRIVATE )
36- val settingsPrefs = context.getSharedPreferences(SETTINGS_PREFS_NAME , Context .MODE_PRIVATE )
37- val hasPin = appLockPrefs.contains(PASSWORD_KEY )
38- val hasPattern = appLockPrefs.contains(PATTERN_KEY )
39- val lockType = settingsPrefs.getString(LOCK_TYPE_KEY , null )
4036
41- return (hasPin || hasPattern) && lockType != null
37+ val hasPin = appLockPrefs.getString(PASSWORD_KEY , null ) != null
38+ val hasPattern = appLockPrefs.getString(PATTERN_KEY , null ) != null
39+
40+ return (hasPin || hasPattern)
4241 }
4342
4443 companion object {
4544 private const val PREFS_NAME = " app_lock_prefs"
46- private const val SETTINGS_PREFS_NAME = " app_lock_settings"
45+
46+ // private const val SETTINGS_PREFS_NAME = "app_lock_settings"
4747 private const val PASSWORD_KEY = " password"
4848 private const val PATTERN_KEY = " pattern"
49- private const val LOCK_TYPE_KEY = " lock_type"
49+ // private const val LOCK_TYPE_KEY = "lock_type"
5050
5151 private val ROUTES_THAT_SKIP_PASSWORD_CHECK = setOf (
5252 Screen .AppIntro .route,
You can’t perform that action at this time.
0 commit comments