diff options
author | Super Liu <supercjliu@google.com> | 2023-10-05 03:45:13 +0000 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-10-27 01:59:40 +0000 |
commit | b40b137670164a3954b58b92410b2ef572233f2b (patch) | |
tree | 9f18caf7f13685e5481b39a9bfdf29fe5281f1c7 | |
parent | 1a3fb08489aa6aa20c8e4a2bc092cc57fcfd7f06 (diff) | |
download | common-android-gs-shusky-5.15-android14-qpr2.tar.gz |
gti: force to cancel the active fingers during screen-offandroid-u-qpr2-beta-3_r0.8android-u-qpr2-beta-3.1_r0.8android-u-qpr2-beta-2_r0.8android-14.0.0_r0.67android-14.0.0_r0.57android-gs-shusky-5.15-android14-qpr2-betaandroid-gs-shusky-5.15-android14-qpr2
Bug: 302069761
Change-Id: Id2ebb392082ae4cd08f80e37a83c14e7bea9a1bd
Signed-off-by: Super Liu <supercjliu@google.com>
(cherry picked from commit 9a2c5a473ed7c4fdd29fee65580ba79a898fdb39)
-rw-r--r-- | goog_touch_interface.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index 8d256a3..aa2f07e 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -2799,6 +2799,15 @@ void goog_offload_input_report(void *handle, clear_bit(i, &slot_bit_active); input_mt_slot(gti->vendor_input_dev, i); input_report_abs(gti->vendor_input_dev, ABS_MT_PRESSURE, 0); + /* + * Force to cancel the active figner(s) by MT_TOOL_PALM during screen-off. + */ + if (gti->display_state == GTI_DISPLAY_STATE_OFF && + gti->vendor_input_dev->mt && + input_mt_is_active(>i->vendor_input_dev->mt->slots[i])) { + input_mt_report_slot_state(gti->vendor_input_dev, MT_TOOL_PALM, 1); + input_sync(gti->vendor_input_dev); + } input_mt_report_slot_state(gti->vendor_input_dev, MT_TOOL_FINGER, 0); } } |