From a1c7483429efd9fa5d87b6218018a67eec022f38 Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Wed, 20 Jul 2016 17:45:27 -0700 Subject: [PATCH] MediaExtractor: Javadoc should mention INTERNET permission Bug: 10673034 Change-Id: Iea1196c76b09fa5b8f5b2d11a461eeb4c6578a1b --- media/java/android/media/MediaExtractor.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/media/java/android/media/MediaExtractor.java b/media/java/android/media/MediaExtractor.java index 6f5199b6959c9..9e560d529a359 100644 --- a/media/java/android/media/MediaExtractor.java +++ b/media/java/android/media/MediaExtractor.java @@ -68,6 +68,9 @@ import java.util.UUID; * extractor.release(); * extractor = null; * + * + *

This class requires the {@link android.Manifest.permission#INTERNET} permission + * when used with network-based content. */ final public class MediaExtractor { public MediaExtractor() { @@ -89,6 +92,10 @@ final public class MediaExtractor { * * @param context the Context to use when resolving the Uri * @param uri the Content URI of the data you want to extract from. + * + *

When uri refers to a network file the + * {@link android.Manifest.permission#INTERNET} permission is required. + * * @param headers the headers to be sent together with the request for the data. * This can be {@code null} if no specific headers are to be sent with the * request. @@ -136,6 +143,10 @@ final public class MediaExtractor { * Sets the data source (file-path or http URL) to use. * * @param path the path of the file, or the http URL + * + *

When path refers to a network file the + * {@link android.Manifest.permission#INTERNET} permission is required. + * * @param headers the headers associated with the http request for the stream you want to play. * This can be {@code null} if no specific headers are to be sent with the * request. @@ -181,6 +192,9 @@ final public class MediaExtractor { * directory), and that the pathname should reference a world-readable file. * As an alternative, the application could first open the file for reading, * and then use the file descriptor form {@link #setDataSource(FileDescriptor)}. + * + *

When path refers to a network file the + * {@link android.Manifest.permission#INTERNET} permission is required. */ public final void setDataSource(@NonNull String path) throws IOException { nativeSetDataSource(