[Android] VideoPlayerActivity: add the right TargetApi decorations

Jean-Baptiste Kempf git at videolan.org
Mon May 25 16:13:20 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May 25 16:13:04 2015 +0200| [2af91370e3fe4a2c7049b2a3054b8167a67f57d1] | committer: Jean-Baptiste Kempf

VideoPlayerActivity: add the right TargetApi decorations

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

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

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 dbbb525..05ab6dc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -332,7 +332,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVideoPlay
     private boolean mHasHdmiAudio = false;
 
     @Override
-    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
@@ -697,6 +697,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVideoPlay
             mMediaRouter.removeCallback(mMediaRouterCallback);
     }
 
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
     private void startPlayback() {
         /* start playback only when audio service and both surfaces are ready */
         if (mPlaybackStarted || !mAudioServiceReady || !mSurfaceReady || !mSubtitleSurfaceReady)
@@ -744,6 +745,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVideoPlay
 
     }
 
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
     private void stopPlayback() {
         if (!mPlaybackStarted)
             return;



More information about the Android mailing list