Forward correct biometric in AuthenticationClient
Fixes: 111609174
Test: fingerprint still works in settings/keyguard
Change-Id: Ibbb0d45e945ce5ccbc93e7057d1bd52e1fb1ca20
diff --git a/services/core/java/com/android/server/biometrics/common/BiometricService.java b/services/core/java/com/android/server/biometrics/common/BiometricService.java
index 41b1575..f54baef 100644
--- a/services/core/java/com/android/server/biometrics/common/BiometricService.java
+++ b/services/core/java/com/android/server/biometrics/common/BiometricService.java
@@ -577,20 +577,22 @@
}
}
- protected void handleAuthenticated(long deviceId, int biometricId, int groupId,
+ protected void handleAuthenticated(BiometricAuthenticator.Identifier identifier,
ArrayList<Byte> token) {
ClientMonitor client = mCurrentClient;
- if (biometricId != 0) {
+ final boolean authenticated = identifier.getBiometricId() != 0;
+
+ if (authenticated) {
final byte[] byteToken = new byte[token.size()];
for (int i = 0; i < token.size(); i++) {
byteToken[i] = token.get(i);
}
KeyStore.getInstance().addAuthToken(byteToken);
}
- if (client != null && client.onAuthenticated(biometricId, groupId)) {
+ if (client != null && client.onAuthenticated(identifier, authenticated)) {
removeClient(client);
}
- if (biometricId != 0) {
+ if (authenticated) {
mPerformanceStats.accept++;
} else {
mPerformanceStats.reject++;