Merge "Fall back when failing to load size restricted icon" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-03-29 23:33:39 +00:00
committed by Android (Google) Code Review

View File

@@ -122,7 +122,10 @@ public class CachingIconView extends ImageView {
public Runnable setImageIconAsync(@Nullable final Icon icon) {
resetCache();
Drawable drawable = loadSizeRestrictedIcon(icon);
return () -> setImageDrawable(drawable);
if (drawable != null) {
return () -> setImageDrawable(drawable);
}
return super.setImageIconAsync(icon);
}
@Override