From 8c073462965a09a0b0d34cb38868a2db5887629a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Fri, 25 Sep 2020 19:36:35 +0200 Subject: [PATCH] Fix fatal error loading unknown album cover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Óscar García Amor --- .../java/org/moire/ultrasonic/util/LegacyImageLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/util/LegacyImageLoader.java b/ultrasonic/src/main/java/org/moire/ultrasonic/util/LegacyImageLoader.java index ac6bd80d..ecc1ae94 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/util/LegacyImageLoader.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/util/LegacyImageLoader.java @@ -120,11 +120,11 @@ public class LegacyImageLoader implements Runnable, ImageLoader { } private void createLargeUnknownImage(Context context) { - BitmapDrawable drawable = (BitmapDrawable) context.getResources().getDrawable(R.drawable.unknown_album); + Drawable drawable = context.getResources().getDrawable(R.drawable.unknown_album); Log.i(TAG, "createLargeUnknownImage"); if (drawable != null) { - largeUnknownImage = Util.scaleBitmap(drawable.getBitmap(), imageSizeLarge); + largeUnknownImage = Util.createBitmapFromDrawable(drawable); } }