Source:
<code>public ImageContainer get(String requestUrl, ImageListener imageListener, int maxWidth, int maxHeight, boolean doubleRespond) { final String cacheKey = getCacheKey(requestUrl, maxWidth, maxHeight); CacheableBitmapDrawable cachedBitmap = mCache.getDrawable(cacheKey); if (cachedBitmap != null) { ImageContainer container = new ImageContainer(cachedBitmap, requestUrl, null, null); imageListener.onResponse(container, true); return container; } else { CacheableBitmapDrawable zeroSizeCached = mCache.getDrawable(getCacheKey(requestUrl, 0, 0)); if (zeroSizeCached != null) { ImageContainer container = new ImageContainer(cachedBitmap, requestUrl, null, null); imageListener.onResponse(container, true); } else if (doubleRespond) { ImageContainer imageContainer = new ImageContainer(null, requestUrl, cacheKey, imageListener); imageListener.onResponse(imageContainer, true); } } ImageContainer imageContainer = <START> new ImageContainer(null, requestUrl, cacheKey, imageListener); <END> BatchedImageRequest request = mInFlightRequests.get(cacheKey); if (request != null) { request.addContainer(imageContainer); return imageContainer; } Request<?> newRequest = new ImageRequest(mContext, requestUrl, mCache, new Listener<CacheableBitmapDrawable>() { @Override public void onResponse(CacheableBitmapDrawable response) { onGetImageSuccess(cacheKey, response); } }, maxWidth, maxHeight, Config.RGB_565, new ErrorListener() { @Override public void onErrorResponse(VolleyError error) { onGetImageError(cacheKey, error); } }); mRequestQueue.add(newRequest); mInFlightRequests.put(cacheKey, new BatchedImageRequest(newRequest, imageContainer)); return imageContainer; }</code><technical_language>need this imageContainer anymore, do we</technical_language>

Target:
public ImageContainer get(String requestUrl, ImageListener imageListener, int maxWidth, int maxHeight, boolean doubleRespond) { final String cacheKey = getCacheKey(requestUrl, maxWidth, maxHeight); CacheableBitmapDrawable cachedBitmap = mCache.getDrawable(cacheKey); if (cachedBitmap != null) { ImageContainer container = new ImageContainer(cachedBitmap, requestUrl, null, null); imageListener.onResponse(container, true); return container; } else if (maxHeight > 0 && maxWidth > 0) { cachedBitmap = mCache.getDrawable(getCacheKey(requestUrl, 0, 0)); if (cachedBitmap != null) { ImageContainer container = new ImageContainer(cachedBitmap, requestUrl, null, null); imageListener.onResponse(container, true); } } if (doubleRespond && cachedBitmap == null) { ImageContainer imageContainer = new ImageContainer(null, requestUrl, cacheKey, imageListener); imageListener.onResponse(imageContainer, true); } ImageContainer imageContainer = new ImageContainer(null, requestUrl, cacheKey, imageListener); BatchedImageRequest request = mInFlightRequests.get(cacheKey); if (request != null) { request.addContainer(imageContainer); return imageContainer; } Request<?> newRequest = new ImageRequest(mContext, requestUrl, mCache, new Listener<CacheableBitmapDrawable>() { @Override public void onResponse(CacheableBitmapDrawable response) { onGetImageSuccess(cacheKey, response); } }, maxWidth, maxHeight, Config.RGB_565, new ErrorListener() { @Override public void onErrorResponse(VolleyError error) { onGetImageError(cacheKey, error); } }); mRequestQueue.add(newRequest); mInFlightRequests.put(cacheKey, new BatchedImageRequest(newRequest, imageContainer)); return imageContainer; }