Check for null in addition to instanceof Face
We only send a Face object if the client holds the MANAGE_BIOMETRIC permission. Otherwise we send null. Fixes the issue where clients that don't have the MANAGE_BIOMETRIC permission don't receive onAuthenticationSucceeded callback. Test: Builds Change-Id: If1742570ebe914d0ba7da17e60655fed3c9a4b39
This commit is contained in:
@@ -485,7 +485,7 @@ public class FaceService extends BiometricServiceBase {
|
||||
BiometricAuthenticator.Identifier biometric, int userId)
|
||||
throws RemoteException {
|
||||
if (mFaceServiceReceiver != null) {
|
||||
if (biometric instanceof Face) {
|
||||
if (biometric == null || biometric instanceof Face) {
|
||||
mFaceServiceReceiver.onAuthenticationSucceeded(deviceId, (Face)biometric);
|
||||
} else {
|
||||
Slog.e(TAG, "onAuthenticationSucceeded received non-face biometric");
|
||||
|
||||
Reference in New Issue
Block a user