Skip to content

Commit

Permalink
Enhancement : Showing message to manually enter pswrd (#110)
Browse files Browse the repository at this point in the history
* showing message

Signed-off-by: Nitin Verma <[email protected]>

* only showing message if device can use biometric and reached max login with biometric

Signed-off-by: Nitin Verma <[email protected]>
  • Loading branch information
Ni3verma authored Nov 6, 2021
1 parent cab9b09 commit d9e0df5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ class LoginFragment : Fragment(), Biometricable by biometricableHandler() {
* and login count with biometric has not crossed threshold
* and user away timeout has not happened
* */
if (canUseBiometrics() &&
val canUnlockWithBiometric = canUseBiometrics()
Timber.i("can unlock with biometric = $canUnlockWithBiometric")
if (canUnlockWithBiometric &&
viewModel.loginCountWithBiometric < MAX_CONT_BIOMETRIC_LOGINS &&
!(requireActivity() as MainActivity).checkUserAwayTimeout()
) {
Expand All @@ -91,7 +93,7 @@ class LoginFragment : Fragment(), Biometricable by biometricableHandler() {
getString(R.string.biometric_title_text),
getString(R.string.biometric_negative_button_text)
)
} else {
} else if (canUnlockWithBiometric && viewModel.loginCountWithBiometric >= MAX_CONT_BIOMETRIC_LOGINS) {
Timber.i(
"not showing biometric dialog, cont. count" +
" with biometric = ${viewModel.loginCountWithBiometric}\n" +
Expand Down

0 comments on commit d9e0df5

Please sign in to comment.