summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuper Liu <supercjliu@google.com>2023-10-05 03:45:13 +0000
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-10-27 01:59:40 +0000
commitb40b137670164a3954b58b92410b2ef572233f2b (patch)
tree9f18caf7f13685e5481b39a9bfdf29fe5281f1c7
parent1a3fb08489aa6aa20c8e4a2bc092cc57fcfd7f06 (diff)
downloadcommon-android-gs-shusky-5.15-android14-qpr2.tar.gz
Bug: 302069761 Change-Id: Id2ebb392082ae4cd08f80e37a83c14e7bea9a1bd Signed-off-by: Super Liu <supercjliu@google.com> (cherry picked from commit 9a2c5a473ed7c4fdd29fee65580ba79a898fdb39)
-rw-r--r--goog_touch_interface.c9
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(&gti->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);
}
}