ExifInterface: inform the developers to close their FD/streams
After use of constructors for FD/Streams, developers should close their
FD/streams.
Bug: 27948392
Change-Id: I6c26213d6804791e6d72d5830566f63e5ed57284
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 3d7e744..72f5742 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -697,7 +697,8 @@
/**
* Reads Exif tags from the specified image file descriptor. Attribute mutation is supported
- * for writable and seekable file descriptors only.
+ * for writable and seekable file descriptors only. This constructor will not rewind the offset
+ * of the given file descriptor. Developers should close the file descriptor after use.
*/
public ExifInterface(FileDescriptor fileDescriptor) throws IOException {
if (fileDescriptor == null) {
@@ -730,7 +731,8 @@
/**
* Reads Exif tags from the specified image input stream. Attribute mutation is not supported
- * for input streams.
+ * for input streams. The given input stream will proceed its current position. Developers
+ * should close the input stream after use.
*/
public ExifInterface(InputStream inputStream) throws IOException {
if (inputStream == null) {