From a683859b5998dd9d673b40cf2608c251c2997362 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 4 Mar 2015 18:33:16 -1000 Subject: [PATCH] BitmapDrawable with a null Bitmap is valid/legal Do not show an error log when this happens. --- .../java/com/makeramen/roundedimageview/RoundedDrawable.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roundedimageview/src/main/java/com/makeramen/roundedimageview/RoundedDrawable.java b/roundedimageview/src/main/java/com/makeramen/roundedimageview/RoundedDrawable.java index 2d359ed..7a3395c 100644 --- a/roundedimageview/src/main/java/com/makeramen/roundedimageview/RoundedDrawable.java +++ b/roundedimageview/src/main/java/com/makeramen/roundedimageview/RoundedDrawable.java @@ -110,8 +110,6 @@ public static Drawable fromDrawable(Drawable drawable) { Bitmap bm = drawableToBitmap(drawable); if (bm != null) { return new RoundedDrawable(bm); - } else { - Log.w(TAG, "Failed to create bitmap from drawable!"); } } return drawable; @@ -132,6 +130,7 @@ public static Bitmap drawableToBitmap(Drawable drawable) { drawable.draw(canvas); } catch (Exception e) { e.printStackTrace(); + Log.w(TAG, "Failed to create bitmap from drawable!"); bitmap = null; }