mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 00:25:10 -04:00
K-9 wasn't properly clearing the thumbnail/tmpfile cache. We now
properly clear it up on start, which causes K-9 to leak less flash memory AND fixes the "Wrong thumbnail" bug.
This commit is contained in:
parent
f7032c4161
commit
a75bf8668e
@ -65,18 +65,7 @@ public class AttachmentProvider extends ContentProvider
|
||||
@Override
|
||||
public boolean onCreate()
|
||||
{
|
||||
/*
|
||||
* We use the cache dir as a temporary directory (since Android doesn't give us one) so
|
||||
* on startup we'll clean up any .tmp files from the last run.
|
||||
*/
|
||||
File[] files = getContext().getCacheDir().listFiles();
|
||||
for (File file : files)
|
||||
{
|
||||
if (file.getName().endsWith(".tmp"))
|
||||
{
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
clear(getContext());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user