summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r--services/inputflinger/InputReader.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index f89953c..7b85f07 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -16,7 +16,7 @@
#define LOG_TAG "InputReader"
-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0
// Log debug messages for each raw event received from the EventHub.
#define DEBUG_RAW_EVENTS 0
@@ -2940,7 +2940,8 @@ void TouchInputMapper::configure(nsecs_t when,
if (!changes || (changes & (InputReaderConfiguration::CHANGE_DISPLAY_INFO
| InputReaderConfiguration::CHANGE_POINTER_GESTURE_ENABLEMENT
| InputReaderConfiguration::CHANGE_SHOW_TOUCHES
- | InputReaderConfiguration::CHANGE_EXTERNAL_STYLUS_PRESENCE))) {
+ | InputReaderConfiguration::CHANGE_EXTERNAL_STYLUS_PRESENCE
+ | InputReaderConfiguration::CHANGE_STYLUS_ICON_ENABLED))) {
// Configure device sources, surface dimensions, orientation and
// scaling factors.
configureSurface(when, &resetNeeded);
@@ -4870,7 +4871,7 @@ void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlag
&& (mPointerGesture.lastGestureMode == PointerGesture::SWIPE
|| mPointerGesture.lastGestureMode == PointerGesture::FREEFORM)) {
// Remind the user of where the pointer is after finishing a gesture with spots.
- mPointerController->unfade(PointerControllerInterface::TRANSITION_GRADUAL);
+ unfadePointer(PointerControllerInterface::TRANSITION_GRADUAL);
}
break;
case PointerGesture::TAP:
@@ -5936,7 +5937,7 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_POINTER);
mPointerController->clearSpots();
mPointerController->setButtonState(mCurrentRawState.buttonState);
- mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
+ unfadePointer(PointerControllerInterface::TRANSITION_IMMEDIATE);
} else if (!down && !hovering && (mPointerSimple.down || mPointerSimple.hovering)) {
mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
}
@@ -6143,6 +6144,13 @@ void TouchInputMapper::fadePointer() {
}
}
+void TouchInputMapper::unfadePointer(PointerControllerInterface::Transition transition) {
+ if (mPointerController != NULL &&
+ !(mPointerUsage == POINTER_USAGE_STYLUS && !mConfig.stylusIconEnabled)) {
+ mPointerController->unfade(transition);
+ }
+}
+
nsecs_t TouchInputMapper::mLastStylusTime = 0;
bool TouchInputMapper::rejectPalm(nsecs_t when) {