samsung: fingerprint: support optical sensors
authorSimon1511 <me@simon1511.de>
Sat, 26 Aug 2023 15:25:24 +0000 (17:25 +0200)
committerSimon1511 <me@simon1511.de>
Sun, 17 Sep 2023 11:10:55 +0000 (13:10 +0200)
Change-Id: I06d9aab53f3cd900247ca23b83eaff79dccecf46

hidl/fingerprint/Android.mk
hidl/fingerprint/BiometricsFingerprint.cpp

index b83a27fdd191d9b16a0a0b7a7d7421aff1ee1591..acd6bc5f976fcae0762d19dc47dd3d822773f7c9 100644 (file)
@@ -52,6 +52,10 @@ ifeq ($(TARGET_SEC_FP_REQUEST_FORCE_CALIBRATE),true)
     LOCAL_CFLAGS += -DREQUEST_FORCE_CALIBRATE
 endif
 
+ifeq ($(TARGET_SEC_FP_REQUEST_TOUCH_EVENT),true)
+    LOCAL_CFLAGS += -DREQUEST_TOUCH_EVENT
+endif
+
 LOCAL_MODULE := android.hardware.biometrics.fingerprint@2.3-service.samsung
 LOCAL_INIT_RC := android.hardware.biometrics.fingerprint@2.3-service.samsung.rc
 LOCAL_VINTF_FRAGMENTS := android.hardware.biometrics.fingerprint@2.3-service.samsung.xml
index 1d82b13f36220d344eceeab7574bc5d173dd2425..1e24391352a0fec0d079356349a84a7ac718bcea 100644 (file)
@@ -102,10 +102,16 @@ Return<bool> BiometricsFingerprint::isUdfps(uint32_t) {
 }
 
 Return<void> BiometricsFingerprint::onFingerDown(uint32_t, uint32_t, float, float) {
+#ifdef REQUEST_TOUCH_EVENT
+    request(SEM_REQUEST_TOUCH_EVENT, 2);
+#endif
     return Void();
 }
 
 Return<void> BiometricsFingerprint::onFingerUp() {
+#ifdef REQUEST_TOUCH_EVENT
+    request(SEM_REQUEST_TOUCH_EVENT, 1);
+#endif
     return Void();
 }