mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix biometric error message when the keystore is not accessible
This commit is contained in:
@@ -196,10 +196,10 @@ class BiometricUnlockDatabaseHelper(private val context: FragmentActivity) {
|
|||||||
val ivSpecValue = Base64.encodeToString(spec.iv, Base64.NO_WRAP)
|
val ivSpecValue = Base64.encodeToString(spec.iv, Base64.NO_WRAP)
|
||||||
biometricUnlockCallback?.handleEncryptedResult(encryptedBase64, ivSpecValue)
|
biometricUnlockCallback?.handleEncryptedResult(encryptedBase64, ivSpecValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
val exception = Exception(context.getString(R.string.keystore_not_accessible), e)
|
||||||
Log.e(TAG, "Unable to encrypt data", e)
|
Log.e(TAG, "Unable to encrypt data", e)
|
||||||
biometricUnlockCallback?.onBiometricException(e)
|
biometricUnlockCallback?.onBiometricException(exception)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,8 +248,9 @@ class BiometricUnlockDatabaseHelper(private val context: FragmentActivity) {
|
|||||||
Log.e(TAG, "Unable to decrypt data", badPaddingException)
|
Log.e(TAG, "Unable to decrypt data", badPaddingException)
|
||||||
biometricUnlockCallback?.onInvalidKeyException(badPaddingException)
|
biometricUnlockCallback?.onInvalidKeyException(badPaddingException)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "Unable to decrypt data", e)
|
val exception = Exception(context.getString(R.string.keystore_not_accessible), e)
|
||||||
biometricUnlockCallback?.onBiometricException(e)
|
Log.e(TAG, "Unable to decrypt data", exception)
|
||||||
|
biometricUnlockCallback?.onBiometricException(exception)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user