summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/gallery
diff options
context:
space:
mode:
authorRay Chen <raychen@google.com>2009-10-05 14:34:24 -0700
committerRay Chen <raychen@google.com>2009-10-06 16:18:49 -0700
commit28f3595372cfbff1a2e5e83bf59d8dff76e14215 (patch)
tree489fecf77b4abcae6a9d75d6647bd5d96b2fa668 /src/com/android/camera/gallery
parent5569ee858ef994970191798f326c91f95b4f91cd (diff)
downloadLegacyCamera-28f3595372cfbff1a2e5e83bf59d8dff76e14215.zip
LegacyCamera-28f3595372cfbff1a2e5e83bf59d8dff76e14215.tar.gz
LegacyCamera-28f3595372cfbff1a2e5e83bf59d8dff76e14215.tar.bz2
Utilize group id to request & cancel thumbnail requests.
Diffstat (limited to 'src/com/android/camera/gallery')
-rw-r--r--src/com/android/camera/gallery/BaseImage.java4
-rw-r--r--src/com/android/camera/gallery/Image.java5
-rw-r--r--src/com/android/camera/gallery/VideoObject.java7
3 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/camera/gallery/BaseImage.java b/src/com/android/camera/gallery/BaseImage.java
index 6607b08..6e2f8f1 100644
--- a/src/com/android/camera/gallery/BaseImage.java
+++ b/src/com/android/camera/gallery/BaseImage.java
@@ -181,8 +181,8 @@ public abstract class BaseImage implements IImage {
Bitmap b = null;
try {
long id = mId;
- b = Images.Thumbnails.getThumbnail(mContentResolver, id,
- Images.Thumbnails.MICRO_KIND, null);
+ b = BitmapManager.instance().getThumbnail(mContentResolver, id,
+ Images.Thumbnails.MICRO_KIND, null, false);
} catch (Throwable ex) {
Log.e(TAG, "miniThumbBitmap got exception", ex);
return null;
diff --git a/src/com/android/camera/gallery/Image.java b/src/com/android/camera/gallery/Image.java
index 6190706..78ec382 100644
--- a/src/com/android/camera/gallery/Image.java
+++ b/src/com/android/camera/gallery/Image.java
@@ -16,6 +16,7 @@
package com.android.camera.gallery;
+import com.android.camera.BitmapManager;
import com.android.camera.Util;
import android.content.ContentResolver;
@@ -152,8 +153,8 @@ public class Image extends BaseImage implements IImage {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inDither = false;
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
- bitmap = Images.Thumbnails.getThumbnail(
- mContentResolver, mId, Images.Thumbnails.MINI_KIND, options);
+ bitmap = BitmapManager.instance().getThumbnail(mContentResolver, mId,
+ Images.Thumbnails.MINI_KIND, options, false);
if (bitmap != null && rotateAsNeeded) {
bitmap = Util.rotate(bitmap, getDegreesRotated());
diff --git a/src/com/android/camera/gallery/VideoObject.java b/src/com/android/camera/gallery/VideoObject.java
index 8e3b60e..589e42f 100644
--- a/src/com/android/camera/gallery/VideoObject.java
+++ b/src/com/android/camera/gallery/VideoObject.java
@@ -16,10 +16,13 @@
package com.android.camera.gallery;
+import com.android.camera.BitmapManager;
+
import android.content.ContentResolver;
import android.graphics.Bitmap;
import android.media.ThumbnailUtil;
import android.net.Uri;
+import android.provider.MediaStore.Images;
import android.provider.MediaStore.Video;
import android.util.Log;
@@ -110,8 +113,8 @@ public class VideoObject extends BaseImage implements IImage {
public Bitmap miniThumbBitmap() {
try {
long id = mId;
- return Video.Thumbnails.getThumbnail(mContentResolver, id,
- Video.Thumbnails.MICRO_KIND, null);
+ return BitmapManager.instance().getThumbnail(mContentResolver,
+ id, Images.Thumbnails.MICRO_KIND, null, true);
} catch (Throwable ex) {
Log.e(TAG, "miniThumbBitmap got exception", ex);
return null;