Skip to content

Commit e3e97a1

Browse files
authored
Merge pull request #905 from vrih/fix/avatar-error
Don't log error if avatar isn't available
2 parents 2173bb4 + 1997f6f commit e3e97a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: app/src/main/java/github/daneren2005/dsub/util/ImageLoader.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ private class AvatarTask extends SilentBackgroundTask<Void> {
640640
private final ImageView mView;
641641
private Drawable mDrawable;
642642

643-
public AvatarTask(Context context, ImageView view, String username) {
643+
private AvatarTask(Context context, ImageView view, String username) {
644644
super(context);
645645
mContext = context;
646646
mView = view;
@@ -659,8 +659,10 @@ protected Void doInBackground() throws Throwable {
659659

660660
mDrawable = Util.createDrawableFromBitmap(mContext, bitmap);
661661
}
662+
} catch (java.io.FileNotFoundException x) {
663+
Log.i(TAG, "Avatar not available for download.");
662664
} catch (Throwable x) {
663-
Log.e(TAG, "Failed to download album art.", x);
665+
Log.e(TAG, "Failed to download avatar.", x);
664666
}
665667

666668
return null;

0 commit comments

Comments
 (0)