[Android] Change type value to allow masks

Geoffrey Métais git at videolan.org
Fri Jan 13 16:56:43 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 13 16:39:59 2017 +0100| [7f4bec232234c434ec92616be13041d123ad0ea3] | committer: Geoffrey Métais

Change type value to allow masks

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

 .../videolan/medialibrary/media/MediaLibraryItem.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/media/MediaLibraryItem.java b/medialibrary/src/org/videolan/medialibrary/media/MediaLibraryItem.java
index f3a2e3b..a42025d 100644
--- a/medialibrary/src/org/videolan/medialibrary/media/MediaLibraryItem.java
+++ b/medialibrary/src/org/videolan/medialibrary/media/MediaLibraryItem.java
@@ -8,14 +8,14 @@ import org.videolan.medialibrary.Medialibrary;
 
 public abstract class MediaLibraryItem implements Parcelable {
 
-    public static final int TYPE_ALBUM = 0;
-    public static final int TYPE_ARTIST = 1;
-    public static final int TYPE_GENRE = 2;
-    public static final int TYPE_PLAYLIST = 3;
-    public static final int TYPE_MEDIA = 4;
-    public static final int TYPE_DUMMY = 5;
-    public static final int TYPE_STORAGE = 6;
-    public static final int TYPE_HISTORY = 7;
+    public static final int TYPE_ALBUM    = 1 << 1;
+    public static final int TYPE_ARTIST   = 1 << 2;
+    public static final int TYPE_GENRE    = 1 << 3;
+    public static final int TYPE_PLAYLIST = 1 << 4;
+    public static final int TYPE_MEDIA    = 1 << 5;
+    public static final int TYPE_DUMMY    = 1 << 6;
+    public static final int TYPE_STORAGE  = 1 << 7;
+    public static final int TYPE_HISTORY  = 1 << 9;
 
     public static final int FLAG_NONE = 0;
     public static final int FLAG_SELECTED = 1;



More information about the Android mailing list