[Android] Fix Android version check

Geoffrey Métais git at videolan.org
Fri Apr 29 19:16:37 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 29 19:16:12 2016 +0200| [bce2f6c8f0f981432fb35b871820fca5571d1fd1] | committer: Geoffrey Métais

Fix Android version check

> https://code.videolan.org/videolan/vlc-android/commit/bce2f6c8f0f981432fb35b871820fca5571d1fd1
---

 libvlc/src/org/videolan/libvlc/util/AndroidUtil.java       | 5 ++++-
 vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.java | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java b/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java
index f87bc3f..e29c033 100644
--- a/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java
+++ b/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java
@@ -22,7 +22,6 @@ package org.videolan.libvlc.util;
 
 import android.net.Uri;
 import android.os.Build;
-import android.util.Log;
 
 import java.io.File;
 
@@ -43,6 +42,10 @@ public class AndroidUtil {
         return android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1;
     }
 
+    public static boolean isHoneycombMr2OrLater() {
+        return android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2;
+    }
+
     public static boolean isICSOrLater() {
         return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
     }
diff --git a/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.java b/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.java
index 7e95a5d..0ee8a56 100644
--- a/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.java
+++ b/vlc-android/src/org/videolan/vlc/gui/view/PopupLayout.java
@@ -106,7 +106,7 @@ public class PopupLayout extends RelativeLayout implements ScaleGestureDetector.
         mWindowManager.addView(this, params);
         mLayoutParams = (WindowManager.LayoutParams)getLayoutParams();
 
-        if (AndroidUtil.isHoneycombOrLater()) {
+        if (AndroidUtil.isHoneycombMr2OrLater()) {
             Point size = new Point();
             mWindowManager.getDefaultDisplay().getSize(size);
             mScreenWidth = size.x;



More information about the Android mailing list