|
@@ -410,12 +410,23 @@ public final class ThumbnailsCacheManager {
|
|
|
private String mImageKey;
|
|
|
private FileDataStorageManager mStorageManager;
|
|
|
private GetMethod getMethod;
|
|
|
+ private boolean roundedCorners = false;
|
|
|
|
|
|
public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager, Account account)
|
|
|
throws IllegalArgumentException {
|
|
|
this(imageView, storageManager, account, null);
|
|
|
}
|
|
|
|
|
|
+ public ThumbnailGenerationTask(ImageView imageView,
|
|
|
+ FileDataStorageManager storageManager,
|
|
|
+ Account account,
|
|
|
+ List<ThumbnailGenerationTask> asyncTasks,
|
|
|
+ boolean roundedCorners)
|
|
|
+ throws IllegalArgumentException {
|
|
|
+ this(imageView, storageManager, account, asyncTasks);
|
|
|
+ this.roundedCorners = roundedCorners;
|
|
|
+ }
|
|
|
+
|
|
|
public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager,
|
|
|
Account account, List<ThumbnailGenerationTask> asyncTasks)
|
|
|
throws IllegalArgumentException {
|
|
@@ -508,12 +519,16 @@ public final class ThumbnailsCacheManager {
|
|
|
tagId = String.valueOf(((TrashbinFile) mFile).getRemoteId());
|
|
|
}
|
|
|
if (String.valueOf(imageView.getTag()).equals(tagId)) {
|
|
|
- Resources resources = MainApp.getAppContext().getResources();
|
|
|
+ if (roundedCorners) {
|
|
|
+ Resources resources = MainApp.getAppContext().getResources();
|
|
|
|
|
|
- BitmapUtils.setRoundedBitmap(resources,
|
|
|
- bitmap,
|
|
|
- resources.getDimension(R.dimen.file_icon_rounded_corner_radius),
|
|
|
- imageView);
|
|
|
+ BitmapUtils.setRoundedBitmap(resources,
|
|
|
+ bitmap,
|
|
|
+ resources.getDimension(R.dimen.file_icon_rounded_corner_radius),
|
|
|
+ imageView);
|
|
|
+ } else {
|
|
|
+ imageView.setImageBitmap(bitmap);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|