summaryrefslogtreecommitdiffstats
path: root/services/input/InputReader.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-06-03 17:06:16 -0700
committerJeff Brown <jeffbrown@google.com>2011-06-03 17:08:09 -0700
commitb12682270aebc110c9518bddae7a8aecc070cad7 (patch)
tree9e69a1c0d84d36b0a3e76036ddc9792e96ad73c2 /services/input/InputReader.cpp
parent7218d830e27d81141588cd6e37f206d141a18f62 (diff)
downloadframeworks_base-b12682270aebc110c9518bddae7a8aecc070cad7.zip
frameworks_base-b12682270aebc110c9518bddae7a8aecc070cad7.tar.gz
frameworks_base-b12682270aebc110c9518bddae7a8aecc070cad7.tar.bz2
Use pointer mode instead of spots for SEMI_MT touch pads.
The spot-based presentation relies on being able to accurately locate and distinguish two or more fingers on the touch pad. We can still do gesture recognition without distinct multitouch but it doesn't make sense to show spots because we can't be sure that the spots will appear in the right places. Change-Id: Ia282d77000bf3b50d395273a1f0ac0bbe55b3c6f
Diffstat (limited to 'services/input/InputReader.cpp')
-rw-r--r--services/input/InputReader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index 2924d3e..c42e3ab 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -1987,9 +1987,11 @@ void TouchInputMapper::configureParameters() {
mParameters.useAveragingTouchFilter = mConfig->filterTouchEvents;
mParameters.useJumpyTouchFilter = mConfig->filterJumpyTouchEvents;
- // TODO: select the default gesture mode based on whether the device supports
- // distinct multitouch
- mParameters.gestureMode = Parameters::GESTURE_MODE_SPOTS;
+ // Use the pointer presentation mode for devices that do not support distinct
+ // multitouch. The spot-based presentation relies on being able to accurately
+ // locate two or more fingers on the touch pad.
+ mParameters.gestureMode = getEventHub()->hasInputProperty(getDeviceId(), INPUT_PROP_SEMI_MT)
+ ? Parameters::GESTURE_MODE_POINTER : Parameters::GESTURE_MODE_SPOTS;
String8 gestureModeString;
if (getDevice()->getConfiguration().tryGetProperty(String8("touch.gestureMode"),