Pass JNIEnv explicitly into AInputQueue_fromJava
Instead of assuming a JNIEnv*, the method should have the env passed
into it, which is the standard practice for native APIs.
Bug: 210727635
Test: atest InputQueueTest
Change-Id: Iae5fc5bd39c758c530185694751d6d79715ce31b
diff --git a/native/android/input.cpp b/native/android/input.cpp
index 4de2c23..c06c81e 100644
--- a/native/android/input.cpp
+++ b/native/android/input.cpp
@@ -330,6 +330,6 @@
iq->finishEvent(e, handled != 0);
}
-AInputQueue* AInputQueue_fromJava(jobject inputQueue) {
- return android::android_view_InputQueue_getNativePtr(inputQueue);
+AInputQueue* AInputQueue_fromJava(JNIEnv* env, jobject inputQueue) {
+ return android::android_view_InputQueue_getNativePtr(env, inputQueue);
}