sm8450-common: sensors: Pass nonui value unmodified to touchscreen
* report the scalar directly, 1 probably means pocket and 2 means it's covered. this led to us disabling nonui mode again when covered was reported after pocket. Change-Id: Idbf7fdf773657d87407dd4b67a7353c17b4ae799
This commit is contained in:
@@ -57,9 +57,7 @@ static bool readBool(int fd) {
|
|||||||
|
|
||||||
struct NonUiSensorCallback : IEventQueueCallback {
|
struct NonUiSensorCallback : IEventQueueCallback {
|
||||||
Return<void> onEvent(const Event& e) {
|
Return<void> onEvent(const Event& e) {
|
||||||
bool nonUi = e.u.scalar == 1;
|
int buf[MAX_BUF_SIZE] = {0, Touch_Nonui_Mode, static_cast<int>(e.u.scalar)};
|
||||||
|
|
||||||
int buf[MAX_BUF_SIZE] = {0, Touch_Nonui_Mode, nonUi ? 2 : 0};
|
|
||||||
ioctl(open(TOUCH_DEV_PATH, O_RDWR), TOUCH_IOC_SET_CUR_VALUE, &buf);
|
ioctl(open(TOUCH_DEV_PATH, O_RDWR), TOUCH_IOC_SET_CUR_VALUE, &buf);
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
|
Reference in New Issue
Block a user