[Android] Revert "fix some lint warnings"

Jean-Baptiste Kempf git at videolan.org
Tue Sep 10 01:26:37 CEST 2013


vlc-ports/android | branch: 0.1.x-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Tue Sep 10 01:24:03 2013 +0200| [47582bf899364a76485d7644ed9e1a0f17e11325] | committer: Jean-Baptiste Kempf

Revert "fix some lint warnings"

This reverts commit 19dda55633ba81ca1ffdc31d97e3e37c60bc9194.

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

 vlc-android/src/org/videolan/libvlc/LibVlcUtil.java          |    3 +--
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java  |   10 +++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java b/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java
index d38300a..5485779 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVlcUtil.java
@@ -28,7 +28,6 @@ import java.io.IOException;
 import java.io.RandomAccessFile;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
-import java.util.Locale;
 
 import android.content.Context;
 import android.os.Build;
@@ -132,7 +131,7 @@ public class LibVlcUtil {
                     hasFpu = true;
                 if(line.startsWith("processor"))
                     processors++;
-                if(bogoMIPS < 0 && line.toLowerCase(Locale.ENGLISH).contains("bogomips")) {
+                if(bogoMIPS < 0 && line.toLowerCase().contains("bogomips")) {
                     String[] bogo_parts = line.split(":");
                     try {
                         bogoMIPS = Float.parseFloat(bogo_parts[1].trim());
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 c03b0e2..d47927b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -274,13 +274,21 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
         mSurface = (SurfaceView) findViewById(R.id.player_surface);
         mSurfaceHolder = mSurface.getHolder();
         mSurfaceFrame = (FrameLayout) findViewById(R.id.player_surface_frame);
+        int pitch;
         String chroma = pref.getString("chroma_format", "");
         if(Util.isGingerbreadOrLater() && chroma.equals("YV12")) {
             mSurfaceHolder.setFormat(ImageFormat.YV12);
+            pitch = ImageFormat.getBitsPerPixel(ImageFormat.YV12) / 8;
         } else if (chroma.equals("RV16")) {
             mSurfaceHolder.setFormat(PixelFormat.RGB_565);
+            PixelFormat info = new PixelFormat();
+            PixelFormat.getPixelFormatInfo(PixelFormat.RGB_565, info);
+            pitch = info.bytesPerPixel;
         } else {
             mSurfaceHolder.setFormat(PixelFormat.RGBX_8888);
+            PixelFormat info = new PixelFormat();
+            PixelFormat.getPixelFormatInfo(PixelFormat.RGBX_8888, info);
+            pitch = info.bytesPerPixel;
         }
         mSurfaceAlign = 16 / pitch - 1;
         mSurfaceHolder.addCallback(mSurfaceCallback);
@@ -1335,7 +1343,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
      * Dim the status bar and/or navigation icons when needed on Android 3.x.
      * Hide it on Android 4.0 and later
      */
-    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
     private void dimStatusBar(boolean dim) {
         if (!Util.isHoneycombOrLater() || !Util.hasNavBar())
             return;



More information about the Android mailing list