diff options
author | 2021-12-16 03:32:30 -0800 | |
---|---|---|
committer | 2021-12-16 03:32:30 -0800 | |
commit | 9d43974f4d7110552d5ca39d0a8576b8c87fdb6f (patch) | |
tree | 56b9bf578cd6fb3f2496673301cd212153f89a28 /include/android/input.h | |
parent | b1e1e3914c8be41c83d3f6e7c71e53dffcd43f16 (diff) |
Add lifecycle information to docs for AInputQueue_fromJava
Add documentation to AInputQueue_fromJava to make it explicit that the
returned native object is only valid as long as the java object has not
yet been disposed.
Test: None
Bug: 210727408
Change-Id: I20ec68afba0ec79477d57b8a110d55220b7c01ff
Diffstat (limited to 'include/android/input.h')
-rw-r--r-- | include/android/input.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/android/input.h b/include/android/input.h index 447f8fa842..fbd61b53f4 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -1386,8 +1386,11 @@ int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event); void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled); /** - * Supplies the AInputQueue* object associated with the supplied Java InputQueue - * object. + * Returns the AInputQueue* object associated with the supplied Java InputQueue + * object. The returned native object holds a weak reference to the Java object, + * and is only valid as long as the Java object has not yet been disposed. You + * should ensure that there is a strong reference to the Java object and that it + * has not been disposed before using the returned object. * * Available since API level 33. */ |