Avoid cache dir quota

This commit is contained in:
M66B
2022-05-01 08:48:20 +02:00
parent ca4de7b1ee
commit 270b520b9f
10 changed files with 20 additions and 20 deletions

View File

@@ -172,7 +172,7 @@ public class ContactInfo {
// Favicons
Log.i("Cleanup favicons");
File[] favicons = new File(context.getCacheDir(), "favicons").listFiles();
File[] favicons = new File(context.getFilesDir(), "favicons").listFiles();
if (favicons != null)
for (File file : favicons)
if (file.lastModified() + CACHE_FAVICON_DURATION < now) {
@@ -194,7 +194,7 @@ public class ContactInfo {
if (!files)
return;
final File dir = new File(context.getCacheDir(), "favicons");
final File dir = new File(context.getFilesDir(), "favicons");
executorFavicon.submit(new Runnable() {
@Override
public void run() {
@@ -322,7 +322,7 @@ public class ContactInfo {
final String domain = d.toLowerCase(Locale.ROOT);
final String email = info.email.toLowerCase(Locale.ROOT);
File dir = new File(context.getCacheDir(), "favicons");
File dir = new File(context.getFilesDir(), "favicons");
if (!dir.exists())
dir.mkdir();