Exemplo n.º 1
0
 @NonNull
 public Drawable getDrawable() {
   Drawable drawable = MyImageCache.getAvatarDrawable(this, downloadFile.getFilePath());
   if (drawable == MyDrawableCache.BROKEN) {
     return getDefaultDrawable();
   } else if (drawable != null) {
     return drawable;
   }
   if (!downloadFile.exists()) {
     AvatarData.asyncRequestDownload(userId);
   }
   return getDefaultDrawable();
 }