diff options
Diffstat (limited to 'services/input/InputReader.h')
-rw-r--r-- | services/input/InputReader.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/services/input/InputReader.h b/services/input/InputReader.h index 379229f..6167508 100644 --- a/services/input/InputReader.h +++ b/services/input/InputReader.h @@ -152,6 +152,9 @@ struct InputReaderConfiguration { // True to show the pointer icon when a stylus is used. bool stylusIconEnabled; + // Ignore finger touches this long after the stylus has been used (including hover) + nsecs_t stylusPalmRejectionTime; + InputReaderConfiguration() : virtualKeyQuietTime(0), pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, 3.0f), @@ -169,7 +172,9 @@ struct InputReaderConfiguration { pointerGestureMovementSpeedRatio(0.8f), pointerGestureZoomSpeedRatio(0.3f), showTouches(false), - stylusIconEnabled(false) { } + stylusIconEnabled(false), + stylusPalmRejectionTime(50 * 10000000LL) // 50 ms + { } bool getDisplayInfo(int32_t displayId, bool external, int32_t* width, int32_t* height, int32_t* orientation) const; @@ -1480,6 +1485,9 @@ private: VelocityControl mWheelXVelocityControl; VelocityControl mWheelYVelocityControl; + // The time the stylus event was processed by any TouchInputMapper + static nsecs_t mLastStylusTime; + void sync(nsecs_t when); bool consumeRawTouches(nsecs_t when, uint32_t policyFlags); @@ -1534,6 +1542,8 @@ private: void assignPointerIds(); void unfadePointer(PointerControllerInterface::Transition transition); + + bool rejectPalm(nsecs_t when); }; |