Skip to content

Instantly share code, notes, and snippets.

@adrian-bl
Created August 15, 2015 14:46
Show Gist options
  • Save adrian-bl/eab1c40cf1bd6188b9bd to your computer and use it in GitHub Desktop.
Save adrian-bl/eab1c40cf1bd6188b9bd to your computer and use it in GitHub Desktop.
diff --git a/src/ch/blinkenlights/android/vanilla/CoverView.java b/src/ch/blinkenlights/android/vanilla/CoverView.java
index 3da9875..33bdb27 100644
--- a/src/ch/blinkenlights/android/vanilla/CoverView.java
+++ b/src/ch/blinkenlights/android/vanilla/CoverView.java
@@ -365,16 +365,14 @@ public final class CoverView extends View implements Handler.Callback {
Context context = getContext();
Bitmap cover = song == null ? null : song.getCover(context);
- if (cover == null && style == CoverBitmap.STYLE_NO_INFO) {
- Bitmap def = mDefaultCover;
- if (def == null) {
- mDefaultCover = def = CoverBitmap.generateDefaultCover(context, getWidth(), getHeight());
+ if (cover == null && style != CoverBitmap.STYLE_OVERLAPPING_BOX) {
+ if (mDefaultCover == null) {
+ mDefaultCover = CoverBitmap.generateDefaultCover(context, getWidth(), getHeight());
}
- mBitmaps[i] = def;
- } else {
- mBitmaps[i] = CoverBitmap.createBitmap(context, style, cover, song, getWidth(), getHeight());
+ cover = mDefaultCover;
}
+ mBitmaps[i] = CoverBitmap.createBitmap(context, style, cover, song, getWidth(), getHeight());
postInvalidate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment