From c419a3ebde0d3d00441f0aa5784ed5af9f58d829 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 19 Jun 2024 18:54:32 +0200 Subject: [PATCH] Improved logging --- .../main/java/eu/faircode/email/ContactInfo.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index 6177a58484..096532bc06 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -602,11 +602,14 @@ public class ContactInfo { Log.e(ex); } - if (BuildConfig.DEBUG && - info.bitmap != null && - info.bitmap.getAllocationByteCount() > 1024 * 1024) - EntityLog.log(context, EntityLog.Type.Debug5, "Avatar " + info.email + - " " + info.type + "=" + Helper.humanReadableByteCount(info.bitmap.getAllocationByteCount())); + if (info.bitmap != null) { + int abc = info.bitmap.getAllocationByteCount(); + if (abc > 1024 * 1024) { + Log.e("Avatar type=" + info.type + " size=" + abc); + EntityLog.log(context, EntityLog.Type.Debug5, + "Avatar email=" + info.email + " type=" + info.type + " size=" + abc); + } + } synchronized (emailContactInfo) { emailContactInfo.put(key, info);