summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-10-11 10:35:46 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-11 10:35:46 -0700
commit055128707a91e963483fb7bc6fcf51864141c393 (patch)
tree233151a40c558896b1232134255e92a5939bc5bc /src
parentb5cff603db486ee2bf48d92a8aba4593629a6243 (diff)
parent37a9333651cead185d982d9b809cb3425a24d3d8 (diff)
downloadandroid_packages_apps_Gallery2-055128707a91e963483fb7bc6fcf51864141c393.tar.gz
android_packages_apps_Gallery2-055128707a91e963483fb7bc6fcf51864141c393.tar.bz2
android_packages_apps_Gallery2-055128707a91e963483fb7bc6fcf51864141c393.zip
am 37a93336: Merge "Clear cached stitching preview thumbnails." into gb-ub-photos-arches
* commit '37a9333651cead185d982d9b809cb3425a24d3d8': Clear cached stitching preview thumbnails.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/data/ImageCacheService.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/data/ImageCacheService.java b/src/com/android/gallery3d/data/ImageCacheService.java
index 38e32cbee..d42e9521d 100644
--- a/src/com/android/gallery3d/data/ImageCacheService.java
+++ b/src/com/android/gallery3d/data/ImageCacheService.java
@@ -91,6 +91,18 @@ public class ImageCacheService {
}
}
+ public void clearImageData(Path path, int type) {
+ byte[] key = makeKey(path, type);
+ long cacheKey = Utils.crc64Long(key);
+ synchronized (mCache) {
+ try {
+ mCache.clearEntry(cacheKey);
+ } catch (IOException ex) {
+ // ignore.
+ }
+ }
+ }
+
private static byte[] makeKey(Path path, int type) {
return GalleryUtils.getBytes(path.toString() + "+" + type);
}