rtwo: fingerprint: use sysfs node

This commit is contained in:
SGCMarkus
2023-07-22 17:46:25 +02:00
parent 15f6bd4151
commit 5fc03152c2
3 changed files with 5 additions and 7 deletions

View File

@@ -12,7 +12,6 @@ cc_binary {
shared_libs: [
"libbase",
"libhidlbase",
"libMotoPanelFeature",
"liblog",
"libutils",
"android.hardware.biometrics.fingerprint@2.1",

View File

@@ -21,7 +21,6 @@
#include <android-base/logging.h>
#include <fcntl.h>
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <chrono>
@@ -29,11 +28,11 @@
#include <fstream>
#include <thread>
#include <libMotoPanelFeature.h>
#define NOTIFY_FINGER_UP IMotFodEventType::FINGER_UP
#define NOTIFY_FINGER_DOWN IMotFodEventType::FINGER_DOWN
#define FOD_HBM_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_hbm"
namespace android {
namespace hardware {
namespace biometrics {
@@ -42,7 +41,7 @@ namespace V2_3 {
namespace implementation {
void setFodHbm(bool status) {
setFodHbmState(status);
android::base::WriteStringToFile(status ? "1" : "0", FOD_HBM_PATH);
}
void BiometricsFingerprint::disableHighBrightFod() {

View File

@@ -1,5 +1,5 @@
#on init
# chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_hbm
on init
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_hbm
service fps_hal.rtwo /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.rtwo
# "class hal" causes a race condition on some devices due to files created