slightly improve speed of media-database bitmap miss'es

This commit is contained in:
Adrian Ulrich 2016-02-13 16:04:51 +01:00
parent aee303fb62
commit b3ea41f46a

View File

@ -413,8 +413,9 @@ public class CoverCache {
if (inputStream == null && (CoverCache.mCoverLoadMode & CoverCache.COVER_MODE_ANDROID) != 0) {
Uri uri = Uri.parse("content://media/external/audio/media/" + song.id + "/albumart");
ContentResolver res = mContext.getContentResolver();
inputStream = res.openInputStream(uri);
sampleInputStream = res.openInputStream(uri);
if (sampleInputStream != null) // cache misses are VERY expensive here, so we check if the first open worked
inputStream = res.openInputStream(uri);
}
if (inputStream != null) {