diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-09-23 15:45:39 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-09-23 15:45:39 -0700 |
commit | 3e2498d4fbea92b6371079bc9ce0c9ecdd1e3e85 (patch) | |
tree | d3c2007748076a25545d2c6d5ab454a65ca7e269 /src/github | |
parent | b3ac5676687e039351877cd977a790869f066709 (diff) | |
download | dsub-3e2498d4fbea92b6371079bc9ce0c9ecdd1e3e85.tar.gz dsub-3e2498d4fbea92b6371079bc9ce0c9ecdd1e3e85.tar.bz2 dsub-3e2498d4fbea92b6371079bc9ce0c9ecdd1e3e85.zip |
Pass in background task to getCoverArt/getAvatar for request cancellation
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/util/ImageLoader.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/util/ImageLoader.java b/src/github/daneren2005/dsub/util/ImageLoader.java index 1b91b778..ccdb3432 100644 --- a/src/github/daneren2005/dsub/util/ImageLoader.java +++ b/src/github/daneren2005/dsub/util/ImageLoader.java @@ -293,7 +293,7 @@ public class ImageLoader { protected Void doInBackground() throws Throwable { try { MusicService musicService = MusicServiceFactory.getMusicService(mContext); - Bitmap bitmap = musicService.getCoverArt(mContext, mEntry, mSize, null); + Bitmap bitmap = musicService.getCoverArt(mContext, mEntry, mSize, null, this); String key = getKey(mEntry.getCoverArt(), mSize); cache.put(key, bitmap); // Make sure key is the most recently "used" @@ -361,7 +361,7 @@ public class ImageLoader { protected Void doInBackground() throws Throwable { try { MusicService musicService = MusicServiceFactory.getMusicService(mContext); - Bitmap bitmap = musicService.getAvatar(mUsername, avatarSizeDefault, mContext, null); + Bitmap bitmap = musicService.getAvatar(mUsername, avatarSizeDefault, mContext, null, this); if(bitmap != null) { cache.put(mUsername, bitmap); // Make sure key is the most recently "used" |