diff options
Diffstat (limited to 'services/input')
-rw-r--r-- | services/input/InputReader.cpp | 13 | ||||
-rw-r--r-- | services/input/InputReader.h | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index 8786c24..dacc73f 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -1170,9 +1170,8 @@ int32_t TouchButtonAccumulator::getToolType() const { return AMOTION_EVENT_TOOL_TYPE_UNKNOWN; } -bool TouchButtonAccumulator::isActive() const { - return mBtnTouch || mBtnToolFinger || mBtnToolPen - || mBtnToolRubber || mBtnStylus || mBtnStylus2; +bool TouchButtonAccumulator::isToolActive() const { + return mBtnTouch || mBtnToolFinger || mBtnToolPen || mBtnToolRubber; } bool TouchButtonAccumulator::isHovering() const { @@ -5144,7 +5143,7 @@ void SingleTouchInputMapper::sync(nsecs_t when) { mCurrentRawPointerData.clear(); mCurrentButtonState = 0; - if (mTouchButtonAccumulator.isActive()) { + if (mTouchButtonAccumulator.isToolActive()) { mCurrentRawPointerData.pointerCount = 1; mCurrentRawPointerData.idToIndex[0] = 0; @@ -5168,11 +5167,11 @@ void SingleTouchInputMapper::sync(nsecs_t when) { outPointer.toolType = AMOTION_EVENT_TOOL_TYPE_FINGER; } outPointer.isHovering = isHovering; - - mCurrentButtonState = mTouchButtonAccumulator.getButtonState() - | mCursorButtonAccumulator.getButtonState(); } + mCurrentButtonState = mTouchButtonAccumulator.getButtonState() + | mCursorButtonAccumulator.getButtonState(); + syncTouch(when, true); } diff --git a/services/input/InputReader.h b/services/input/InputReader.h index f5d095d..e82c4e7 100644 --- a/services/input/InputReader.h +++ b/services/input/InputReader.h @@ -526,7 +526,7 @@ public: uint32_t getButtonState() const; int32_t getToolType() const; - bool isActive() const; + bool isToolActive() const; bool isHovering() const; private: |