[Android] LibVLC: Add Android P build check utility

Geoffrey Métais git at videolan.org
Wed Mar 27 15:14:57 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 27 09:38:04 2019 +0100| [0d0c3aab6a53b83b985b1ecb3cdb9ea9e613298f] | committer: Geoffrey Métais

LibVLC: Add Android P build check utility

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

 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 aa3ac98bb..81cb2c4fc 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 >= Build.VERSION_CODES.P;
+    public static final boolean isOOrLater = isPOrLater || android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
     public static final boolean isNougatMR1OrLater = isOOrLater || android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1;
     public static final boolean isNougatOrLater = isNougatMR1OrLater || 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;



More information about the Android mailing list