Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 628b7188 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

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
parent b608ad49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");