diff --git a/udfps/Android.bp b/udfps/Android.bp index 41adbf2..78d92a3 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: [ "//hardware/xiaomi:xiaomifingerprint_headers", ], diff --git a/udfps/UdfpsHandler.cpp b/udfps/UdfpsHandler.cpp index 1ad9082..07575e5 100644 --- a/udfps/UdfpsHandler.cpp +++ b/udfps/UdfpsHandler.cpp @@ -6,6 +6,7 @@ #define LOG_TAG "UdfpsHandler.xiaomi_sm8350" +#include #include #include @@ -35,6 +36,8 @@ #define PARAM_FOD_PRESSED 1 #define PARAM_FOD_RELEASED 0 +using ::aidl::android::hardware::biometrics::fingerprint::AcquiredInfo; + template static void set(const std::string& path, const T& value) { std::ofstream file(path); @@ -117,7 +120,7 @@ class XiaomiUdfpsHandler : public UdfpsHandler { } void onAcquired(int32_t result, int32_t vendorCode) { - if (result == FINGERPRINT_ACQUIRED_GOOD) { + if (static_cast(result) == AcquiredInfo::GOOD) { set(FOD_HBM_PATH, FOD_HBM_OFF); set(FOD_STATUS_PATH, FOD_STATUS_OFF); } else if (vendorCode == 21) {