Update the default implementation
Bug: 174619156
Test: atest VtsHalBiometricsFaceTargetTest
Change-Id: Ibfa8ace1205ba500a865e09218f4fdc69eb6d8fb
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
index c5d7d23..df51879 100644
--- a/biometrics/face/aidl/default/Session.cpp
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -23,6 +23,7 @@
class CancellationSignal : public common::BnCancellationSignal {
private:
std::shared_ptr<ISessionCallback> cb_;
+
public:
explicit CancellationSignal(std::shared_ptr<ISessionCallback> cb) : cb_(std::move(cb)) {}
@@ -53,10 +54,10 @@
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus Session::enroll(int32_t /*cookie*/, const keymaster::HardwareAuthToken& /*hat*/,
- const NativeHandle& /*previewSurface*/,
- std::shared_ptr<biometrics::common::ICancellationSignal>*
- /*returnVal*/) {
+ndk::ScopedAStatus Session::enroll(
+ int32_t /*cookie*/, biometrics::face::EnrollmentType /*enrollmentType*/,
+ const keymaster::HardwareAuthToken& /*hat*/, const NativeHandle& /*previewSurface*/,
+ std::shared_ptr<biometrics::common::ICancellationSignal>* /*return_val*/) {
return ndk::ScopedAStatus::ok();
}
@@ -86,9 +87,9 @@
ndk::ScopedAStatus Session::removeEnrollments(int32_t /*cookie*/,
const std::vector<int32_t>& /*enrollmentIds*/) {
if (cb_) {
- cb_->onStateChanged(0, SessionState::REMOVING_ENROLLMENTS);
- cb_->onEnrollmentsRemoved(std::vector<int32_t>());
- cb_->onStateChanged(0, SessionState::IDLING);
+ cb_->onStateChanged(0, SessionState::REMOVING_ENROLLMENTS);
+ cb_->onEnrollmentsRemoved(std::vector<int32_t>());
+ cb_->onStateChanged(0, SessionState::IDLING);
}
return ndk::ScopedAStatus::ok();
}
@@ -115,4 +116,5 @@
}
return ndk::ScopedAStatus::ok();
}
+
} // namespace aidl::android::hardware::biometrics::face