summaryrefslogtreecommitdiffstats
path: root/services/jni/com_android_server_input_InputManagerService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/jni/com_android_server_input_InputManagerService.cpp')
-rw-r--r--services/jni/com_android_server_input_InputManagerService.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/jni/com_android_server_input_InputManagerService.cpp b/services/jni/com_android_server_input_InputManagerService.cpp
index c57402f..75c20f3 100644
--- a/services/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/jni/com_android_server_input_InputManagerService.cpp
@@ -950,8 +950,9 @@ void NativeInputManager::loadPointerResources(PointerResources* outResources) {
static jint nativeInit(JNIEnv* env, jclass clazz,
jobject serviceObj, jobject contextObj, jobject messageQueueObj) {
- sp<Looper> looper = android_os_MessageQueue_getLooper(env, messageQueueObj);
- NativeInputManager* im = new NativeInputManager(contextObj, serviceObj, looper);
+ sp<MessageQueue> messageQueue = android_os_MessageQueue_getMessageQueue(env, messageQueueObj);
+ NativeInputManager* im = new NativeInputManager(contextObj, serviceObj,
+ messageQueue->getLooper());
im->incStrong(serviceObj);
return reinterpret_cast<jint>(im);
}