diff options
author | Glenn Kasten <gkasten@google.com> | 2012-03-09 11:02:31 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-03-09 17:01:51 -0800 |
commit | 55d1eea69451ee246a41e12a14be42878773e3cb (patch) | |
tree | 2a2d4f47c36e0ce738faf44a9bc0519a8140ea9b | |
parent | 19a07d97478e504a9a52d2b97fcf4e9ddf3820fd (diff) | |
download | frameworks_base-55d1eea69451ee246a41e12a14be42878773e3cb.zip frameworks_base-55d1eea69451ee246a41e12a14be42878773e3cb.tar.gz frameworks_base-55d1eea69451ee246a41e12a14be42878773e3cb.tar.bz2 |
MediaPlayer doc for setDataSource by file pathname
Change-Id: Icb5acbf75242ca2df62ccda5185f8841217653a0
-rw-r--r-- | media/java/android/media/MediaPlayer.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index e663e91..139ff01 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -813,6 +813,13 @@ public class MediaPlayer * * @param path the path of the file, or the http/rtsp URL of the stream you want to play * @throws IllegalStateException if it is called in an invalid state + * + * <p>When <code>path</code> refers to a local file, the file may actually be opened by a + * process other than the calling application. This implies that the pathname + * should be an absolute path (as any other process runs with unspecified current working + * 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)}. */ public native void setDataSource(String path) throws IOException, IllegalArgumentException, SecurityException, IllegalStateException; |