BiometricAuthenticator: also allow Class 2 biometric implementations (#1046)

Android OEMs are hellspawn

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya
2020-08-23 17:10:13 +05:30
committed by GitHub
parent 2414c48d9f
commit 06497f1db0

View File

@@ -61,7 +61,7 @@ object BiometricAuthenticator {
callback(Result.Success(result.cryptoObject))
}
}
val validAuthenticators = Authenticators.DEVICE_CREDENTIAL or Authenticators.BIOMETRIC_STRONG
val validAuthenticators = Authenticators.DEVICE_CREDENTIAL or Authenticators.BIOMETRIC_WEAK
val canAuth = BiometricManager.from(activity).canAuthenticate(validAuthenticators) == BiometricManager.BIOMETRIC_SUCCESS
val deviceHasKeyguard = activity.getSystemService<KeyguardManager>()?.isDeviceSecure == true
if (canAuth || deviceHasKeyguard) {