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

Commit 7de78b43 authored by Joe Bolinger's avatar Joe Bolinger
Browse files

Add new methods to TestHal.

Bug: 204585936
Bug: 204584403
Test: atest VtsHalBiometricsFaceTargetTest
Change-Id: I972582cd2711001e4f1dc5beb5a80885e3fbb0c9
parent 507dcd4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ java_library_static {
    name: "services.core.unboosted",
    defaults: ["platform_service_defaults"],
    srcs: [
        ":android.hardware.biometrics.face-V1-java-source",
        ":android.hardware.biometrics.face-V2-java-source",
        ":statslog-art-java-gen",
        ":statslog-contexthub-java-gen",
        ":services.core-sources",
+19 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.biometrics.sensors.face.aidl;

import android.hardware.biometrics.common.ICancellationSignal;
import android.hardware.biometrics.common.OperationContext;
import android.hardware.biometrics.face.EnrollmentStageConfig;
import android.hardware.biometrics.face.Error;
import android.hardware.biometrics.face.IFace;
@@ -188,6 +189,24 @@ public class TestHal extends IFace.Stub {
                Slog.w(TAG, "close");
                cb.onSessionClosed();
            }

            @Override
            public ICancellationSignal authenticateWithContext(
                    long operationId, OperationContext context) {
                return authenticate(operationId);
            }

            @Override
            public ICancellationSignal enrollWithContext(
                    HardwareAuthToken hat, byte enrollmentType, byte[] features,
                    NativeHandle previewSurface, OperationContext context) {
                return enroll(hat, enrollmentType, features, previewSurface);
            }

            @Override
            public ICancellationSignal detectInteractionWithContext(OperationContext context) {
                return detectInteraction();
            }
        };
    }
}