Cancel touch events when a low-level touch gesture occurs.
When the touch firmware or driver sends a key event that is triggered
by a low-level gesture such as a palm slap. For this to work, the
touch device's .kl file must specify the "GESTURE" flag for each
key that is produced by a gesture.
Note that the "VIRTUAL" flag should also be specified for any such
keys for which we would like to generate haptic feedback.
eg. key 142 SLEEP VIRTUAL GESTURE
Bug: 19264992
Change-Id: Ief494ec7e3ca66d2358a1001fdfae4f263ee1cd1
diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h
index c5896d4..34f20af 100644
--- a/services/inputflinger/InputReader.h
+++ b/services/inputflinger/InputReader.h
@@ -572,6 +572,7 @@
const int32_t* keyCodes, uint8_t* outFlags);
void vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat, int32_t token);
void cancelVibrate(int32_t token);
+ void cancelTouch(nsecs_t when);
int32_t getMetaState();
@@ -973,6 +974,7 @@
virtual void vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat,
int32_t token);
virtual void cancelVibrate(int32_t token);
+ virtual void cancelTouch(nsecs_t when);
virtual int32_t getMetaState();
@@ -1191,6 +1193,7 @@
const int32_t* keyCodes, uint8_t* outFlags);
virtual void fadePointer();
+ virtual void cancelTouch(nsecs_t when);
virtual void timeoutExpired(nsecs_t when);
protected: