[Android] Add hasFlag() method

Geoffrey Métais git at videolan.org
Fri Nov 27 17:07:28 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 26 18:02:03 2015 +0100| [151dc7191b8e429aec7981ce527c362aaa8d4a90] | committer: Geoffrey Métais

Add hasFlag() method

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

 .../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;
     }



More information about the Android mailing list