summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/inputflinger/InputReader.h')
-rw-r--r--services/inputflinger/InputReader.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h
index b73fe61..3b783c1 100644
--- a/services/inputflinger/InputReader.h
+++ b/services/inputflinger/InputReader.h
@@ -230,6 +230,9 @@ struct InputReaderConfiguration {
// True to show the location of touches on the touch screen as spots.
bool showTouches;
+
+ // Ignore finger touches this long after the stylus has been used (including hover)
+ nsecs_t stylusPalmRejectionTime;
InputReaderConfiguration() :
virtualKeyQuietTime(0),
@@ -247,6 +250,7 @@ struct InputReaderConfiguration {
pointerGestureSwipeMaxWidthRatio(0.25f),
pointerGestureMovementSpeedRatio(0.8f),
pointerGestureZoomSpeedRatio(0.3f),
+ stylusPalmRejectionTime(50 * 10000000LL), // 50 ms
showTouches(false) { }
bool getDisplayInfo(bool external, DisplayViewport* outViewport) const;
@@ -1787,6 +1791,9 @@ private:
VelocityControl mPointerVelocityControl;
VelocityControl mWheelXVelocityControl;
VelocityControl mWheelYVelocityControl;
+
+ // The time the stylus event was processed by any TouchInputMapper
+ static nsecs_t mLastStylusTime;
void resetExternalStylus();
void clearStylusDataPendingFlags();
@@ -1853,6 +1860,8 @@ private:
const VirtualKey* findVirtualKeyHit(int32_t x, int32_t y);
static void assignPointerIds(const RawState* last, RawState* current);
+
+ bool rejectPalm(nsecs_t when);
};