Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
BitmapDrawable with a null Bitmap is valid/legal
Browse files Browse the repository at this point in the history
Do not show an error log when this happens.
  • Loading branch information
koush committed Mar 5, 2015
1 parent 00bd0c4 commit a683859
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit a683859

Please sign in to comment.