[Android] [PATCH 08/10] Add hasFlag() method

Geoffrey Métais geoffrey.metais at gmail.com
Fri Nov 27 13:25:03 CET 2015


---
 .../src/org/videolan/vlc/media/MediaWrapper.java    | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/media/MediaWrapper.java
index f691643..0a6e82b 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/media/MediaWrapper.java
@@ -20,15 +20,6 @@
 
 package org.videolan.vlc.media;
 
-import java.util.Locale;
-
-import org.videolan.libvlc.MediaPlayer;
-import org.videolan.libvlc.util.Extensions;
-import org.videolan.libvlc.Media;
-import org.videolan.libvlc.Media.VideoTrack;
-import org.videolan.libvlc.Media.Meta;
-import org.videolan.vlc.gui.helpers.BitmapUtil;
-
 import android.graphics.Bitmap;
 import android.net.Uri;
 import android.os.Parcel;
@@ -36,6 +27,15 @@ import android.os.Parcelable;
 import android.text.TextUtils;
 import android.util.Log;
 
+import org.videolan.libvlc.Media;
+import org.videolan.libvlc.Media.Meta;
+import org.videolan.libvlc.Media.VideoTrack;
+import org.videolan.libvlc.MediaPlayer;
+import org.videolan.libvlc.util.Extensions;
+import org.videolan.vlc.gui.helpers.BitmapUtil;
+
+import java.util.Locale;
+
 public class MediaWrapper implements Parcelable {
     public final static String TAG = "VLC/MediaWrapper";
 
@@ -450,6 +450,9 @@ public class MediaWrapper implements Parcelable {
     public int getFlags() {
         return mFlags;
     }
+    public boolean hasFlag(int flag) {
+        return (mFlags & flag) != 0;
+    }
     public void removeFlags(int flags) {
         mFlags &= ~flags;
     }
-- 
2.5.0



More information about the Android mailing list