Fallback for picasso even if we think it's impossible.

Fixes AntennaPod/AntennaPod#891
This commit is contained in:
Tom Hennen 2015-06-18 18:29:58 -04:00
parent a44ad2564b
commit 3945fb2fd9
1 changed files with 8 additions and 0 deletions

View File

@ -162,6 +162,14 @@ public class PicassoProvider {
}
if (bitmap == null) {
// this should never, happen, but sometimes it does, so fallback
// check for fallback Uri
String fallbackParam = data.uri.getQueryParameter(PicassoImageResource.PARAM_FALLBACK);
if (fallbackParam != null) {
Uri fallback = Uri.parse(fallbackParam);
bitmap = decodeStreamFromFile(data, fallback);
}
Log.wtf(TAG, "THIS SHOULD NEVER EVER HAPPEN!!");
}
return new Result(bitmap, Picasso.LoadedFrom.DISK);