summaryrefslogtreecommitdiffstats
path: root/services/jni/com_android_server_input_InputManagerService.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-09 11:05:16 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-09 11:22:12 -0700
commit27fd3420ac0498ff5086f71023f443966541aa04 (patch)
treedc29332ba544ec0d8da9503d9205e6ef753c0e56 /services/jni/com_android_server_input_InputManagerService.cpp
parenteca3cf58c096d5a4ba4ae80318f72266c21a9a6d (diff)
downloadframeworks_base-27fd3420ac0498ff5086f71023f443966541aa04.zip
frameworks_base-27fd3420ac0498ff5086f71023f443966541aa04.tar.gz
frameworks_base-27fd3420ac0498ff5086f71023f443966541aa04.tar.bz2
Fix lid switch interpretation.
Also remove unnecessary permission check for method that is only called internally. Change-Id: I32f63fc3e96b06709d18b046ee2d3c8f310de70d
Diffstat (limited to 'services/jni/com_android_server_input_InputManagerService.cpp')
-rw-r--r--services/jni/com_android_server_input_InputManagerService.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/jni/com_android_server_input_InputManagerService.cpp b/services/jni/com_android_server_input_InputManagerService.cpp
index 75c20f3..c137a78 100644
--- a/services/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/jni/com_android_server_input_InputManagerService.cpp
@@ -510,8 +510,9 @@ void NativeInputManager::notifySwitch(nsecs_t when, int32_t switchCode,
switch (switchCode) {
case SW_LID:
+ // When switch value is set indicates lid is closed.
env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyLidSwitchChanged,
- when, switchValue == 0);
+ when, switchValue == 0 /*lidOpen*/);
checkAndClearExceptionFromCallback(env, "notifyLidSwitchChanged");
break;
}