[Android] MediaRouter was integrated in API-16, but not getPresentationDisplay

Jean-Baptiste Kempf git at videolan.org
Fri Feb 14 15:23:26 CET 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb 14 15:04:09 2014 +0100| [0ca09bf72510adea8fc770b3297848a699736af2] | committer: Jean-Baptiste Kempf

MediaRouter was integrated in API-16, but not getPresentationDisplay

So much consistency brought to you by Google©®

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0ca09bf72510adea8fc770b3297848a699736af2
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java   |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index be8baf3..4450a00 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -210,7 +210,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     private ArrayList<String> mSubtitleSelectedFiles = new ArrayList<String>();
 
     @Override
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.player);
@@ -340,7 +340,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
                 ? mScreenOrientation
                 : getScreenOrientation());
 
-        if (Util.isJellyBeanOrLater()) {
+        if (Util.isJellyBeanMR1OrLater()) {
             // Get the media router service (miracast)
             mMediaRouter = (MediaRouter)getSystemService(Context.MEDIA_ROUTER_SERVICE);
             mMediaRouterCallback = new MediaRouter.SimpleCallback() {
@@ -491,7 +491,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
             }
         }
 
-        if (Util.isJellyBeanOrLater()) {
+        if (Util.isJellyBeanMR1OrLater()) {
             updatePresentation();
         }
     }
@@ -1834,7 +1834,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
         CommonDialogs.advancedOptions(this, v, MenuType.Video);
     }
 
-    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
     private void updatePresentation() {
         if (mMediaRouter == null)
             return;
@@ -1883,6 +1883,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
         }
     };
 
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
     private final static class SecondaryDisplay extends Presentation {
         public final static String TAG = "VLC/SecondaryDisplay";
 



More information about the Android mailing list