mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
chore: add more logging to biometric operations
This commit is contained in:
@@ -60,7 +60,7 @@ object BiometricAuthenticator {
|
|||||||
object : BiometricPrompt.AuthenticationCallback() {
|
object : BiometricPrompt.AuthenticationCallback() {
|
||||||
override fun onAuthenticationError(errorCode: Int, errString: CharSequence) {
|
override fun onAuthenticationError(errorCode: Int, errString: CharSequence) {
|
||||||
super.onAuthenticationError(errorCode, errString)
|
super.onAuthenticationError(errorCode, errString)
|
||||||
logcat(TAG) { "BiometricAuthentication error: errorCode=$errorCode, msg=$errString" }
|
logcat(TAG) { "onAuthenticationError(errorCode=$errorCode, msg=$errString)" }
|
||||||
callback(
|
callback(
|
||||||
when (errorCode) {
|
when (errorCode) {
|
||||||
BiometricPrompt.ERROR_CANCELED,
|
BiometricPrompt.ERROR_CANCELED,
|
||||||
@@ -103,11 +103,13 @@ object BiometricAuthenticator {
|
|||||||
|
|
||||||
override fun onAuthenticationFailed() {
|
override fun onAuthenticationFailed() {
|
||||||
super.onAuthenticationFailed()
|
super.onAuthenticationFailed()
|
||||||
|
logcat(TAG) { "onAuthenticationFailed()" }
|
||||||
callback(Result.Retry)
|
callback(Result.Retry)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
|
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
|
||||||
super.onAuthenticationSucceeded(result)
|
super.onAuthenticationSucceeded(result)
|
||||||
|
logcat(TAG) { "onAuthenticationSucceeded()" }
|
||||||
callback(Result.Success(result.cryptoObject))
|
callback(Result.Success(result.cryptoObject))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user