From dc81c8c0acdad77bc31adad86c14ef95824109c7 Mon Sep 17 00:00:00 2001 From: Arian Date: Wed, 10 Apr 2024 00:20:48 +0200 Subject: [PATCH] sm8450-common: udfps: Only disable fod_status until suspend Change-Id: If4d9084cbcc8670c7636fddd143807cb6b067f22 --- udfps/UdfpsHandler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: