summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Wei <lucaswei@google.com>2021-06-18 11:34:59 +0800
committerLucas Wei <lucaswei@google.com>2021-06-18 11:34:59 +0800
commit258e64e6c6cd1c8ab6b71189cf0da9797a723c57 (patch)
tree36b91c2a327f464b2f4ffbc20301330130f68a52
parent71bca30c738bd50d62ba548501668681b4bf5098 (diff)
parent5dfa25302cad5cf74c6c22f7bb951ec7030dff84 (diff)
downloadfts_touch-android-msm-barbet-4.19-s-v2-beta-1.tar.gz
Bug: 187909050 Signed-off-by: Lucas Wei <lucaswei@google.com> Change-Id: I1fc0868a6d7aa8145b22e5ad7964b48d767bc068
-rw-r--r--fts.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fts.c b/fts.c
index 5fbc576..ec0dee7 100644
--- a/fts.c
+++ b/fts.c
@@ -4456,13 +4456,21 @@ static void fts_offload_report(void *handle,
input_set_timestamp(info->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(info->input_dev, i);
touch_down = 1;
input_report_key(info->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(info->input_dev,
- MT_TOOL_FINGER, 1);
+ mt_tool, 1);
input_report_abs(info->input_dev, ABS_MT_POSITION_X,
report->coords[i].x);
input_report_abs(info->input_dev, ABS_MT_POSITION_Y,