[Android] isPOrLater util

Geoffrey Métais git at videolan.org
Tue Jul 24 13:14:51 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jul 24 13:13:18 2018 +0200| [d702110b84304f7d1691f82d6e1df964f6a8a114] | committer: Geoffrey Métais

isPOrLater util

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

 libvlc/src/org/videolan/libvlc/util/AndroidUtil.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java b/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java
index 512b41422..6c84f9271 100644
--- a/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java
+++ b/libvlc/src/org/videolan/libvlc/util/AndroidUtil.java
@@ -27,7 +27,8 @@ import java.io.File;
 
 public class AndroidUtil {
 
-    public static final boolean isOOrLater = android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
+    public static final boolean isPOrLater = android.os.Build.VERSION.SDK_INT > 27;
+    public static final boolean isOOrLater = isPOrLater || android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
     public static final boolean isNougatOrLater = isOOrLater || android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
     public static final boolean isMarshMallowOrLater = isNougatOrLater || android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
     public static final boolean isLolliPopOrLater = isMarshMallowOrLater || android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;



More information about the Android mailing list