Commit f530e00f authored by Alexander Martinz's avatar Alexander Martinz Committed by Michael Bestas

MusicUtils: handle exceptions and clean up

Change-Id: Iab3d71742ef16ac056ea6904b9c0a2454847b53b
Signed-off-by: default avatarAlexander Martinz <amartinz@shiftphones.com>
parent 15f97bbb
......@@ -323,17 +323,14 @@ public class HomeActivity extends SlidingPanelActivity implements
MusicUtils.removeFromCache(this, mKey);
final Uri selectedImage = data.getData();
new Thread(new Runnable() {
@Override
public void run() {
Bitmap bitmap = ImageFetcher.decodeSampledBitmapFromUri(getContentResolver(),
selectedImage);
new Thread(() -> {
Bitmap bitmap = ImageFetcher.decodeSampledBitmapFromUri(getContentResolver(),
selectedImage);
ImageFetcher imageFetcher = ElevenUtils.getImageFetcher(HomeActivity.this);
imageFetcher.addBitmapToCache(mKey, bitmap);
ImageFetcher imageFetcher = ElevenUtils.getImageFetcher(HomeActivity.this);
imageFetcher.addBitmapToCache(mKey, bitmap);
MusicUtils.refresh();
}
MusicUtils.refresh();
}).start();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment