diff options
author | Owen Lin <owenlin@google.com> | 2011-12-01 14:43:54 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2011-12-01 16:27:22 +0800 |
commit | 7fb19a9cef3a4ae0dbfa32ea4cb03d14e01cd2cf (patch) | |
tree | 28f480dbcb1e298bc30104f920f4fafe4d65c6d0 /gallerycommon/src/com/android/gallery3d/common/BlobCache.java | |
parent | b74708a8103bf95781727a49c05a4c8514ad274b (diff) | |
download | android_packages_apps_Snap-7fb19a9cef3a4ae0dbfa32ea4cb03d14e01cd2cf.tar.gz android_packages_apps_Snap-7fb19a9cef3a4ae0dbfa32ea4cb03d14e01cd2cf.tar.bz2 android_packages_apps_Snap-7fb19a9cef3a4ae0dbfa32ea4cb03d14e01cd2cf.zip |
Add close() to Download cache.
Change-Id: Idf0482e9f3cd2f667dca902ffea75bb0a0225d2d
fix: 5664497
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/common/BlobCache.java')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/common/BlobCache.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/BlobCache.java b/gallerycommon/src/com/android/gallery3d/common/BlobCache.java index 19a2e3090..7788e61f5 100644 --- a/gallerycommon/src/com/android/gallery3d/common/BlobCache.java +++ b/gallerycommon/src/com/android/gallery3d/common/BlobCache.java @@ -76,7 +76,7 @@ import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import java.util.zip.Adler32; -public class BlobCache { +public class BlobCache implements Closeable { private static final String TAG = "BlobCache"; private static final int MAGIC_INDEX_FILE = 0xB3273030; @@ -171,6 +171,7 @@ public class BlobCache { // Close the cache. All resources are released. No other method should be // called after this is called. + @Override public void close() { syncAll(); closeAll(); |