Revert^2 "Temporarily remove support for biometrics.face@1.1"

cccbd64ff7

Change-Id: I892ac32b31fe94ebe6298553925d2cc7535ee46e
This commit is contained in:
Joshua Mccloskey
2021-02-09 03:46:16 +00:00
parent 15c8bf6793
commit fff77ec289
12 changed files with 14 additions and 37 deletions

View File

@@ -131,8 +131,8 @@ java_library_static {
"android.hardware.light-V1-java",
"android.hardware.tv.cec-V1.0-java",
"android.hardware.weaver-V1.0-java",
"android.hardware.biometrics.face-V1.1-java",
"android.hardware.biometrics.face-V1-java",
"android.hardware.biometrics.face-V1.0-java",
"android.hardware.biometrics.fingerprint-V2.3-java",
"android.hardware.biometrics.fingerprint-V1-java",
"android.hardware.oemlock-V1.0-java",

View File

@@ -46,7 +46,7 @@ import java.util.ArrayList;
/**
* Face-specific authentication client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
class FaceAuthenticationClient extends AuthenticationClient<IBiometricsFace> {

View File

@@ -41,7 +41,7 @@ import java.util.Arrays;
/**
* Face-specific enroll client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
public class FaceEnrollClient extends EnrollClient<IBiometricsFace> {
@@ -103,18 +103,9 @@ public class FaceEnrollClient extends EnrollClient<IBiometricsFace> {
disabledFeatures.add(disabledFeature);
}
android.hardware.biometrics.face.V1_1.IBiometricsFace daemon11 =
android.hardware.biometrics.face.V1_1.IBiometricsFace.castFrom(getFreshDaemon());
try {
final int status;
if (daemon11 != null) {
status = daemon11.enroll_1_1(token, mTimeoutSec, disabledFeatures, mSurfaceHandle);
} else if (mSurfaceHandle == null) {
status = getFreshDaemon().enroll(token, mTimeoutSec, disabledFeatures);
} else {
Slog.e(TAG, "enroll(): surface is only supported in @1.1 HAL");
status = BiometricFaceConstants.FACE_ERROR_UNABLE_TO_PROCESS;
}
final int status = getFreshDaemon().enroll(token, mTimeoutSec, disabledFeatures);
if (status != Status.OK) {
onError(BiometricFaceConstants.FACE_ERROR_UNABLE_TO_PROCESS, 0 /* vendorCode */);
mCallback.onClientFinished(this, false /* success */);

View File

@@ -29,8 +29,7 @@ import com.android.server.biometrics.sensors.GenerateChallengeClient;
/**
* Face-specific generateChallenge client supporting the
* {@link android.hardware.biometrics.face.V1_0} and {@link android.hardware.biometrics.face.V1_1}
* HIDL interfaces.
* {@link android.hardware.biometrics.face.V1_0} HIDL interface.
*/
public class FaceGenerateChallengeClient extends GenerateChallengeClient<IBiometricsFace> {

View File

@@ -33,7 +33,7 @@ import com.android.server.biometrics.sensors.HalClientMonitor;
/**
* Face-specific getFeature client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
public class FaceGetFeatureClient extends HalClientMonitor<IBiometricsFace> {

View File

@@ -33,8 +33,7 @@ import java.util.Map;
/**
* Face-specific internal cleanup client supporting the
* {@link android.hardware.biometrics.face.V1_0} and {@link android.hardware.biometrics.face.V1_1}
* HIDL interfaces.
* {@link android.hardware.biometrics.face.V1_0} HIDL interface.
*/
class FaceInternalCleanupClient extends InternalCleanupClient<Face, IBiometricsFace> {

View File

@@ -32,8 +32,7 @@ import java.util.List;
/**
* Face-specific internal enumerate client supporting the
* {@link android.hardware.biometrics.face.V1_0} and {@link android.hardware.biometrics.face.V1_1}
* HIDL interfaces.
* {@link android.hardware.biometrics.face.V1_0} HIDL interface.
*/
class FaceInternalEnumerateClient extends InternalEnumerateClient<IBiometricsFace> {
private static final String TAG = "FaceInternalEnumerateClient";

View File

@@ -33,7 +33,7 @@ import java.util.Map;
/**
* Face-specific removal client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
class FaceRemovalClient extends RemovalClient<Face, IBiometricsFace> {
private static final String TAG = "FaceRemovalClient";

View File

@@ -30,7 +30,7 @@ import java.util.ArrayList;
/**
* Face-specific resetLockout client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
public class FaceResetLockoutClient extends HalClientMonitor<IBiometricsFace> {

View File

@@ -27,7 +27,7 @@ import com.android.server.biometrics.sensors.RevokeChallengeClient;
/**
* Face-specific revokeChallenge client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
public class FaceRevokeChallengeClient extends RevokeChallengeClient<IBiometricsFace> {

View File

@@ -33,7 +33,7 @@ import java.util.ArrayList;
/**
* Face-specific setFeature client supporting the {@link android.hardware.biometrics.face.V1_0}
* and {@link android.hardware.biometrics.face.V1_1} HIDL interfaces.
* HIDL interface.
*/
public class FaceSetFeatureClient extends HalClientMonitor<IBiometricsFace> {

View File

@@ -18,11 +18,11 @@ package com.android.server.biometrics.sensors.face.hidl;
import android.annotation.Nullable;
import android.hardware.biometrics.face.V1_0.FaceError;
import android.hardware.biometrics.face.V1_0.IBiometricsFace;
import android.hardware.biometrics.face.V1_0.IBiometricsFaceClientCallback;
import android.hardware.biometrics.face.V1_0.OptionalBool;
import android.hardware.biometrics.face.V1_0.OptionalUint64;
import android.hardware.biometrics.face.V1_0.Status;
import android.hardware.biometrics.face.V1_1.IBiometricsFace;
import android.os.NativeHandle;
import android.os.RemoteException;
@@ -118,15 +118,4 @@ public class TestHal extends IBiometricsFace.Stub {
return 0;
}
@Override
public int enrollRemotely(ArrayList<Byte> hat, int timeoutSec,
ArrayList<Integer> disabledFeatures) {
return 0;
}
@Override
public int enroll_1_1(ArrayList<Byte> hat, int timeoutSec, ArrayList<Integer> disabledFeatures,
NativeHandle nativeHandle) {
return 0;
}
}