Update documentation for AInputEvent_toJava
As AInputEvent_toJava makes JNI calls, the caller must ensure there are
no pending JNI exceptions as it may result in undefined behaviour. This
needs to be explicitly documented.
Refer: https://developer.android.com/training/articles/perf-jni#exceptions
Bug: 324375527
Test: atest MotionEventTest KeyEventTest
Change-Id: If9f40ba1ee2cb091514fb3baae28f2ca7520727e
diff --git a/include/android/input.h b/include/android/input.h
index b5c1e5c..fec56f0 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -1492,7 +1492,10 @@
/**
* Creates a java android.view.InputEvent object that is a copy of the specified native
- * {@link AInputEvent}. Returns null on error
+ * {@link AInputEvent}.
+ *
+ * Specified {@link AInputEvent} is require to be a valid {@link MotionEvent} or {@link KeyEvent}
+ * object.
*
* Available since API level 35.
*/