Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,9 @@ private void onNewResultInternal(
isFinished ? Event.ON_DATASOURCE_RESULT : Event.ON_DATASOURCE_RESULT_INT);
// create drawable
Drawable drawable;
INFO info;
try {
info = getImageInfo(image);
drawable = createDrawable(image);
} catch (Exception exception) {
logMessageAndImage("drawable_failed @ onNewResult", image);
Expand All @@ -665,11 +667,11 @@ private void onNewResultInternal(
logMessageAndImage("set_final_result @ onNewResult", image);
mDataSource = null;
getSettableDraweeHierarchy().setImage(drawable, 1f, wasImmediate);
reportSuccess(id, image, dataSource);
reportSuccess(id, info, dataSource);
} else if (deliverTempResult) {
logMessageAndImage("set_temporary_result @ onNewResult", image);
getSettableDraweeHierarchy().setImage(drawable, 1f, wasImmediate);
reportSuccess(id, image, dataSource);
reportSuccess(id, info, dataSource);
// IMPORTANT: do not execute any instance-specific code after this point
} else {
logMessageAndImage("set_intermediate_result @ onNewResult", image);
Expand Down Expand Up @@ -846,8 +848,7 @@ private void reportIntermediateFailure(Throwable throwable) {
getControllerListener2().onIntermediateImageFailed(mId);
}

private void reportSuccess(String id, @Nullable T image, @Nullable DataSource<T> dataSource) {
INFO info = getImageInfo(image);
private void reportSuccess(String id, @Nullable INFO info, @Nullable DataSource<T> dataSource) {
getControllerListener().onFinalImageSet(id, info, getAnimatable());
getControllerListener2().onFinalImageSet(id, info, obtainExtras(dataSource, info, null));
}
Expand Down