summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-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);
}