From 9651e20b418a21768128e69d8b64ccab1b5b4967 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 22 Apr 2022 16:30:48 +0200 Subject: [PATCH] Improved debug info --- app/src/main/java/eu/faircode/email/Log.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 4541e79cef..7fc7645ce9 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -2127,6 +2127,15 @@ public class Log { messages += folder.messages; } + boolean unmetered = false; + try { + if (account.conditions != null) { + JSONObject jconditions = new JSONObject(account.conditions); + unmetered = jconditions.optBoolean("unmetered"); + } + } catch (Throwable ignored) { + } + size += write(os, account.name + (account.primary ? "*" : "") + " " + (account.protocol == EntityAccount.TYPE_IMAP ? "IMAP" : "POP") + "/" + account.auth_type + " " + account.host + ":" + account.port + "/" + account.encryption + @@ -2136,6 +2145,7 @@ public class Log { " ondemand=" + account.ondemand + " msgs=" + content + "/" + messages + " ops=" + db.operation().getOperationCount(account.id) + + " unmetered=" + unmetered + (unmetered ? " !!!" : "") + " " + account.state + (account.last_connected == null ? "" : " " + dtf.format(account.last_connected)) + (account.error == null ? "" : "\r\n" + account.error) +