From 5212f58eb6662d4993cf7f19fcdf548cc1b26b1c Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 20 Jun 2024 12:23:53 +0200 Subject: [PATCH] Improved logging --- app/src/main/java/eu/faircode/email/ContactInfo.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index 34131669eb..23293b0aaa 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -268,6 +268,7 @@ public class ContactInfo { if (cacheOnly) return null; + boolean cached = false; ContactInfo info = new ContactInfo(); info.email = address.getAddress(); @@ -394,6 +395,7 @@ public class ContactInfo { info.type = (data.length > 0 ? data[0] : "unknown"); info.verified = (data.length > 1 && "verified".equals(data[1])); } + cached = true; } } else { final int scaleToPixels = Helper.dp2pixels(context, FAVICON_ICON_SIZE); @@ -563,6 +565,7 @@ public class ContactInfo { files[0].setLastModified(new Date().getTime()); info.bitmap = BitmapFactory.decodeFile(files[0].getAbsolutePath()); info.type = Helper.getExtension(files[0].getName()); + cached = true; } else { int dp = Helper.dp2pixels(context, GENERATED_ICON_SIZE); if (identicons) { @@ -606,10 +609,13 @@ public class ContactInfo { int abc = info.bitmap.getAllocationByteCount(); if (abc > 1024 * 1024) { String msg = "Avatar type=" + info.type + + " domain=" + UriHelper.getEmailDomain(info.email) + " size=" + abc + "/" + info.bitmap.getByteCount() + - " " + info.bitmap.getWidth() + "x" + info.bitmap.getHeight() + " " + info.bitmap.getConfig(); + " " + info.bitmap.getWidth() + "x" + info.bitmap.getHeight() + " " + info.bitmap.getConfig() + + " play=" + BuildConfig.PLAY_STORE_RELEASE + + " cached=" + cached; Log.e(msg); - EntityLog.log(context, EntityLog.Type.Debug5, msg + " email=" + info.email); + EntityLog.log(context, EntityLog.Type.Debug5, msg); } }