Source:
<code>private Response<CacheableBitmapDrawable> doParse(NetworkResponse response) { response.isImage = true; byte[] data = response.data; BitmapFactory.Options decodeOptions = new BitmapFactory.Options(); decodeOptions.inPreferredConfig = mDecodeConfig; Bitmap bitmap; decodeOptions.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); int actualWidth = decodeOptions.outWidth; int actualHeight = decodeOptions.outHeight; int sampleSize = 1; if (mMaxWidth > 0 || mMaxHeight > 0) { int desiredWidth = getResizedDimension(mMaxWidth, mMaxHeight, actualWidth, actualHeight); int desiredHeight = getResizedDimension(mMaxHeight, mMaxWidth, actualHeight, actualWidth); sampleSize = findBestSampleSize(actualWidth, actualHeight, desiredWidth, desiredHeight); } decodeOptions.inSampleSize = sampleSize; decodeOptions.inJustDecodeBounds = false; decodeOptions.inMutable = true; Bitmap inBitmap = mCache.getOldestUnused(getCacheKey(), actualWidth / sampleSize, actualHeight / sampleSize, decodeOptions.inPreferredConfig, sampleSize); if (inBitmap != null) { decodeOptions.inBitmap = inBitmap; } try { bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); } catch (IllegalArgumentException e) { decodeOptions.inBitmap = null; <START> bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); <END> } if (bitmap == null) { return Response.error(new ParseError(response)); } else { return Response.success(new CacheableBitmapDrawable(mContext.getResources(), bitmap), HttpHeaderParser.parseCacheHeaders(response)); } }</code><technical_language>Is main change adding try/catch? (it's hard actual diffs Github here)</technical_language>

Target:
private Response<CacheableBitmapDrawable> doParse(NetworkResponse response) { response.isImage = true; byte[] data = response.data; BitmapFactory.Options decodeOptions = new BitmapFactory.Options(); decodeOptions.inPreferredConfig = mDecodeConfig; Bitmap bitmap; decodeOptions.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); int actualWidth = decodeOptions.outWidth; int actualHeight = decodeOptions.outHeight; int sampleSize = 1; if (mMaxWidth > 0 && mMaxHeight > 0) { int desiredWidth = getResizedDimension(mMaxWidth, mMaxHeight, actualWidth, actualHeight); int desiredHeight = getResizedDimension(mMaxHeight, mMaxWidth, actualHeight, actualWidth); sampleSize = findBestSampleSize(actualWidth, actualHeight, desiredWidth, desiredHeight); } decodeOptions.inSampleSize = sampleSize; decodeOptions.inJustDecodeBounds = false; decodeOptions.inMutable = true; Bitmap inBitmap = mCache.getOldestUnused(getCacheKey(), actualWidth / sampleSize, actualHeight / sampleSize, decodeOptions.inPreferredConfig, sampleSize); if (inBitmap != null) { decodeOptions.inBitmap = inBitmap; } try { bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); } catch (IllegalArgumentException e) { decodeOptions.inBitmap = null; bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions); } if (bitmap == null) { return Response.error(new ParseError(response)); } else { return Response.success(new CacheableBitmapDrawable(mContext.getResources(), bitmap), HttpHeaderParser.parseCacheHeaders(response)); } }