diff options
author | George Mount <mount@google.com> | 2012-10-11 09:51:32 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-10-11 10:05:08 -0700 |
commit | c33eee56b585929499dd34435f07257db4f5c245 (patch) | |
tree | 65682cfc67ef7bb87212585f36ad69fcb828b19c /src/com/android/gallery3d | |
parent | 38701573fefe46f7a5af8cdf2c6c7002ef2bcaa5 (diff) | |
download | android_packages_apps_Snap-c33eee56b585929499dd34435f07257db4f5c245.tar.gz android_packages_apps_Snap-c33eee56b585929499dd34435f07257db4f5c245.tar.bz2 android_packages_apps_Snap-c33eee56b585929499dd34435f07257db4f5c245.zip |
Clear cached stitching preview thumbnails.
Bug 7328408
Change-Id: Ifbc469dc9eef95025cd8e828a0df80e76d2ff064
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/data/ImageCacheService.java | 12 |
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); } |