Skip to content

Commit

Permalink
umi: udfps: Disable fod_status on fod_ui changes
Browse files Browse the repository at this point in the history
Change-Id: I68737446cf9aad3e3993902eb05c7712aed0658d
  • Loading branch information
ArianK16a authored and chaptsand committed Aug 31, 2022
1 parent 77c4bc3 commit 795ef86
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions udfps/UdfpsHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,21 @@ class XiaomiKonaUdfpsHander : public UdfpsHandler {

mDevice->extCmd(mDevice, COMMAND_NIT,
readBool(fd) ? PARAM_NIT_FOD : PARAM_NIT_NONE);

int arg[2] = {TOUCH_UDFPS_ENABLE,
readBool(fd) ? UDFPS_STATUS_ON : UDFPS_STATUS_OFF};
ioctl(touch_fd_.get(), TOUCH_IOC_SETMODE, &arg);

}
}).detach();
}

void onFingerDown(uint32_t /*x*/, uint32_t /*y*/, float /*minor*/, float /*major*/) {
int arg[2] = {TOUCH_UDFPS_ENABLE, UDFPS_STATUS_ON};
ioctl(touch_fd_.get(), TOUCH_IOC_SETMODE, &arg);
// nothing
}

void onFingerUp() {
int arg[2] = {TOUCH_UDFPS_ENABLE, UDFPS_STATUS_OFF};
ioctl(touch_fd_.get(), TOUCH_IOC_SETMODE, &arg);
// nothing
}
private:
fingerprint_device_t *mDevice;
Expand Down

0 comments on commit 795ef86

Please sign in to comment.