[Android] VideoPlayerActivity: Kill warnings

Jean-Baptiste Kempf git at videolan.org
Tue Oct 16 19:15:33 CEST 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Oct 16 18:05:18 2012 +0200| [b4ee128ccfbd9702a0a06fc92605e1e23ce15050] | committer: Jean-Baptiste Kempf

VideoPlayerActivity: Kill warnings

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java     |    7 +++++--
 1 file changed, 5 insertions(+), 2 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 9b7ce95..65e87c7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -221,6 +221,7 @@ public class VideoPlayerActivity extends Activity {
         mSubtitle.setEnabled(false);
 
         mHandler.postDelayed(new Runnable() {
+            @Override
             public void run() {
                 /*FIXME
                  * The setTracksAndSubtitles method probably doesn't work in case of many many Tracks and Subtitles
@@ -359,6 +360,7 @@ public class VideoPlayerActivity extends Activity {
          * To workaround that, pause playback if the lockscreen is displayed
          */
         mHandler.postDelayed(new Runnable() {
+            @Override
             public void run() {
                 if (mLibVLC != null && mLibVLC.isPlaying()) {
                     KeyguardManager km = (KeyguardManager)getSystemService(KEYGUARD_SERVICE);
@@ -432,6 +434,7 @@ public class VideoPlayerActivity extends Activity {
     /**
      * Lock screen rotation
      */
+    @SuppressWarnings("deprecation")
     private void lockScreen() {
         WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
         Display display = wm.getDefaultDisplay();
@@ -646,8 +649,8 @@ public class VideoPlayerActivity extends Activity {
             ar = (double)mVideoWidth / (double)mVideoHeight;
         } else {
             /* Use the specified aspect ratio */
-            vw = (double)mVideoWidth * density;
-            ar = vw / (double)mVideoHeight;
+            vw = mVideoWidth * density;
+            ar = vw / mVideoHeight;
         }
 
         // compute the display aspect ratio



More information about the Android mailing list