summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joe Onorato <joeo@google.com> 2010-11-08 09:48:20 -0800
committer Joe Onorato <joeo@google.com> 2010-11-08 13:02:58 -0800
commitd94206c41dfbac8340b86864d9e05cdc3a3a87ba (patch)
treea70022457dcbf54c8116488b7b9df1ad9c22c859
parent81499912348194a9432841398a0d337fa4079c98 (diff)
The CHEEK_TOUCH stuff never worked. Remove it.
Bug: 3104906 Change-Id: Ia37236ba1775fc3ec8c111e2e0b85b105e0dea6a
-rw-r--r--include/ui/PowerManager.h10
-rw-r--r--libs/ui/InputDispatcher.cpp19
2 files changed, 4 insertions, 25 deletions
diff --git a/include/ui/PowerManager.h b/include/ui/PowerManager.h
index 5434b4f080..dd80318e63 100644
--- a/include/ui/PowerManager.h
+++ b/include/ui/PowerManager.h
@@ -22,14 +22,10 @@ namespace android {
enum {
POWER_MANAGER_OTHER_EVENT = 0,
- POWER_MANAGER_CHEEK_EVENT = 1,
- POWER_MANAGER_TOUCH_EVENT = 2, // touch events are TOUCH for 300ms, and then either
- // up events or LONG_TOUCH events.
- POWER_MANAGER_LONG_TOUCH_EVENT = 3,
- POWER_MANAGER_TOUCH_UP_EVENT = 4,
- POWER_MANAGER_BUTTON_EVENT = 5, // Button and trackball events.
+ POWER_MANAGER_BUTTON_EVENT = 1,
+ POWER_MANAGER_TOUCH_EVENT = 2,
- POWER_MANAGER_LAST_EVENT = POWER_MANAGER_BUTTON_EVENT, // Last valid event code.
+ POWER_MANAGER_LAST_EVENT = POWER_MANAGER_TOUCH_EVENT, // Last valid event code.
};
} // namespace android
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index 299b1baff9..7ddb3c75ee 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -51,9 +51,6 @@
namespace android {
-// Delay before reporting long touch events to the power manager.
-const nsecs_t LONG_TOUCH_DELAY = 300 * 1000000LL; // 300 ms
-
// Default input dispatching timeout if there is no focused application or paused window
// from which to determine an appropriate dispatching timeout.
const nsecs_t DEFAULT_INPUT_DISPATCHING_TIMEOUT = 5000 * 1000000LL; // 5 sec
@@ -1416,21 +1413,7 @@ void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
}
if (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER) {
- switch (motionEntry->action) {
- case AMOTION_EVENT_ACTION_DOWN:
- eventType = POWER_MANAGER_TOUCH_EVENT;
- break;
- case AMOTION_EVENT_ACTION_UP:
- eventType = POWER_MANAGER_TOUCH_UP_EVENT;
- break;
- default:
- if (motionEntry->eventTime - motionEntry->downTime < LONG_TOUCH_DELAY) {
- eventType = POWER_MANAGER_TOUCH_EVENT;
- } else {
- eventType = POWER_MANAGER_LONG_TOUCH_EVENT;
- }
- break;
- }
+ eventType = POWER_MANAGER_TOUCH_EVENT;
}
break;
}