From 2d759f531438b72e0d0fb370c46b5452fda18c2f Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Fri, 11 Oct 2019 19:12:08 -0700 Subject: [PATCH] Remove unused parameter displayId This parameter is not used. Test: presubmit Bug: none Change-Id: Ib92c315d6556798aceb6f347913a8ef4f3b5e18e --- .../android/server/input/InputManagerService.java | 5 ++--- ...om_android_server_input_InputManagerService.cpp | 14 ++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index f1af73a122762..4307654c18e1c 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -199,8 +199,7 @@ public class InputManagerService extends IInputManager.Stub int deviceId, int sourceMask, int sw); private static native boolean nativeHasKeys(long ptr, int deviceId, int sourceMask, int[] keyCodes, boolean[] keyExists); - private static native void nativeRegisterInputChannel(long ptr, InputChannel inputChannel, - int displayId); + private static native void nativeRegisterInputChannel(long ptr, InputChannel inputChannel); private static native void nativeRegisterInputMonitor(long ptr, InputChannel inputChannel, int displayId, boolean isGestureMonitor); private static native void nativeUnregisterInputChannel(long ptr, InputChannel inputChannel); @@ -551,7 +550,7 @@ public class InputManagerService extends IInputManager.Stub } inputChannel.setToken(new Binder()); - nativeRegisterInputChannel(mPtr, inputChannel, Display.INVALID_DISPLAY); + nativeRegisterInputChannel(mPtr, inputChannel); } /** diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index fb2fdab19a548..dd2629d317688 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -201,8 +201,7 @@ public: void setDisplayViewports(JNIEnv* env, jobjectArray viewportObjArray); - status_t registerInputChannel(JNIEnv* env, const sp& inputChannel, - int32_t displayId); + status_t registerInputChannel(JNIEnv* env, const sp& inputChannel); status_t registerInputMonitor(JNIEnv* env, const sp& inputChannel, int32_t displayId, bool isGestureMonitor); status_t unregisterInputChannel(JNIEnv* env, const sp& inputChannel); @@ -435,10 +434,9 @@ void NativeInputManager::setDisplayViewports(JNIEnv* env, jobjectArray viewportO } status_t NativeInputManager::registerInputChannel(JNIEnv* /* env */, - const sp& inputChannel, int32_t displayId) { + const sp& inputChannel) { ATRACE_CALL(); - return mInputManager->getDispatcher()->registerInputChannel( - inputChannel, displayId); + return mInputManager->getDispatcher()->registerInputChannel(inputChannel); } status_t NativeInputManager::registerInputMonitor(JNIEnv* /* env */, @@ -1405,7 +1403,7 @@ static void handleInputChannelDisposed(JNIEnv* env, } static void nativeRegisterInputChannel(JNIEnv* env, jclass /* clazz */, - jlong ptr, jobject inputChannelObj, jint displayId) { + jlong ptr, jobject inputChannelObj) { NativeInputManager* im = reinterpret_cast(ptr); sp inputChannel = android_view_InputChannel_getInputChannel(env, @@ -1415,7 +1413,7 @@ static void nativeRegisterInputChannel(JNIEnv* env, jclass /* clazz */, return; } - status_t status = im->registerInputChannel(env, inputChannel, displayId); + status_t status = im->registerInputChannel(env, inputChannel); if (status) { std::string message; @@ -1757,7 +1755,7 @@ static const JNINativeMethod gInputManagerMethods[] = { { "nativeHasKeys", "(JII[I[Z)Z", (void*) nativeHasKeys }, { "nativeRegisterInputChannel", - "(JLandroid/view/InputChannel;I)V", + "(JLandroid/view/InputChannel;)V", (void*) nativeRegisterInputChannel }, { "nativeRegisterInputMonitor", "(JLandroid/view/InputChannel;IZ)V",