diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-08-20 20:25:52 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-20 20:26:11 -0700 |
commit | 256237c99f1d7fc32e025861c3ae7bc855db3c5a (patch) | |
tree | 3c4c27f9649a040c5f65b82d1758454c48cfbd71 /services/jni | |
parent | 892f371c6b8c33268dceaeb89ac09c73ad72ad79 (diff) | |
parent | 5338428ddbe662283bf88171c7ca361d51d78da8 (diff) | |
download | frameworks_base-256237c99f1d7fc32e025861c3ae7bc855db3c5a.zip frameworks_base-256237c99f1d7fc32e025861c3ae7bc855db3c5a.tar.gz frameworks_base-256237c99f1d7fc32e025861c3ae7bc855db3c5a.tar.bz2 |
Merge "Plumb the switch code into Dalvik." into jb-mr1-dev
Diffstat (limited to 'services/jni')
-rw-r--r-- | services/jni/com_android_server_input_InputManagerService.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/services/jni/com_android_server_input_InputManagerService.cpp b/services/jni/com_android_server_input_InputManagerService.cpp index 701b15a..495d4ab 100644 --- a/services/jni/com_android_server_input_InputManagerService.cpp +++ b/services/jni/com_android_server_input_InputManagerService.cpp @@ -63,7 +63,7 @@ static const float POINTER_SPEED_EXPONENT = 1.0f / 4; static struct { jmethodID notifyConfigurationChanged; jmethodID notifyInputDevicesChanged; - jmethodID notifyLidSwitchChanged; + jmethodID notifySwitch; jmethodID notifyInputChannelBroken; jmethodID notifyANR; jmethodID filterInputEvent; @@ -578,14 +578,9 @@ void NativeInputManager::notifySwitch(nsecs_t when, int32_t switchCode, JNIEnv* env = jniEnv(); - switch (switchCode) { - case SW_LID: - // When switch value is set indicates lid is closed. - env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyLidSwitchChanged, - when, switchValue == 0 /*lidOpen*/); - checkAndClearExceptionFromCallback(env, "notifyLidSwitchChanged"); - break; - } + env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifySwitch, + when, switchCode, switchValue); + checkAndClearExceptionFromCallback(env, "notifySwitch"); } void NativeInputManager::notifyConfigurationChanged(nsecs_t when) { @@ -1410,8 +1405,8 @@ int register_android_server_InputManager(JNIEnv* env) { GET_METHOD_ID(gServiceClassInfo.notifyInputDevicesChanged, clazz, "notifyInputDevicesChanged", "([Landroid/view/InputDevice;)V"); - GET_METHOD_ID(gServiceClassInfo.notifyLidSwitchChanged, clazz, - "notifyLidSwitchChanged", "(JZ)V"); + GET_METHOD_ID(gServiceClassInfo.notifySwitch, clazz, + "notifySwitch", "(JII)V"); GET_METHOD_ID(gServiceClassInfo.notifyInputChannelBroken, clazz, "notifyInputChannelBroken", "(Lcom/android/server/input/InputWindowHandle;)V"); |