- final String imageKey = String.valueOf(mFile.getRemoteId());
-
- // Check disk cache in background thread
- thumbnail = getBitmapFromDiskCache(imageKey);
-
- // Not found in disk cache
- if (thumbnail == null || mFile.needsUpdateThumbnail()) {
- // Use Width of imageView -> no blurry images on big screens
- int px = mImageViewReference.get().getWidth();
-
- if (mFile.isDown()){
- Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
- mFile.getStoragePath(), px, px);
-
- if (bitmap != null) {
- thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
-
- // Add thumbnail to cache
- addBitmapToCache(imageKey, thumbnail);
-