From d53ea831984aeaecf8756d820d0b9c06f429d798 Mon Sep 17 00:00:00 2001 From: Santiago Seifert Date: Tue, 18 Jan 2022 19:06:44 +0000 Subject: [PATCH] Document context of MediaMetadataRetriever new throws clauses Bug: 203553331 Change-Id: I21a8d0360816b9211eda36a521f7ca943364cbe0 Test: Presubmit's build. --- media/java/android/media/MediaMetadataRetriever.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/media/java/android/media/MediaMetadataRetriever.java b/media/java/android/media/MediaMetadataRetriever.java index 60d21c0b3b978..ad8fc0707f3e9 100644 --- a/media/java/android/media/MediaMetadataRetriever.java +++ b/media/java/android/media/MediaMetadataRetriever.java @@ -1077,7 +1077,9 @@ public class MediaMetadataRetriever implements AutoCloseable { * Releases any acquired resources. Call it when done with the object. * * @throws IOException When an {@link IOException} is thrown while closing a {@link - * MediaDataSource} passed to {@link #setDataSource(MediaDataSource)}. + * MediaDataSource} passed to {@link #setDataSource(MediaDataSource)}. This throws clause exists + * since API 33, but this method can throw in earlier API versions where the exception is not + * declared. */ @Override public void close() throws IOException { @@ -1088,7 +1090,9 @@ public class MediaMetadataRetriever implements AutoCloseable { * Releases any acquired resources. Call it when done with the object. * * @throws IOException When an {@link IOException} is thrown while closing a {@link - * MediaDataSource} passed to {@link #setDataSource(MediaDataSource)}. + * MediaDataSource} passed to {@link #setDataSource(MediaDataSource)}. This throws clause exists + * since API 33, but this method can throw in earlier API versions where the exception is not + * declared. */ public native void release() throws IOException; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)