Improved logging

master
M66B 2 weeks ago
parent ea35b7d6d9
commit 5212f58eb6

@ -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);
}
}

Loading…
Cancel
Save