diff --git a/udfps/UdfpsHandler.cpp b/udfps/UdfpsHandler.cpp index e1099e1..2ff5818 100644 --- a/udfps/UdfpsHandler.cpp +++ b/udfps/UdfpsHandler.cpp @@ -35,6 +35,7 @@ #define FOD_STATUS_OFF 0 #define FOD_STATUS_ON 1 +#define FOD_STATUS_OFF_UNTIL_SUSPEND 3 #define TOUCH_DEV_PATH "/dev/xiaomi-touch" #define TOUCH_MAGIC 'T' @@ -248,7 +249,7 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler { ioctl(disp_fd_.get(), MI_DISP_IOCTL_SET_LOCAL_HBM, &req); if (!enrolling) { - setFodStatus(FOD_STATUS_OFF); + setFodStatus(FOD_STATUS_OFF_UNTIL_SUSPEND); } } @@ -271,7 +272,7 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler { LOG(DEBUG) << __func__; enrolling = false; - setFodStatus(FOD_STATUS_OFF); + setFodStatus(FOD_STATUS_OFF_UNTIL_SUSPEND); } void preEnroll() { @@ -288,7 +289,7 @@ class XiaomiSm8450UdfpsHander : public UdfpsHandler { LOG(DEBUG) << __func__; enrolling = false; - setFodStatus(FOD_STATUS_OFF); + setFodStatus(FOD_STATUS_OFF_UNTIL_SUSPEND); } private: