mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge changes from topic "IFace-authentication-features"
* changes: Update the VTS test Update the default implementation Add methonds to set and get authentication features
This commit is contained in:
committed by
Android (Google) Code Review
commit
f36c0b69ef
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.biometrics.face;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum Feature {
|
||||
WAVE_ATTENTION_REQUIREMENT = 0,
|
||||
WAVE_DIVERSE_POSES_REQUIREMENT = 1,
|
||||
DEBUG = 2,
|
||||
}
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,11 +35,13 @@ package android.hardware.biometrics.face;
|
||||
interface ISession {
|
||||
void generateChallenge(in int cookie, in int timeoutSec);
|
||||
void revokeChallenge(in int cookie, in long challenge);
|
||||
android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.biometrics.face.EnrollmentType enrollmentType, in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.common.NativeHandle previewSurface);
|
||||
android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in android.hardware.common.NativeHandle previewSurface);
|
||||
android.hardware.biometrics.common.ICancellationSignal authenticate(in int cookie, in long operationId);
|
||||
android.hardware.biometrics.common.ICancellationSignal detectInteraction(in int cookie);
|
||||
void enumerateEnrollments(in int cookie);
|
||||
void removeEnrollments(in int cookie, in int[] enrollmentIds);
|
||||
void getFeatures(in int cookie, in int enrollmentId);
|
||||
void setFeature(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat, in int enrollmentId, in android.hardware.biometrics.face.Feature feature, boolean enabled);
|
||||
void getAuthenticatorId(in int cookie);
|
||||
void invalidateAuthenticatorId(in int cookie);
|
||||
void resetLockout(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat);
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -33,6 +47,8 @@ interface ISessionCallback {
|
||||
void onLockoutCleared();
|
||||
void onInteractionDetected();
|
||||
void onEnrollmentsEnumerated(in int[] enrollmentIds);
|
||||
void onFeaturesRetrieved(in android.hardware.biometrics.face.Feature[] features, in int enrollmentId);
|
||||
void onFeatureSet(in int enrollmentId, android.hardware.biometrics.face.Feature feature);
|
||||
void onEnrollmentsRemoved(in int[] enrollmentIds);
|
||||
void onAuthenticatorIdRetrieved(in long authenticatorId);
|
||||
void onAuthenticatorIdInvalidated(in long newAuthenticatorId);
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -28,7 +42,9 @@ enum SessionState {
|
||||
DETECTING_INTERACTION = 6,
|
||||
ENUMERATING_ENROLLMENTS = 7,
|
||||
REMOVING_ENROLLMENTS = 8,
|
||||
GETTING_AUTHENTICATOR_ID = 9,
|
||||
INVALIDATING_AUTHENTICATOR_ID = 10,
|
||||
RESETTING_LOCKOUT = 11,
|
||||
GETTING_FEATURES = 9,
|
||||
SETTING_FEATURE = 10,
|
||||
GETTING_AUTHENTICATOR_ID = 11,
|
||||
INVALIDATING_AUTHENTICATOR_ID = 12,
|
||||
RESETTING_LOCKOUT = 13,
|
||||
}
|
||||
|
||||
@@ -32,9 +32,8 @@ enum Error {
|
||||
HW_UNAVAILABLE = 1,
|
||||
|
||||
/**
|
||||
* The current enroll or authenticate operation could not be completed,
|
||||
* e.g. the sensor was unable to process the current image or the HAT was
|
||||
* invalid.
|
||||
* The current operation could not be completed, e.g. the sensor was unable
|
||||
* to process the current image or the HAT was invalid.
|
||||
*/
|
||||
UNABLE_TO_PROCESS = 2,
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.biometrics.face;
|
||||
|
||||
@VintfStability
|
||||
@Backing(type="byte")
|
||||
enum Feature {
|
||||
/**
|
||||
* Do not require the user to look at the device during enrollment and authentication. Note
|
||||
* this is to accommodate people who have limited vision.
|
||||
*/
|
||||
WAVE_ATTENTION_REQUIREMENT,
|
||||
|
||||
/**
|
||||
* Do not require a diverse set of poses during enrollment. This is to accommodate people with
|
||||
* limited mobility.
|
||||
*/
|
||||
WAVE_DIVERSE_POSES_REQUIREMENT,
|
||||
|
||||
/**
|
||||
* Enable debugging functionality.
|
||||
*/
|
||||
DEBUG,
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
package android.hardware.biometrics.face;
|
||||
|
||||
import android.hardware.biometrics.common.ICancellationSignal;
|
||||
import android.hardware.biometrics.face.Feature;
|
||||
import android.hardware.biometrics.face.EnrollmentType;
|
||||
import android.hardware.keymaster.HardwareAuthToken;
|
||||
import android.hardware.common.NativeHandle;
|
||||
|
||||
/**
|
||||
* A session is a collection of immutable state (sensorId, userId), mutable state (SessionState),
|
||||
/** * A session is a collection of immutable state (sensorId, userId), mutable state (SessionState),
|
||||
* methods available for the framework to call, and a callback (ISessionCallback) to notify the
|
||||
* framework about the events and results. A session is used to establish communication between
|
||||
* the framework and the HAL.
|
||||
@@ -131,16 +131,17 @@ interface ISession {
|
||||
*
|
||||
* @param cookie An identifier used to track subsystem operations related to this call path. The
|
||||
* client must guarantee that it is unique per ISession.
|
||||
* @param hat See above documentation.
|
||||
* @param enrollmentType See the EnrollmentType enum.
|
||||
* @param features See the Feature enum.
|
||||
* @param previewSurface A surface provided by the framework if SensorProps#halControlsPreview is
|
||||
* set to true. The HAL must send the preview frames to previewSurface if
|
||||
* it's not null.
|
||||
* @param hat See above documentation.
|
||||
* @return ICancellationSignal An object that can be used by the framework to cancel this
|
||||
* operation.
|
||||
*/
|
||||
ICancellationSignal enroll(in int cookie, in EnrollmentType enrollmentType,
|
||||
in HardwareAuthToken hat, in NativeHandle previewSurface);
|
||||
ICancellationSignal enroll(in int cookie, in HardwareAuthToken hat, in EnrollmentType type,
|
||||
in Feature[] features, in NativeHandle previewSurface);
|
||||
|
||||
/**
|
||||
* authenticate:
|
||||
@@ -265,6 +266,54 @@ interface ISession {
|
||||
*/
|
||||
void removeEnrollments(in int cookie, in int[] enrollmentIds);
|
||||
|
||||
/**
|
||||
* getFeatures:
|
||||
*
|
||||
* Returns a list of currently enabled features for the provided enrollmentId.
|
||||
*
|
||||
* If the enrollmentId is invalid, the HAL must invoke ISessionCallback#onError with
|
||||
* Error::UNABLE_TO_PROCESS and return to SessionState::IDLING if no subsequent work is in the
|
||||
* queue.
|
||||
*
|
||||
* Once the HAL is able to start processing this request, it must notify the framework by using
|
||||
* ISessionCallback#onStateChanged with SessionState::GETTING_FEATURES.
|
||||
*
|
||||
* The HAL must notify the framework about the result by calling
|
||||
* ISessionCallback#onFeaturesRetrieved.
|
||||
*
|
||||
* @param cookie An identifier used to track subsystem operations related to this call path. The
|
||||
* client must guarantee that it is unique per ISession.
|
||||
* @param enrollmentId the ID of the enrollment for which the features are requested.
|
||||
*/
|
||||
void getFeatures(in int cookie, in int enrollmentId);
|
||||
|
||||
/**
|
||||
* setFeature:
|
||||
*
|
||||
* Enables or disables a feature for the given enrollmentId. Because certain features may
|
||||
* decrease security, the user must enter their password before this method is invoked
|
||||
* (see @param hat). The HAL must verify the hat before changing any feature state.
|
||||
*
|
||||
* If either the hat or enrollmentId is invalid, the HAL must invoke ISessionCallback#onError
|
||||
* with Error::UNABLE_TO_PROCESS and return to SessionState::IDLING if no subsequent work is in
|
||||
* the queue.
|
||||
*
|
||||
* Once the HAL is able to start processing this request, it must notify the framework by using
|
||||
* ISessionCallback#onStateChanged with SessionState::SETTING_FEATURE.
|
||||
*
|
||||
* After the feature is successfully set, the HAL must notify the framework by calling
|
||||
* ISessionCallback#onFeatureSet.
|
||||
*
|
||||
* @param cookie An identifier used to track subsystem operations related to this call path. The
|
||||
* client must guarantee that it is unique per ISession.
|
||||
* @param hat HardwareAuthToken See above documentation.
|
||||
* @param enrollmentId the ID of the enrollment for which the feature update is requested.
|
||||
* @param feature The feature to be enabled or disabled.
|
||||
* @param enabled Whether the provided features should be enabled or disabled.
|
||||
*/
|
||||
void setFeature(in int cookie, in HardwareAuthToken hat, in int enrollmentId,
|
||||
in Feature feature, boolean enabled);
|
||||
|
||||
/**
|
||||
* getAuthenticatorId:
|
||||
*
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.hardware.biometrics.face;
|
||||
|
||||
import android.hardware.biometrics.face.AcquiredInfo;
|
||||
import android.hardware.biometrics.face.Feature;
|
||||
import android.hardware.biometrics.face.AuthenticationFrame;
|
||||
import android.hardware.biometrics.face.EnrollmentFrame;
|
||||
import android.hardware.biometrics.face.Error;
|
||||
@@ -177,6 +178,26 @@ interface ISessionCallback {
|
||||
*/
|
||||
void onEnrollmentsEnumerated(in int[] enrollmentIds);
|
||||
|
||||
/**
|
||||
* This method must only be used to notify the framework during SessionState::GETTING_FEATURES.
|
||||
*
|
||||
* Provides a list of features that are currently enabled for the given enrollmentId.
|
||||
*
|
||||
* @param features A list of currently enabled features. See the Feature enum.
|
||||
* @param enrollmentId The enrollment for which the features were requested.
|
||||
*/
|
||||
void onFeaturesRetrieved(in Feature[] features, in int enrollmentId);
|
||||
|
||||
/**
|
||||
* This method must only be used to notify the framework during SessionState::SETTING_FEATURE.
|
||||
*
|
||||
* Notifies the framework that ISession#setFeature has completed.
|
||||
*
|
||||
* @param enrollmentId The enrollment for which a feature was set.
|
||||
* @param feature The feature that was set.
|
||||
*/
|
||||
void onFeatureSet(in int enrollmentId, Feature feature);
|
||||
|
||||
/**
|
||||
* This method must only be used to notify the framework during
|
||||
* SessionState::REMOVING_ENROLLMENTS.
|
||||
|
||||
@@ -64,6 +64,16 @@ enum SessionState {
|
||||
*/
|
||||
REMOVING_ENROLLMENTS,
|
||||
|
||||
/**
|
||||
* The HAL is processing the ISession#getFeatures request.
|
||||
*/
|
||||
GETTING_FEATURES,
|
||||
|
||||
/**
|
||||
* The HAL is processing the ISession#setFeature request.
|
||||
*/
|
||||
SETTING_FEATURE,
|
||||
|
||||
/**
|
||||
* The HAL is processing the ISession#getAuthenticatorId request.
|
||||
*/
|
||||
|
||||
@@ -55,8 +55,9 @@ ndk::ScopedAStatus Session::revokeChallenge(int32_t /*cookie*/, int64_t challeng
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Session::enroll(
|
||||
int32_t /*cookie*/, biometrics::face::EnrollmentType /*enrollmentType*/,
|
||||
const keymaster::HardwareAuthToken& /*hat*/, const NativeHandle& /*previewSurface*/,
|
||||
int32_t /*cookie*/, const keymaster::HardwareAuthToken& /*hat*/,
|
||||
EnrollmentType /*enrollmentType*/, const std::vector<Feature>& /*features*/,
|
||||
const NativeHandle& /*previewSurface*/,
|
||||
std::shared_ptr<biometrics::common::ICancellationSignal>* /*return_val*/) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
@@ -94,6 +95,17 @@ ndk::ScopedAStatus Session::removeEnrollments(int32_t /*cookie*/,
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Session::getFeatures(int32_t /*cookie*/, int32_t /*enrollmentId*/) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Session::setFeature(int32_t /*cookie*/,
|
||||
const keymaster::HardwareAuthToken& /*hat*/,
|
||||
int32_t /*enrollmentId*/, Feature /*feature*/,
|
||||
bool /*enabled*/) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Session::getAuthenticatorId(int32_t /*cookie*/) {
|
||||
if (cb_) {
|
||||
cb_->onStateChanged(0, SessionState::GETTING_AUTHENTICATOR_ID);
|
||||
|
||||
@@ -34,10 +34,10 @@ class Session : public BnSession {
|
||||
|
||||
ndk::ScopedAStatus revokeChallenge(int32_t cookie, int64_t challenge) override;
|
||||
|
||||
ndk::ScopedAStatus enroll(
|
||||
int32_t cookie, biometrics::face::EnrollmentType enrollmentType,
|
||||
const keymaster::HardwareAuthToken& hat, const NativeHandle& previewSurface,
|
||||
std::shared_ptr<biometrics::common::ICancellationSignal>* return_val) override;
|
||||
ndk::ScopedAStatus enroll(int32_t cookie, const keymaster::HardwareAuthToken& hat,
|
||||
EnrollmentType enrollmentType, const std::vector<Feature>& features,
|
||||
const NativeHandle& previewSurface,
|
||||
std::shared_ptr<common::ICancellationSignal>* return_val) override;
|
||||
|
||||
ndk::ScopedAStatus authenticate(
|
||||
int32_t cookie, int64_t keystoreOperationId,
|
||||
@@ -51,6 +51,11 @@ class Session : public BnSession {
|
||||
ndk::ScopedAStatus removeEnrollments(int32_t cookie,
|
||||
const std::vector<int32_t>& enrollmentIds) override;
|
||||
|
||||
ndk::ScopedAStatus getFeatures(int32_t cookie, int32_t enrollmentId) override;
|
||||
|
||||
ndk::ScopedAStatus setFeature(int32_t cookie, const keymaster::HardwareAuthToken& hat,
|
||||
int32_t enrollmentId, Feature feature, bool enabled) override;
|
||||
|
||||
ndk::ScopedAStatus getAuthenticatorId(int32_t cookie) override;
|
||||
|
||||
ndk::ScopedAStatus invalidateAuthenticatorId(int32_t cookie) override;
|
||||
|
||||
@@ -103,6 +103,15 @@ class SessionCallback : public BnSessionCallback {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus onFeaturesRetrieved(const std::vector<Feature>& /*features*/,
|
||||
int32_t /*enrollmentId*/) override {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus onFeatureSet(int32_t /*enrollmentId*/, Feature /*feature*/) override {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus onAuthenticatorIdRetrieved(int64_t /*authenticatorId*/) override {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user