mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge changes from topic "fix-IFace-enroll" into sc-dev am: de4d1e954f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15353380 Change-Id: I80eff182e83e0d00793050adaaaf0a26dab80ea2
This commit is contained in:
@@ -1 +1 @@
|
|||||||
945de3635b7f5a09244820eef56035c92fdbd324
|
3b10f5094c5af9fe551093597fab007d1e148256
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ interface ISession {
|
|||||||
void generateChallenge();
|
void generateChallenge();
|
||||||
void revokeChallenge(in long challenge);
|
void revokeChallenge(in long challenge);
|
||||||
android.hardware.biometrics.face.EnrollmentStageConfig[] getEnrollmentConfig(in android.hardware.biometrics.face.EnrollmentType enrollmentType);
|
android.hardware.biometrics.face.EnrollmentStageConfig[] getEnrollmentConfig(in android.hardware.biometrics.face.EnrollmentType enrollmentType);
|
||||||
android.hardware.biometrics.common.ICancellationSignal enroll(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 enroll(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in @nullable android.hardware.common.NativeHandle previewSurface);
|
||||||
android.hardware.biometrics.common.ICancellationSignal authenticate(in long operationId);
|
android.hardware.biometrics.common.ICancellationSignal authenticate(in long operationId);
|
||||||
android.hardware.biometrics.common.ICancellationSignal detectInteraction();
|
android.hardware.biometrics.common.ICancellationSignal detectInteraction();
|
||||||
void enumerateEnrollments();
|
void enumerateEnrollments();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ interface ISession {
|
|||||||
void generateChallenge();
|
void generateChallenge();
|
||||||
void revokeChallenge(in long challenge);
|
void revokeChallenge(in long challenge);
|
||||||
android.hardware.biometrics.face.EnrollmentStageConfig[] getEnrollmentConfig(in android.hardware.biometrics.face.EnrollmentType enrollmentType);
|
android.hardware.biometrics.face.EnrollmentStageConfig[] getEnrollmentConfig(in android.hardware.biometrics.face.EnrollmentType enrollmentType);
|
||||||
android.hardware.biometrics.common.ICancellationSignal enroll(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 enroll(in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.biometrics.face.EnrollmentType type, in android.hardware.biometrics.face.Feature[] features, in @nullable android.hardware.common.NativeHandle previewSurface);
|
||||||
android.hardware.biometrics.common.ICancellationSignal authenticate(in long operationId);
|
android.hardware.biometrics.common.ICancellationSignal authenticate(in long operationId);
|
||||||
android.hardware.biometrics.common.ICancellationSignal detectInteraction();
|
android.hardware.biometrics.common.ICancellationSignal detectInteraction();
|
||||||
void enumerateEnrollments();
|
void enumerateEnrollments();
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ interface ISession {
|
|||||||
* operation.
|
* operation.
|
||||||
*/
|
*/
|
||||||
ICancellationSignal enroll(in HardwareAuthToken hat, in EnrollmentType type,
|
ICancellationSignal enroll(in HardwareAuthToken hat, in EnrollmentType type,
|
||||||
in Feature[] features, in NativeHandle previewSurface);
|
in Feature[] features, in @nullable NativeHandle previewSurface);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* authenticate:
|
* authenticate:
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ ndk::ScopedAStatus Session::getEnrollmentConfig(EnrollmentType /*enrollmentType*
|
|||||||
|
|
||||||
ndk::ScopedAStatus Session::enroll(
|
ndk::ScopedAStatus Session::enroll(
|
||||||
const keymaster::HardwareAuthToken& /*hat*/, EnrollmentType /*enrollmentType*/,
|
const keymaster::HardwareAuthToken& /*hat*/, EnrollmentType /*enrollmentType*/,
|
||||||
const std::vector<Feature>& /*features*/, const NativeHandle& /*previewSurface*/,
|
const std::vector<Feature>& /*features*/,
|
||||||
|
const std::optional<NativeHandle>& /*previewSurface*/,
|
||||||
std::shared_ptr<biometrics::common::ICancellationSignal>* /*return_val*/) {
|
std::shared_ptr<biometrics::common::ICancellationSignal>* /*return_val*/) {
|
||||||
LOG(INFO) << "enroll";
|
LOG(INFO) << "enroll";
|
||||||
if (cb_) {
|
if (cb_) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class Session : public BnSession {
|
|||||||
|
|
||||||
ndk::ScopedAStatus enroll(const keymaster::HardwareAuthToken& hat,
|
ndk::ScopedAStatus enroll(const keymaster::HardwareAuthToken& hat,
|
||||||
EnrollmentType enrollmentType, const std::vector<Feature>& features,
|
EnrollmentType enrollmentType, const std::vector<Feature>& features,
|
||||||
const NativeHandle& previewSurface,
|
const std::optional<NativeHandle>& previewSurface,
|
||||||
std::shared_ptr<common::ICancellationSignal>* return_val) override;
|
std::shared_ptr<common::ICancellationSignal>* return_val) override;
|
||||||
|
|
||||||
ndk::ScopedAStatus authenticate(
|
ndk::ScopedAStatus authenticate(
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ TEST_P(Face, EnrollWithBadHatResultsInErrorTest) {
|
|||||||
auto hat = keymaster::HardwareAuthToken{};
|
auto hat = keymaster::HardwareAuthToken{};
|
||||||
std::shared_ptr<common::ICancellationSignal> cancellationSignal;
|
std::shared_ptr<common::ICancellationSignal> cancellationSignal;
|
||||||
ASSERT_TRUE(
|
ASSERT_TRUE(
|
||||||
mSession->enroll(hat, EnrollmentType::DEFAULT, {}, NativeHandle{}, &cancellationSignal)
|
mSession->enroll(hat, EnrollmentType::DEFAULT, {}, std::nullopt, &cancellationSignal)
|
||||||
.isOk());
|
.isOk());
|
||||||
|
|
||||||
// Make sure an error is returned.
|
// Make sure an error is returned.
|
||||||
|
|||||||
Reference in New Issue
Block a user