am aeeefedb: Thumbnail cache file should be deleted when AttachmentProvider is created.

Merge commit 'aeeefedb43c40e887850654ac88270755f5631c1'

* commit 'aeeefedb43c40e887850654ac88270755f5631c1':
  Thumbnail cache file should be deleted when AttachmentProvider is created.
This commit is contained in:
Mihai Preda 2009-06-16 16:43:07 -07:00 committed by The Android Open Source Project
commit 94386cce2a
1 changed files with 2 additions and 1 deletions

View File

@ -87,7 +87,8 @@ public class AttachmentProvider extends ContentProvider {
*/
File[] files = getContext().getCacheDir().listFiles();
for (File file : files) {
if (file.getName().endsWith(".tmp")) {
String filename = file.getName();
if (filename.endsWith(".tmp") || filename.startsWith("thmb_")) {
file.delete();
}
}