summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFPtje <fpeijnenburg@gmail.com>2016-08-03 20:37:46 -0500
committerThomas Patry <thompatry@gmail.com>2016-08-05 13:41:31 -0500
commit3b418d69a3e1b3594aec4ad065a47353da407e12 (patch)
tree40c55e04449edf2f8dd5e57b658e4b9e385cd925
parent542b068e322f90e7e6689daddddc493363d0b549 (diff)
downloadframeworks_native-3b418d69a3e1b3594aec4ad065a47353da407e12.tar.gz
frameworks_native-3b418d69a3e1b3594aec4ad065a47353da407e12.tar.bz2
frameworks_native-3b418d69a3e1b3594aec4ad065a47353da407e12.zip
Fixed stylus eraser being rejected by palm rejection
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: I9c7451112ce7dbca14a1e1694eedca2d4ed041a1
-rw-r--r--services/inputflinger/InputReader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index 53ff1557b..6cfdcebfc 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -6167,7 +6167,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;
}
void TouchInputMapper::cancelTouch(nsecs_t when) {