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:
parent
26737a0758
commit
b6069026da
1 changed files with 1 additions and 3 deletions
|
@ -57,9 +57,7 @@ static bool readBool(int fd) {
|
|||
|
||||
struct NonUiSensorCallback : IEventQueueCallback {
|
||||
Return<void> onEvent(const Event& e) {
|
||||
bool nonUi = e.u.scalar == 1;
|
||||
|
||||
int buf[MAX_BUF_SIZE] = {0, Touch_Nonui_Mode, nonUi ? 2 : 0};
|
||||
int buf[MAX_BUF_SIZE] = {0, Touch_Nonui_Mode, static_cast<int>(e.u.scalar)};
|
||||
ioctl(open(TOUCH_DEV_PATH, O_RDWR), TOUCH_IOC_SET_CUR_VALUE, &buf);
|
||||
|
||||
return Void();
|
||||
|
|
Loading…
Reference in a new issue