summaryrefslogtreecommitdiff
path: root/biometrics/face/aidl/default
diff options
context:
space:
mode:
Diffstat (limited to 'biometrics/face/aidl/default')
-rw-r--r--biometrics/face/aidl/default/Android.bp4
-rw-r--r--biometrics/face/aidl/default/Session.cpp21
-rw-r--r--biometrics/face/aidl/default/Session.h14
-rw-r--r--biometrics/face/aidl/default/face-default.xml1
4 files changed, 38 insertions, 2 deletions
diff --git a/biometrics/face/aidl/default/Android.bp b/biometrics/face/aidl/default/Android.bp
index 509231859d..7f66ecaf83 100644
--- a/biometrics/face/aidl/default/Android.bp
+++ b/biometrics/face/aidl/default/Android.bp
@@ -16,8 +16,8 @@ cc_binary {
shared_libs: [
"libbase",
"libbinder_ndk",
- "android.hardware.biometrics.face-V1-ndk",
- "android.hardware.biometrics.common-V1-ndk",
+ "android.hardware.biometrics.face-V2-ndk",
+ "android.hardware.biometrics.common-V2-ndk",
],
srcs: [
"main.cpp",
diff --git a/biometrics/face/aidl/default/Session.cpp b/biometrics/face/aidl/default/Session.cpp
index 01cb620b35..9e753e5c33 100644
--- a/biometrics/face/aidl/default/Session.cpp
+++ b/biometrics/face/aidl/default/Session.cpp
@@ -151,4 +151,25 @@ ndk::ScopedAStatus Session::close() {
return ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus Session::authenticateWithContext(
+ int64_t operationId, const common::OperationContext& /*context*/,
+ std::shared_ptr<common::ICancellationSignal>* out) {
+ return authenticate(operationId, out);
+}
+
+ndk::ScopedAStatus Session::enrollWithContext(const keymaster::HardwareAuthToken& hat,
+ EnrollmentType enrollmentType,
+ const std::vector<Feature>& features,
+ const std::optional<NativeHandle>& previewSurface,
+ const common::OperationContext& /*context*/,
+ std::shared_ptr<common::ICancellationSignal>* out) {
+ return enroll(hat, enrollmentType, features, previewSurface, out);
+}
+
+ndk::ScopedAStatus Session::detectInteractionWithContext(
+ const common::OperationContext& /*context*/,
+ std::shared_ptr<common::ICancellationSignal>* out) {
+ return detectInteraction(out);
+}
+
} // namespace aidl::android::hardware::biometrics::face
diff --git a/biometrics/face/aidl/default/Session.h b/biometrics/face/aidl/default/Session.h
index 4152909a49..0ce9e2060e 100644
--- a/biometrics/face/aidl/default/Session.h
+++ b/biometrics/face/aidl/default/Session.h
@@ -68,6 +68,20 @@ class Session : public BnSession {
ndk::ScopedAStatus close() override;
+ ndk::ScopedAStatus authenticateWithContext(
+ int64_t operationId, const common::OperationContext& context,
+ std::shared_ptr<common::ICancellationSignal>* out) override;
+
+ ndk::ScopedAStatus enrollWithContext(
+ const keymaster::HardwareAuthToken& hat, EnrollmentType enrollmentType,
+ const std::vector<Feature>& features, const std::optional<NativeHandle>& previewSurface,
+ const common::OperationContext& context,
+ std::shared_ptr<common::ICancellationSignal>* out) override;
+
+ ndk::ScopedAStatus detectInteractionWithContext(
+ const common::OperationContext& context,
+ std::shared_ptr<common::ICancellationSignal>* out) override;
+
private:
std::shared_ptr<ISessionCallback> cb_;
std::mt19937 mRandom;
diff --git a/biometrics/face/aidl/default/face-default.xml b/biometrics/face/aidl/default/face-default.xml
index 6915ad0a4d..e6ef842734 100644
--- a/biometrics/face/aidl/default/face-default.xml
+++ b/biometrics/face/aidl/default/face-default.xml
@@ -1,6 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.biometrics.face</name>
+ <version>2</version>
<fqname>IFace/default</fqname>
</hal>
</manifest>