From 48db7834830215a3ee00f31a442a62acf33cabfa Mon Sep 17 00:00:00 2001 From: Ronghua Wu Date: Mon, 25 Aug 2014 14:47:58 -0700 Subject: [PATCH] API: Document android-allow-cross-domain-redirect in MediaPlayer and VideoView Bug: 17238151 Change-Id: Ib1e780cf5f93b07a7abbca839e7cc9f92a60d451 --- core/java/android/widget/VideoView.java | 4 ++++ media/java/android/media/MediaPlayer.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java index cb0c3d07ec9a0..572cca2ff2298 100644 --- a/core/java/android/widget/VideoView.java +++ b/core/java/android/widget/VideoView.java @@ -253,6 +253,10 @@ public class VideoView extends SurfaceView * * @param uri the URI of the video. * @param headers the headers for the URI request. + * Note that the cross domain redirection is allowed by default, but that can be + * changed with key/value pairs through the headers parameter with + * "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value + * to disallow or allow cross domain redirection. */ public void setVideoURI(Uri uri, Map headers) { mUri = uri; diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index 7c3b4fc1e1346..9343aa4f16008 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -961,6 +961,10 @@ public class MediaPlayer implements SubtitleController.Listener * @param context the Context to use when resolving the Uri * @param uri the Content URI of the data you want to play * @param headers the headers to be sent together with the request for the data + * Note that the cross domain redirection is allowed by default, but that can be + * changed with key/value pairs through the headers parameter with + * "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value + * to disallow or allow cross domain redirection. * @throws IllegalStateException if it is called in an invalid state */ public void setDataSource(Context context, Uri uri, Map headers)