summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-07-27 15:38:50 -0700
committerJeff Brown <jeffbrown@google.com>2012-07-27 18:14:56 -0700
commitb696de5c10ebcc7bf42d8487fc0e56e0e937754d (patch)
tree3339fd190bad6be36c5e2ba8f57ebc11a5bb972b /services/jni
parent155fc70252fd9ccee1f05da4e6966a99ec86d499 (diff)
downloadframeworks_base-b696de5c10ebcc7bf42d8487fc0e56e0e937754d.zip
frameworks_base-b696de5c10ebcc7bf42d8487fc0e56e0e937754d.tar.gz
frameworks_base-b696de5c10ebcc7bf42d8487fc0e56e0e937754d.tar.bz2
Move and rename user activity event type constants.
Change-Id: Ie565808796773b6896e71ddfac6aaaf8031de846
Diffstat (limited to 'services/jni')
-rw-r--r--services/jni/com_android_server_input_InputManagerService.cpp2
-rw-r--r--services/jni/com_android_server_power_PowerManagerService.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/services/jni/com_android_server_input_InputManagerService.cpp b/services/jni/com_android_server_input_InputManagerService.cpp
index 57e1c28..35c2142 100644
--- a/services/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/jni/com_android_server_input_InputManagerService.cpp
@@ -903,7 +903,7 @@ void NativeInputManager::handleInterceptActions(jint wmActions, nsecs_t when,
#if DEBUG_INPUT_DISPATCHER_POLICY
ALOGD("handleInterceptActions: Poking user activity.");
#endif
- android_server_PowerManagerService_userActivity(when, POWER_MANAGER_BUTTON_EVENT);
+ android_server_PowerManagerService_userActivity(when, USER_ACTIVITY_EVENT_BUTTON);
}
if (wmActions & WM_ACTION_PASS_TO_USER) {
diff --git a/services/jni/com_android_server_power_PowerManagerService.cpp b/services/jni/com_android_server_power_PowerManagerService.cpp
index 2690b68..acce97e 100644
--- a/services/jni/com_android_server_power_PowerManagerService.cpp
+++ b/services/jni/com_android_server_power_PowerManagerService.cpp
@@ -55,7 +55,7 @@ static Mutex gPowerManagerLock;
static bool gScreenOn;
static bool gScreenBright;
-static nsecs_t gLastEventTime[POWER_MANAGER_LAST_EVENT + 1];
+static nsecs_t gLastEventTime[USER_ACTIVITY_EVENT_LAST + 1];
// Throttling interval for user activity calls.
static const nsecs_t MIN_TIME_BETWEEN_USERACTIVITIES = 500 * 1000000L; // 500ms
@@ -92,7 +92,7 @@ void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t
// Throttle calls into user activity by event type.
// We're a little conservative about argument checking here in case the caller
// passes in bad data which could corrupt system state.
- if (eventType >= 0 && eventType <= POWER_MANAGER_LAST_EVENT) {
+ if (eventType >= 0 && eventType <= USER_ACTIVITY_EVENT_LAST) {
nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
if (eventTime > now) {
eventTime = now;
@@ -262,7 +262,7 @@ int register_android_server_PowerManagerService(JNIEnv* env) {
"userActivity", "(JZIZ)V");
// Initialize
- for (int i = 0; i < POWER_MANAGER_LAST_EVENT; i++) {
+ for (int i = 0; i <= USER_ACTIVITY_EVENT_LAST; i++) {
gLastEventTime[i] = LLONG_MIN;
}
gScreenOn = true;