summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmirhossein Simjour <asimjour@google.com>2015-10-09 10:39:48 -0400
committerChih-Wei Huang <cwhuang@linux.org.tw>2016-09-06 16:03:40 +0800
commit239d4dec6abeca7a80bc2825852586ce3500a79b (patch)
tree7c4c92206bd11f2e271878596f57b84cf8db1b88
parente491106002aeb62eeba56150252be3fddc678cf9 (diff)
downloadframeworks_native-239d4dec6abeca7a80bc2825852586ce3500a79b.zip
frameworks_native-239d4dec6abeca7a80bc2825852586ce3500a79b.tar.gz
frameworks_native-239d4dec6abeca7a80bc2825852586ce3500a79b.tar.bz2
When using trackpad, mouse pointer shows instead of circle
The mouse pointer showing instead of circle for all gestures except FREEDOM. FREEDOM gesture still is using spots to be able to show all the fingers. Bug: 24139978 Change-Id: I91e916de02e690f6727b097345a919e536ffdc92
-rw-r--r--services/inputflinger/InputReader.cpp40
-rw-r--r--services/inputflinger/InputReader.h4
2 files changed, 23 insertions, 21 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index e76e678..fb270ed 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -2976,15 +2976,15 @@ void TouchInputMapper::configureParameters() {
// 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;
+ ? Parameters::GESTURE_MODE_SINGLE_TOUCH : Parameters::GESTURE_MODE_MULTI_TOUCH;
String8 gestureModeString;
if (getDevice()->getConfiguration().tryGetProperty(String8("touch.gestureMode"),
gestureModeString)) {
- if (gestureModeString == "pointer") {
- mParameters.gestureMode = Parameters::GESTURE_MODE_POINTER;
- } else if (gestureModeString == "spots") {
- mParameters.gestureMode = Parameters::GESTURE_MODE_SPOTS;
+ if (gestureModeString == "single-touch") {
+ mParameters.gestureMode = Parameters::GESTURE_MODE_SINGLE_TOUCH;
+ } else if (gestureModeString == "multi-touch") {
+ mParameters.gestureMode = Parameters::GESTURE_MODE_MULTI_TOUCH;
} else if (gestureModeString != "default") {
ALOGW("Invalid value for touch.gestureMode: '%s'", gestureModeString.string());
}
@@ -3052,11 +3052,11 @@ void TouchInputMapper::dumpParameters(String8& dump) {
dump.append(INDENT3 "Parameters:\n");
switch (mParameters.gestureMode) {
- case Parameters::GESTURE_MODE_POINTER:
- dump.append(INDENT4 "GestureMode: pointer\n");
+ case Parameters::GESTURE_MODE_SINGLE_TOUCH:
+ dump.append(INDENT4 "GestureMode: single-touch\n");
break;
- case Parameters::GESTURE_MODE_SPOTS:
- dump.append(INDENT4 "GestureMode: spots\n");
+ case Parameters::GESTURE_MODE_MULTI_TOUCH:
+ dump.append(INDENT4 "GestureMode: multi-touch\n");
break;
default:
assert(false);
@@ -4870,14 +4870,17 @@ void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlag
}
// Update the pointer presentation and spots.
- if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
- mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_SPOT);
+ if (mParameters.gestureMode == Parameters::GESTURE_MODE_MULTI_TOUCH) {
+ mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_POINTER);
if (finishPreviousGesture || cancelPreviousGesture) {
mPointerController->clearSpots();
}
- mPointerController->setSpots(mPointerGesture.currentGestureCoords,
- mPointerGesture.currentGestureIdToIndex,
- mPointerGesture.currentGestureIdBits);
+
+ if (mPointerGesture.currentGestureMode == PointerGesture::FREEFORM) {
+ mPointerController->setSpots(mPointerGesture.currentGestureCoords,
+ mPointerGesture.currentGestureIdToIndex,
+ mPointerGesture.currentGestureIdBits);
+ }
} else {
mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_POINTER);
}
@@ -4886,9 +4889,8 @@ void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlag
switch (mPointerGesture.currentGestureMode) {
case PointerGesture::NEUTRAL:
case PointerGesture::QUIET:
- if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS
- && (mPointerGesture.lastGestureMode == PointerGesture::SWIPE
- || mPointerGesture.lastGestureMode == PointerGesture::FREEFORM)) {
+ if (mParameters.gestureMode == Parameters::GESTURE_MODE_MULTI_TOUCH
+ && mPointerGesture.lastGestureMode == PointerGesture::FREEFORM) {
// Remind the user of where the pointer is after finishing a gesture with spots.
mPointerController->unfade(PointerControllerInterface::TRANSITION_GRADUAL);
}
@@ -4898,15 +4900,15 @@ void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlag
case PointerGesture::BUTTON_CLICK_OR_DRAG:
case PointerGesture::HOVER:
case PointerGesture::PRESS:
+ case PointerGesture::SWIPE:
// Unfade the pointer when the current gesture manipulates the
// area directly under the pointer.
mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
break;
- case PointerGesture::SWIPE:
case PointerGesture::FREEFORM:
// Fade the pointer when the current gesture manipulates a different
// area and there are spots to guide the user experience.
- if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
+ if (mParameters.gestureMode == Parameters::GESTURE_MODE_MULTI_TOUCH) {
mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
} else {
mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h
index 63b4198..32bf188 100644
--- a/services/inputflinger/InputReader.h
+++ b/services/inputflinger/InputReader.h
@@ -1305,8 +1305,8 @@ protected:
bool hasButtonUnderPad;
enum GestureMode {
- GESTURE_MODE_POINTER,
- GESTURE_MODE_SPOTS,
+ GESTURE_MODE_SINGLE_TOUCH,
+ GESTURE_MODE_MULTI_TOUCH,
};
GestureMode gestureMode;