Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ public synchronized void setSizeMultiplier(float sizeMultiplier) {

@Override
public synchronized void put(Bitmap bitmap) {
if (bitmap == null) {
throw new NullPointerException("Bitmap must not be null");
}
if (bitmap.isRecycled()) {
throw new IllegalStateException("Cannot pool recycled bitmap");
if (bitmap == null || bitmap.isRecycled()) {
if (Log.isLoggable(TAG, Log.WARN)) {
Log.w(TAG, "Ignored recycled bitmap passed to pool");
}
return;
}
if (!bitmap.isMutable()
|| strategy.getSize(bitmap) > maxSize
Expand Down
Loading