summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kartar Singh <kartarsingh@google.com> 2024-10-09 18:31:41 +0100
committer Kartar Singh <kartarsingh@google.com> 2024-10-09 18:49:41 +0100
commit4d1b8c91282bbe70a95f35c6cc55f0e29a132cd8 (patch)
tree8a7b928fa121efd9d7d26c0b8457a2052236819f
parent9e36084a54e77ef7aa7ef3cef088623e48e98cc5 (diff)
Use correct method to call JNI method with void return type
Test: Testedy locally using an app which cretes an input receiver and calls AInputReceiver_release, no crash was observed after the fix. BUG: 368251173 Change-Id: Ib4fc8d839e546bf15b6ab95b2053a1e30cddb832 Change-Id: I9128ff93a570ab57df57cc4ee2d7052a15bde6e8
-rw-r--r--core/jni/android_view_WindowManagerGlobal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/jni/android_view_WindowManagerGlobal.cpp b/core/jni/android_view_WindowManagerGlobal.cpp
index abc621d8dc90..4202de39adb0 100644
--- a/core/jni/android_view_WindowManagerGlobal.cpp
+++ b/core/jni/android_view_WindowManagerGlobal.cpp
@@ -69,8 +69,8 @@ void removeInputChannel(const sp<IBinder>& clientToken) {
JNIEnv* env = AndroidRuntime::getJNIEnv();
ScopedLocalRef<jobject> clientTokenObj(env, javaObjectForIBinder(env, clientToken));
- env->CallStaticObjectMethod(gWindowManagerGlobal.clazz, gWindowManagerGlobal.removeInputChannel,
- clientTokenObj.get());
+ env->CallStaticVoidMethod(gWindowManagerGlobal.clazz, gWindowManagerGlobal.removeInputChannel,
+ clientTokenObj.get());
}
int register_android_view_WindowManagerGlobal(JNIEnv* env) {
@@ -88,4 +88,4 @@ int register_android_view_WindowManagerGlobal(JNIEnv* env) {
return NO_ERROR;
}
-} // namespace android \ No newline at end of file
+} // namespace android