summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Wei <lucaswei@google.com>2021-05-31 17:41:36 +0800
committerLucas Wei <lucaswei@google.com>2021-06-02 08:22:57 +0000
commitd44e5fcbc8419566c889b78c8edfd477214f3a65 (patch)
treed216b3b9cc6d28b1b3283057fcf718f694b0140c
parentc129ba6ba4b9802058a549bd019506bfe12e864c (diff)
parentc5f72bce3360dc6261ec32846c2150a7ff7de18e (diff)
downloadsec_touch-d44e5fcbc8419566c889b78c8edfd477214f3a65.tar.gz
Bug: 187909050 Signed-off-by: Lucas Wei <lucaswei@google.com> Change-Id: I8b1034f0217b5aa2816251e42e49bba68d8a51a9
-rw-r--r--sec_ts.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sec_ts.c b/sec_ts.c
index b652480..5d05f73 100644
--- a/sec_ts.c
+++ b/sec_ts.c
@@ -2657,13 +2657,21 @@ static void sec_ts_offload_report(void *handle,
input_set_timestamp(ts->input_dev, report->timestamp);
for (i = 0; i < MAX_COORDS; i++) {
- if (report->coords[i].status == COORD_STATUS_FINGER) {
+ if (report->coords[i].status != COORD_STATUS_INACTIVE) {
+ int mt_tool = MT_TOOL_FINGER;
+
input_mt_slot(ts->input_dev, i);
touch_down = 1;
input_report_key(ts->input_dev, BTN_TOUCH,
touch_down);
+
+ if (report->coords[i].status == COORD_STATUS_EDGE ||
+ report->coords[i].status == COORD_STATUS_PALM ||
+ report->coords[i].status == COORD_STATUS_CANCEL)
+ mt_tool = MT_TOOL_PALM;
+
input_mt_report_slot_state(ts->input_dev,
- MT_TOOL_FINGER, 1);
+ mt_tool, 1);
input_report_abs(ts->input_dev, ABS_MT_POSITION_X,
report->coords[i].x);
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y,