diff --git a/src/org/kreed/vanilla/Song.java b/src/org/kreed/vanilla/Song.java index 75670de4..6d579ddb 100644 --- a/src/org/kreed/vanilla/Song.java +++ b/src/org/kreed/vanilla/Song.java @@ -42,10 +42,15 @@ public class Song implements Comparable { * Indicates that this song was randomly selected from all songs. */ public static final int FLAG_RANDOM = 0x1; + /** + * If set, this song has no cover art. If not set, this song may or may not + * have cover art. + */ + public static final int FLAG_NO_COVER = 0x2; /** * The number of flags. */ - public static final int FLAG_COUNT = 1; + public static final int FLAG_COUNT = 2; public static final String[] EMPTY_PROJECTION = { MediaStore.Audio.Media._ID, @@ -130,16 +135,10 @@ public class Song implements Comparable { public int trackNumber; /** - * Song flags. Currently FLAG_RANDOM or 0. + * Song flags. Currently {@link #FLAG_RANDOM} or {@link FLAG_NO_COVER}. */ public int flags; - /** - * If true, this song has no cover art. If false, this song may or may not - * have cover art. - */ - public boolean noCover; - /** * Initialize the song with the specified id. Call populate to fill fields * in the song. @@ -213,7 +212,7 @@ public class Song implements Comparable { */ public Bitmap getCover(Context context) { - if (mDisableCoverArt || id == -1 || noCover) + if (mDisableCoverArt || id == -1 || (flags & FLAG_NO_COVER) != 0) return null; Bitmap cover = sCoverCache.get(id); @@ -240,7 +239,7 @@ public class Song implements Comparable { Log.d("VanillaMusic", "Failed to load cover art for " + path, e); } - noCover = true; + flags |= FLAG_NO_COVER; return null; }