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
diff --git a/include/android/input.h b/include/android/input.h
index 447f8fa..fbd61b5 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -1386,8 +1386,11 @@
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.
*/