summaryrefslogtreecommitdiffstats
path: root/src/com/android/photos/shims
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/photos/shims')
-rw-r--r--src/com/android/photos/shims/BitmapJobDrawable.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/photos/shims/BitmapJobDrawable.java b/src/com/android/photos/shims/BitmapJobDrawable.java
index 6623b914f..299becb07 100644
--- a/src/com/android/photos/shims/BitmapJobDrawable.java
+++ b/src/com/android/photos/shims/BitmapJobDrawable.java
@@ -14,6 +14,7 @@ import com.android.gallery3d.ui.BitmapLoader;
import com.android.gallery3d.util.Future;
import com.android.gallery3d.util.FutureListener;
import com.android.gallery3d.util.ThreadPool;
+import com.android.photos.data.GalleryBitmapPool;
import com.android.photos.drawables.AutoThumbnailDrawable;
@@ -33,7 +34,10 @@ public class BitmapJobDrawable extends Drawable implements Runnable {
mLoader.cancelLoad();
}
mItem = item;
- mBitmap = null;
+ if (mBitmap != null) {
+ GalleryBitmapPool.getInstance().put(mBitmap);
+ mBitmap = null;
+ }
// TODO: Figure out why ThumbnailLoader doesn't like to be re-used
mLoader = new ThumbnailLoader(this);
mLoader.startLoad();