@Test public void clearsCallbackOnCancel() throws Exception { Picasso picasso = mock(Picasso.class); ImageView target = mockImageViewTarget(); Callback callback = mockCallback(); ImageViewAction request = new ImageViewAction(picasso, target, null, 0, 0, 0, null, URI_KEY_1, null, callback, false); request.cancel(); assertThat(request.callback).isNull(); }
@Override void cancel() { super.cancel(); if (callback != null) { callback = null; } }
ImageViewAction extends Action<ImageView> { @Override void cancel() { super.cancel(); if (callback != null) { callback = null; } } }
ImageViewAction extends Action<ImageView> { @Override void cancel() { super.cancel(); if (callback != null) { callback = null; } } ImageViewAction(Picasso picasso, ImageView imageView, Request data, int memoryPolicy,
      int networkPolicy, int errorResId, Drawable errorDrawable, String key, Object tag,
      Callback callback, boolean noFade); }
ImageViewAction extends Action<ImageView> { @Override void cancel() { super.cancel(); if (callback != null) { callback = null; } } ImageViewAction(Picasso picasso, ImageView imageView, Request data, int memoryPolicy,
      int networkPolicy, int errorResId, Drawable errorDrawable, String key, Object tag,
      Callback callback, boolean noFade); @Override void complete(Bitmap result, Picasso.LoadedFrom from); @Override void error(Exception e); }
ImageViewAction extends Action<ImageView> { @Override void cancel() { super.cancel(); if (callback != null) { callback = null; } } ImageViewAction(Picasso picasso, ImageView imageView, Request data, int memoryPolicy,
      int networkPolicy, int errorResId, Drawable errorDrawable, String key, Object tag,
      Callback callback, boolean noFade); @Override void complete(Bitmap result, Picasso.LoadedFrom from); @Override void error(Exception e);  }