Skip to content

Commit

Permalink
Set outConfig to null when re-using BitmapFactory.Options.
Browse files Browse the repository at this point in the history
Fixes #3757

PiperOrigin-RevId: 258864591
  • Loading branch information
sjudd authored and glide-copybara-robot committed Jul 18, 2019
1 parent 8258d3c commit 61a8a6d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,9 @@ private static void resetOptions(BitmapFactory.Options decodeBitmapOptions) {
decodeBitmapOptions.inJustDecodeBounds = false;
decodeBitmapOptions.inDensity = 0;
decodeBitmapOptions.inTargetDensity = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
decodeBitmapOptions.outConfig = null;
}
decodeBitmapOptions.outWidth = 0;
decodeBitmapOptions.outHeight = 0;
decodeBitmapOptions.outMimeType = null;
Expand Down

0 comments on commit 61a8a6d

Please sign in to comment.