Skip to content

Commit

Permalink
Fixed stylus eraser being rejected by palm rejection
Browse files Browse the repository at this point in the history
The stylus eraser appeared not to work, i.e. Android did not respond to
input from the eraser. It turned out that all input except stylus input
is rejected when palm rejection is activated. The problem was that the
eraser itself activates palm rejection when it hovers. The solution is
to allow the eraser during palm rejection. This solution makes sense
because the eraser input works in the exact same way as normal stylus
input.

Change-Id: I90824500be7613af4f00427c59ce828528b632f7
(cherry picked from commit 2e1eb88)
  • Loading branch information
FPtje authored and rmcc committed Jan 20, 2014
1 parent 708f5a5 commit 15dc266
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/input/InputReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5717,7 +5717,8 @@ nsecs_t TouchInputMapper::mLastStylusTime = 0;

bool TouchInputMapper::rejectPalm(nsecs_t when) {
return (when - mLastStylusTime < mConfig.stylusPalmRejectionTime) &&
mPointerSimple.currentProperties.toolType != AMOTION_EVENT_TOOL_TYPE_STYLUS;
mPointerSimple.currentProperties.toolType != AMOTION_EVENT_TOOL_TYPE_STYLUS &&
mPointerSimple.currentProperties.toolType != AMOTION_EVENT_TOOL_TYPE_ERASER;
}

bool TouchInputMapper::isPointInsideSurface(int32_t x, int32_t y) {
Expand Down

0 comments on commit 15dc266

Please sign in to comment.