summaryrefslogtreecommitdiff
path: root/include/android/input.h
diff options
context:
space:
mode:
author Arpit Singh <arpitks@google.com> 2024-02-16 11:42:38 +0000
committer Arpit Singh <arpitks@google.com> 2024-02-28 10:39:36 +0000
commitc91c644ce06e5fbff08b1bb4866ce1bd81e85b7b (patch)
tree1252c7867c607a0e5fccf0256cf8a8298f1d5c3b /include/android/input.h
parentadd5fdd1f38f7116c31ad023617a7bebce995ac1 (diff)
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
Diffstat (limited to 'include/android/input.h')
-rw-r--r--include/android/input.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/android/input.h b/include/android/input.h
index b5c1e5c354..fec56f02f9 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -1492,7 +1492,10 @@ const AInputEvent* AMotionEvent_fromJava(JNIEnv* env, jobject motionEvent) __INT
/**
* 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.
*/