diff options
author | 2024-01-17 15:30:16 +0000 | |
---|---|---|
committer | 2024-02-14 09:17:20 +0000 | |
commit | f8680e6d01b64ea8745b8c0aa335e6a4b54d8958 (patch) | |
tree | 688c0daf075d69dede269eab59976c678b8e6505 /include/android/input.h | |
parent | 859749f39320f20116fe2f42169cf55bdb5e3e91 (diff) |
Add NDK API to obtain Java InputEvent from Native AInputEvent
This CL adds an NDK API to obtain a copy of native AInputEvent as Java
InputEvent.
Test: atest MotionEventTest KeyEventTest
Bug: 298948992
Change-Id: If7b14867813f7b07bd628ebd6da7e3be4c3bb89e
Diffstat (limited to 'include/android/input.h')
-rw-r--r-- | include/android/input.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/android/input.h b/include/android/input.h index 16d86af44c..b5c1e5c354 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -1490,6 +1490,14 @@ int32_t AMotionEvent_getClassification(const AInputEvent* motion_event) */ const AInputEvent* AMotionEvent_fromJava(JNIEnv* env, jobject motionEvent) __INTRODUCED_IN(31); +/** + * Creates a java android.view.InputEvent object that is a copy of the specified native + * {@link AInputEvent}. Returns null on error + * + * Available since API level 35. + */ +jobject AInputEvent_toJava(JNIEnv* env, const AInputEvent* aInputEvent) __INTRODUCED_IN(35); + struct AInputQueue; /** * Input queue |