From f7dba8df6f56a7dfdf96580f8383c76eade11593 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 24 Oct 2020 19:21:43 +0200 Subject: [PATCH] Cleanup pma files --- .../main/java/eu/faircode/email/WorkerCleanup.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/WorkerCleanup.java b/app/src/main/java/eu/faircode/email/WorkerCleanup.java index bbd5045201..c263e30479 100644 --- a/app/src/main/java/eu/faircode/email/WorkerCleanup.java +++ b/app/src/main/java/eu/faircode/email/WorkerCleanup.java @@ -167,6 +167,18 @@ public class WorkerCleanup extends Worker { } } } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + Log.i("Checking for pma files"); + File pma = new File(context.getDataDir(), "app_webview/BrowserMetrics"); + File[] files = pma.listFiles(); + if (files != null) + for (File file : files) + if (file.getName().endsWith(".pma")) { + Log.i("Deleting " + file); + file.delete(); + } + } } long now = new Date().getTime();