Fixed two FCs. (1. bitmap recycled 2. ArrayList OOB)

This commit is contained in:
Karim Abou Zeid 2015-05-21 14:50:04 +02:00
commit fe3657707b
4 changed files with 16 additions and 10 deletions

View file

@ -69,7 +69,8 @@ public class MusicPlayerWidget extends AppWidgetProvider {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
if (currentAlbumArtUri.equals(imageUri))
setAlbumArt(context, loadedImage);
// copy() prevents the original bitmap in the memory cache from being recycled by the remote views
setAlbumArt(context, loadedImage.copy(loadedImage.getConfig(), true));
}
@Override