11
11
#include < android-base/logging.h>
12
12
#include < android-base/unique_fd.h>
13
13
#include < fcntl.h>
14
- #include < fstream>
15
14
#include < poll.h>
16
15
#include < thread>
17
16
#include < unistd.h>
28
27
#define TOUCH_MAGIC 0x5400
29
28
#define TOUCH_IOC_SETMODE TOUCH_MAGIC + 0
30
29
31
- #define DISPPARAM_PATH " /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/disp_param"
32
- #define DISPPARAM_FOD_HBM_OFF " 0xE0000"
33
-
34
30
static const char * kFodUiPaths [] = {
35
31
" /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui" ,
36
32
" /sys/devices/platform/soc/soc:qcom,dsi-display/fod_ui" ,
37
33
};
38
34
39
- namespace {
40
-
41
- template <typename T>
42
- static void set (const std::string& path, const T& value) {
43
- std::ofstream file (path);
44
- file << value;
45
- }
46
-
47
- } // anonymous namespace
48
-
49
35
static bool readBool (int fd) {
50
36
char c;
51
37
int rc;
@@ -114,7 +100,6 @@ class XiaomiKonaUdfpsHandler : public UdfpsHandler {
114
100
115
101
void onAcquired (int32_t result, int32_t vendorCode) {
116
102
if (result == FINGERPRINT_ACQUIRED_GOOD) {
117
- set (DISPPARAM_PATH, DISPPARAM_FOD_HBM_OFF);
118
103
int arg[2 ] = {TOUCH_FOD_ENABLE, FOD_STATUS_OFF};
119
104
ioctl (touch_fd_.get (), TOUCH_IOC_SETMODE, &arg);
120
105
} else if (vendorCode == 21 || vendorCode == 23 ) {
@@ -128,7 +113,6 @@ class XiaomiKonaUdfpsHandler : public UdfpsHandler {
128
113
}
129
114
130
115
void cancel () {
131
- set (DISPPARAM_PATH, DISPPARAM_FOD_HBM_OFF);
132
116
int arg[2 ] = {TOUCH_FOD_ENABLE, FOD_STATUS_OFF};
133
117
ioctl (touch_fd_.get (), TOUCH_IOC_SETMODE, &arg);
134
118
}
0 commit comments