-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid passing null configs to Bitmap.createBitmap in LruBitmapPool.
We already handle null configs for our various strategies because some types of Bitmaps (GIFs mostly) on some API levels will have special native configs that have a null Java equivalent. As a result, LruBitmapPool does not throw as long as there is a matching Bitmap in the pool even if the config we’re asked for is null. This change fixes the inconsistent behavior where we would throw if the pool happened to not have a matching Bitmap when the given config is null. Now we universally handle null configs in get() and getDirty().
- Loading branch information
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters