diff --git a/udfps/Android.bp b/udfps/Android.bp index 9ae3534..ab188d8 100644 --- a/udfps/Android.bp +++ b/udfps/Android.bp @@ -11,6 +11,9 @@ cc_library { shared_libs: [ "libbase", ], + static_libs: [ + "android.hardware.biometrics.fingerprint-V4-ndk", + ], header_libs: [ "generated_kernel_headers", "//hardware/xiaomi:xiaomifingerprint_headers", diff --git a/udfps/UdfpsHandler.cpp b/udfps/UdfpsHandler.cpp index 66856b2..5484e53 100644 --- a/udfps/UdfpsHandler.cpp +++ b/udfps/UdfpsHandler.cpp @@ -6,6 +6,7 @@ #define LOG_TAG "UdfpsHandler.xiaomi_sm8450" +#include #include #include #include @@ -38,6 +39,8 @@ #define FOD_PRESS_STATUS_PATH "/sys/class/touch/touch_dev/fod_press_status" +using ::aidl::android::hardware::biometrics::fingerprint::AcquiredInfo; + namespace { static bool readBool(int fd) { @@ -203,7 +206,7 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler { void onAcquired(int32_t result, int32_t vendorCode) { LOG(DEBUG) << __func__ << " result: " << result << " vendorCode: " << vendorCode; - if (result == FINGERPRINT_ACQUIRED_GOOD) { + if (static_cast(result) == AcquiredInfo::GOOD) { setFingerDown(false); } }