[Android] VideoPlayerActivity: add the right TargetApi decorations

Jean-Baptiste Kempf git at videolan.org
Mon May 25 18:45:34 CEST 2015


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

VideoPlayerActivity: add the right TargetApi decorations

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

 .../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 c0840fc..a3479ba 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -330,7 +330,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);
 
@@ -694,6 +694,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)
@@ -741,6 +742,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