Exemple #1
0
 /**
  * Used to fetch for the album art via Last.fm.
  *
  * @param context The {@link Context} to use.
  * @param album The name of the album in the profile the user is viewing.
  */
 public void fetchAlbumPhoto(final Activity context, final String album) {
   if (!TextUtils.isEmpty(album)) {
     mFetcher.removeFromCache(album + Config.ALBUM_ART_SUFFIX);
     mFetcher.loadAlbumImage(MusicUtils.getAlbumArtist(context, album), album, -1, mAlbumArt);
   } else {
     setDefault(context);
   }
 }
 /** @param album The key used to find the cached album to remove */
 public void removeFromCache(final Album album) {
   if (mImageFetcher != null) {
     mImageFetcher.removeFromCache(
         ImageFetcher.generateAlbumCacheKey(album.mAlbumName, album.mArtistName));
   }
 }