diff --git a/picasso/src/main/java/com/squareup/picasso/Dispatcher.java b/picasso/src/main/java/com/squareup/picasso/Dispatcher.java index 7d02a52c99..77e5a4a649 100644 --- a/picasso/src/main/java/com/squareup/picasso/Dispatcher.java +++ b/picasso/src/main/java/com/squareup/picasso/Dispatcher.java @@ -161,6 +161,10 @@ void dispatchAirplaneModeChange(boolean airplaneMode) { } void performSubmit(Action action) { + performSubmit(action, true); + } + + void performSubmit(Action action, boolean dismissFailed) { if (pausedTags.contains(action.getTag())) { pausedActions.put(action.getTarget(), action); if (action.getPicasso().loggingEnabled) { @@ -186,7 +190,9 @@ void performSubmit(Action action) { hunter = forRequest(action.getPicasso(), this, cache, stats, action); hunter.future = service.submit(hunter); hunterMap.put(action.getKey(), hunter); - failedActions.remove(action.getTarget()); + if (dismissFailed) { + failedActions.remove(action.getTarget()); + } if (action.getPicasso().loggingEnabled) { log(OWNER_DISPATCHER, VERB_ENQUEUED, action.request.logId()); @@ -394,7 +400,7 @@ private void flushFailedActions() { if (action.getPicasso().loggingEnabled) { log(OWNER_DISPATCHER, VERB_REPLAYING, action.getRequest().logId()); } - performSubmit(action); + performSubmit(action, false); } } }