protected void onPostExecute(Object[] params) { ImageRequestCallback callback = (ImageRequestCallback) params[1]; if (params[0] == null) { callback.onResult(null); return; } callback.onResult((Bitmap) params[0]); }
public void cancel() { if (!isCancelled()) { // Here we do not want to force the task to be interrupted. Indeed, // it may be useful to keep the result in a cache for a further use mFuture.cancel(false); if (mCallback != null) { mCallback.onImageRequestCancelled(this); } } }