From: Simon1511 Date: Sat, 26 Aug 2023 15:25:24 +0000 (+0200) Subject: samsung: fingerprint: support optical sensors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a48251f6e5c9bc2f1d6e5b3610e1630444638062;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git samsung: fingerprint: support optical sensors Change-Id: I06d9aab53f3cd900247ca23b83eaff79dccecf46 --- diff --git a/hidl/fingerprint/Android.mk b/hidl/fingerprint/Android.mk index b83a27f..acd6bc5 100644 --- a/hidl/fingerprint/Android.mk +++ b/hidl/fingerprint/Android.mk @@ -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 diff --git a/hidl/fingerprint/BiometricsFingerprint.cpp b/hidl/fingerprint/BiometricsFingerprint.cpp index 1d82b13..1e24391 100644 --- a/hidl/fingerprint/BiometricsFingerprint.cpp +++ b/hidl/fingerprint/BiometricsFingerprint.cpp @@ -102,10 +102,16 @@ Return BiometricsFingerprint::isUdfps(uint32_t) { } Return BiometricsFingerprint::onFingerDown(uint32_t, uint32_t, float, float) { +#ifdef REQUEST_TOUCH_EVENT + request(SEM_REQUEST_TOUCH_EVENT, 2); +#endif return Void(); } Return BiometricsFingerprint::onFingerUp() { +#ifdef REQUEST_TOUCH_EVENT + request(SEM_REQUEST_TOUCH_EVENT, 1); +#endif return Void(); }