Skip to content

Commit dfc9f67

Browse files
Treehugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "Document what onKeyEvent/onMotionEvent return values mean" into main
2 parents 77b3f6f + 2fd24c0 commit dfc9f67

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

include/android/surface_control_input_receiver.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ __BEGIN_DECLS
3939
*
4040
* \param motionEvent The motion event. This must be released with AInputEvent_release.
4141
*
42+
* \return true if the event is handled by the client, false otherwise.
4243
* Available since API level 35.
4344
*/
4445
typedef bool (*AInputReceiver_onMotionEvent)(void *_Null_unspecified context,
45-
AInputEvent *_Nonnull motionEvent)
46-
__INTRODUCED_IN(__ANDROID_API_V__);
46+
AInputEvent *_Nonnull motionEvent);
4747
/**
4848
* The AInputReceiver_onKeyEvent callback is invoked when the registered input channel receives
4949
* a key event.
@@ -53,11 +53,12 @@ typedef bool (*AInputReceiver_onMotionEvent)(void *_Null_unspecified context,
5353
*
5454
* \param keyEvent The key event. This must be released with AInputEvent_release.
5555
*
56+
* \return true if the event is handled by the client, false otherwise. System may generate
57+
* a fallback key event if the event is not handled.
5658
* Available since API level 35.
5759
*/
5860
typedef bool (*AInputReceiver_onKeyEvent)(void *_Null_unspecified context,
59-
AInputEvent *_Nonnull keyEvent)
60-
__INTRODUCED_IN(__ANDROID_API_V__);
61+
AInputEvent *_Nonnull keyEvent);
6162

6263
typedef struct AInputReceiverCallbacks AInputReceiverCallbacks;
6364

0 commit comments

Comments
 (0)