summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFPtje <fpeijnenburg@gmail.com>2013-12-27 16:59:31 +0100
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-01-20 06:11:39 +0000
commit15dc26679a3a57d727583975a54887b52be14f69 (patch)
treeebe9d45e9571e84c0723f8a2f933869b9746c503
parent708f5a55ec5985a51f5f6104f194cbd0fbc4b179 (diff)
downloadandroid_frameworks_base-stable/cm-10.2.tar.gz
android_frameworks_base-stable/cm-10.2.tar.bz2
android_frameworks_base-stable/cm-10.2.zip
Fixed stylus eraser being rejected by palm rejectioncm-10.2.1stable/cm-10.2
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 2e1eb88081421dfc8c5aa4d31b71e1da2e166bbd)
-rw-r--r--services/input/InputReader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index 10dbaf42f64..622beecf9ff 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -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) {