thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
byte[] bytes = get.getResponseBody();
- String type = "";
- if (mIsThumbnail){
- type = "Thumbnail";
- } else {
- type = "Resized image";
- }
- Log_OC.d("Thumbnail",
- type + " size of " + file.getRemotePath()
- + ": " + bytes.length);
-
- // bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
-
if (mIsThumbnail) {
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
} else {
}
private Bitmap doFileInBackground(Boolean mIsThumbnail) {
- Bitmap thumbnail = null;
File file = (File)mFile;
- final String imageKey = String.valueOf(file.hashCode());
+ // distinguish between thumbnail and resized image
+ String temp = String.valueOf(file.hashCode());
+ if (mIsThumbnail){
+ temp = "t" + temp;
+ } else {
+ temp = "r" + temp;
+ }
+
+ final String imageKey = temp;
// Check disk cache in background thread
- thumbnail = getBitmapFromDiskCache(imageKey);
+ Bitmap thumbnail = getBitmapFromDiskCache(imageKey);
// Not found in disk cache
if (thumbnail == null) {
if (file.isImage() && file.getRemoteId() != null){\r
// Thumbnail in Cache?\r
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(\r
- String.valueOf(file.getRemoteId())\r
- );\r
+ "t" + String.valueOf(file.getRemoteId()));\r
if (thumbnail != null && !file.needsUpdateThumbnail()){\r
fileIcon.setImageBitmap(thumbnail);\r
} else {\r