From aeeefedb43c40e887850654ac88270755f5631c1 Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Mon, 15 Jun 2009 18:35:38 -0700 Subject: [PATCH] Thumbnail cache file should be deleted when AttachmentProvider is created. Integrates CL 149651 from p4 Docomo email. Bug 1902523. --- src/com/android/email/provider/AttachmentProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/provider/AttachmentProvider.java b/src/com/android/email/provider/AttachmentProvider.java index dd6a4b756..ebbc64f2e 100644 --- a/src/com/android/email/provider/AttachmentProvider.java +++ b/src/com/android/email/provider/AttachmentProvider.java @@ -93,7 +93,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(); } }