Ensure that remaining pin code attempts is never bigger than the value in the config.
This commit is contained in:
committed by
Benoit Marty
parent
d558371798
commit
d18b529285
+3
-1
@@ -82,5 +82,7 @@ class PreferencesLockScreenStore(
|
||||
}
|
||||
}
|
||||
|
||||
private fun Preferences.getRemainingPinCodeAttemptsNumber() = this[remainingAttemptsKey] ?: lockScreenConfig.maxPinCodeAttemptsBeforeLogout
|
||||
private fun Preferences.getRemainingPinCodeAttemptsNumber() =
|
||||
this[remainingAttemptsKey]?.coerceIn(0, lockScreenConfig.maxPinCodeAttemptsBeforeLogout)
|
||||
?: lockScreenConfig.maxPinCodeAttemptsBeforeLogout
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user