Clarify NativeHandle.java dup documentation.
close must also be called.
Bug: 35098567
Test: N/A
Change-Id: I4d03effc82d7f6de7ca785ae4d12868ccc4ceddd
diff --git a/core/java/android/os/NativeHandle.java b/core/java/android/os/NativeHandle.java
index f3dc5c8..fbecc8e 100644
--- a/core/java/android/os/NativeHandle.java
+++ b/core/java/android/os/NativeHandle.java
@@ -100,6 +100,9 @@
/**
* Explicitly duplicate NativeHandle (this dups all file descritptors).
+ *
+ * If this method is called, this must also be explicitly closed with
+ * {@link #close()}.
*/
public NativeHandle dup() throws java.io.IOException {
FileDescriptor[] fds = new FileDescriptor[mFds.length];