+ private WeakReference<ProgressBar> mProgressWheelRef;
+ private static Account mAccount;
+ private Object mFile;
+ private Boolean mIsThumbnail;
+ private FileDataStorageManager mStorageManager;
+
+ public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager,
+ Account account) {
+ // Use a WeakReference to ensure the ImageView can be garbage collected
+ mImageViewReference = new WeakReference<ImageView>(imageView);
+ if (storageManager == null)
+ throw new IllegalArgumentException("storageManager must not be NULL");
+ mStorageManager = storageManager;
+ mAccount = account;
+ }
+
+ public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager,
+ Account account, ProgressBar progressWheel) {
+ this(imageView, storageManager, account);
+ mProgressWheelRef = new WeakReference<ProgressBar>(progressWheel);
+ }
+
+ public ThumbnailGenerationTask(ImageView imageView) {
+ // Use a WeakReference to ensure the ImageView can be garbage collected