projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of github.com:owncloud/android into setAsWallpaper
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
datamodel
/
ThumbnailsCacheManager.java
diff --git
a/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
b/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
index
ce8bfd4
..
f0ecf76
100644
(file)
--- a/
src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
+++ b/
src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
@@
-74,8
+74,8
@@
public class ThumbnailsCacheManager {
public static Bitmap mDefaultImg =
BitmapFactory.decodeResource(
public static Bitmap mDefaultImg =
BitmapFactory.decodeResource(
- MainApp.getAppContext().getResources(),
- DisplayUtils.getFileTypeIconId("image/png", "default.png")
+ MainApp.getAppContext().getResources(),
+ R.drawable.file_image
);
);
@@
-195,10
+195,6
@@
public class ThumbnailsCacheManager {
}
protected void onPostExecute(Bitmap bitmap){
}
protected void onPostExecute(Bitmap bitmap){
- if (isCancelled()) {
- bitmap = null;
- }
-
if (bitmap != null) {
final ImageView imageView = mImageViewReference.get();
final ThumbnailGenerationTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
if (bitmap != null) {
final ImageView imageView = mImageViewReference.get();
final ThumbnailGenerationTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
@@
-365,6
+361,7
@@
public class ThumbnailsCacheManager {
if (bitmapData == null || bitmapData != file) {
// Cancel previous task
bitmapWorkerTask.cancel(true);
if (bitmapData == null || bitmapData != file) {
// Cancel previous task
bitmapWorkerTask.cancel(true);
+ Log_OC.v(TAG, "Cancelled generation of thumbnail for a reused imageView");
} else {
// The same work is already in progress
return false;
} else {
// The same work is already in progress
return false;