diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-07-27 00:35:33 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-07-27 00:35:33 +0000 |
commit | e7e8fb975a53e6bf3e4fb4a7f6014b87812c96c7 (patch) | |
tree | 0cdf058bfc28f20caba1bb6673ffbb8c5e9231e8 /biometrics | |
parent | a873ab2d9639bc1c49e17679b1477cdb596bc462 (diff) | |
parent | de4d1e954f0616f84db294202fee140a15103357 (diff) |
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: I20d803aac7971185026439162ba7cc52a58b83db
Diffstat (limited to 'biometrics')
7 files changed, 8 insertions, 7 deletions
diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/.hash b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/.hash index b8d5097cc9..f5ad87fca7 100644 --- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/.hash +++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/.hash @@ -1 +1 @@ -945de3635b7f5a09244820eef56035c92fdbd324 +3b10f5094c5af9fe551093597fab007d1e148256 diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/android/hardware/biometrics/face/ISession.aidl index d1c2c1dd47..78178642cd 100644 --- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/android/hardware/biometrics/face/ISession.aidl +++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/1/android/hardware/biometrics/face/ISession.aidl @@ -37,7 +37,7 @@ interface ISession { void generateChallenge(); void revokeChallenge(in long challenge); 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 detectInteraction(); void enumerateEnrollments(); diff --git a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl index d1c2c1dd47..78178642cd 100644 --- a/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl +++ b/biometrics/face/aidl/aidl_api/android.hardware.biometrics.face/current/android/hardware/biometrics/face/ISession.aidl @@ -37,7 +37,7 @@ interface ISession { void generateChallenge(); void revokeChallenge(in long challenge); 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 detectInteraction(); void enumerateEnrollments(); diff --git a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl index 2a57e3aa46..5f06b408e8 100644 --- a/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl +++ b/biometrics/face/aidl/android/hardware/biometrics/face/ISession.aidl @@ -154,7 +154,7 @@ interface ISession { * operation. */ ICancellationSignal enroll(in HardwareAuthToken hat, in EnrollmentType type, - in Feature[] features, in NativeHandle previewSurface); + in Feature[] features, in @nullable NativeHandle previewSurface); /** * authenticate: diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp index 39f37538f7..01cb620b35 100644 --- a/biometrics/face/aidl/default/Session.cpp +++ b/biometrics/face/aidl/default/Session.cpp @@ -63,7 +63,8 @@ ndk::ScopedAStatus Session::getEnrollmentConfig(EnrollmentType /*enrollmentType* ndk::ScopedAStatus Session::enroll( 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*/) { LOG(INFO) << "enroll"; if (cb_) { diff --git a/biometrics/face/aidl/default/Session.h b/biometrics/face/aidl/default/Session.h index 4d213e3860..4152909a49 100644 --- a/biometrics/face/aidl/default/Session.h +++ b/biometrics/face/aidl/default/Session.h @@ -41,7 +41,7 @@ class Session : public BnSession { ndk::ScopedAStatus enroll(const keymaster::HardwareAuthToken& hat, EnrollmentType enrollmentType, const std::vector<Feature>& features, - const NativeHandle& previewSurface, + const std::optional<NativeHandle>& previewSurface, std::shared_ptr<common::ICancellationSignal>* return_val) override; ndk::ScopedAStatus authenticate( diff --git a/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp b/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp index 8906b8d935..08ab5d694b 100644 --- a/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp +++ b/biometrics/face/aidl/vts/VtsHalBiometricsFaceTargetTest.cpp @@ -214,7 +214,7 @@ TEST_P(Face, EnrollWithBadHatResultsInErrorTest) { auto hat = keymaster::HardwareAuthToken{}; std::shared_ptr<common::ICancellationSignal> cancellationSignal; ASSERT_TRUE( - mSession->enroll(hat, EnrollmentType::DEFAULT, {}, NativeHandle{}, &cancellationSignal) + mSession->enroll(hat, EnrollmentType::DEFAULT, {}, std::nullopt, &cancellationSignal) .isOk()); // Make sure an error is returned. |