summaryrefslogtreecommitdiffstats
path: root/services/input
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-06-27 18:36:00 -0700
committerJeff Brown <jeffbrown@google.com>2011-06-27 21:35:59 -0700
commit53ca3f13e70fda98aa9f39bb0c15afaf435e3904 (patch)
tree3e6dc47b4bf8fa93d5cd1d79c8cdf4a00f506f66 /services/input
parent9df32619f376768c408969a40d40c54324e30b99 (diff)
downloadframeworks_base-53ca3f13e70fda98aa9f39bb0c15afaf435e3904.zip
frameworks_base-53ca3f13e70fda98aa9f39bb0c15afaf435e3904.tar.gz
frameworks_base-53ca3f13e70fda98aa9f39bb0c15afaf435e3904.tar.bz2
Hover and stylus API cleanup.
Added missing setOnHoverListener method. Removed BUTTON_STATE_ERASER. Change-Id: I5d820d0a8e47fe5fd2d88e9fd9fc3fc6ce0dea0d
Diffstat (limited to 'services/input')
-rw-r--r--services/input/InputReader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index 3e4c666..5a25f8c 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -154,14 +154,15 @@ static uint32_t getButtonStateForScanCode(int32_t scanCode) {
case BTN_LEFT:
return AMOTION_EVENT_BUTTON_PRIMARY;
case BTN_RIGHT:
+ case BTN_STYLUS:
return AMOTION_EVENT_BUTTON_SECONDARY;
case BTN_MIDDLE:
+ case BTN_STYLUS2:
return AMOTION_EVENT_BUTTON_TERTIARY;
case BTN_SIDE:
return AMOTION_EVENT_BUTTON_BACK;
- case BTN_EXTRA:
- return AMOTION_EVENT_BUTTON_FORWARD;
case BTN_FORWARD:
+ case BTN_EXTRA:
return AMOTION_EVENT_BUTTON_FORWARD;
case BTN_BACK:
return AMOTION_EVENT_BUTTON_BACK;
@@ -176,8 +177,7 @@ static uint32_t getButtonStateForScanCode(int32_t scanCode) {
static bool isPointerDown(int32_t buttonState) {
return buttonState &
(AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY
- | AMOTION_EVENT_BUTTON_TERTIARY
- | AMOTION_EVENT_BUTTON_ERASER);
+ | AMOTION_EVENT_BUTTON_TERTIARY);
}
static int32_t calculateEdgeFlagsUsingPointerBounds(