|
|
@ -268,6 +268,7 @@ public class ContactInfo {
|
|
|
|
if (cacheOnly)
|
|
|
|
if (cacheOnly)
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean cached = false;
|
|
|
|
ContactInfo info = new ContactInfo();
|
|
|
|
ContactInfo info = new ContactInfo();
|
|
|
|
info.email = address.getAddress();
|
|
|
|
info.email = address.getAddress();
|
|
|
|
|
|
|
|
|
|
|
@ -394,6 +395,7 @@ public class ContactInfo {
|
|
|
|
info.type = (data.length > 0 ? data[0] : "unknown");
|
|
|
|
info.type = (data.length > 0 ? data[0] : "unknown");
|
|
|
|
info.verified = (data.length > 1 && "verified".equals(data[1]));
|
|
|
|
info.verified = (data.length > 1 && "verified".equals(data[1]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cached = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
final int scaleToPixels = Helper.dp2pixels(context, FAVICON_ICON_SIZE);
|
|
|
|
final int scaleToPixels = Helper.dp2pixels(context, FAVICON_ICON_SIZE);
|
|
|
@ -563,6 +565,7 @@ public class ContactInfo {
|
|
|
|
files[0].setLastModified(new Date().getTime());
|
|
|
|
files[0].setLastModified(new Date().getTime());
|
|
|
|
info.bitmap = BitmapFactory.decodeFile(files[0].getAbsolutePath());
|
|
|
|
info.bitmap = BitmapFactory.decodeFile(files[0].getAbsolutePath());
|
|
|
|
info.type = Helper.getExtension(files[0].getName());
|
|
|
|
info.type = Helper.getExtension(files[0].getName());
|
|
|
|
|
|
|
|
cached = true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
int dp = Helper.dp2pixels(context, GENERATED_ICON_SIZE);
|
|
|
|
int dp = Helper.dp2pixels(context, GENERATED_ICON_SIZE);
|
|
|
|
if (identicons) {
|
|
|
|
if (identicons) {
|
|
|
@ -606,10 +609,13 @@ public class ContactInfo {
|
|
|
|
int abc = info.bitmap.getAllocationByteCount();
|
|
|
|
int abc = info.bitmap.getAllocationByteCount();
|
|
|
|
if (abc > 1024 * 1024) {
|
|
|
|
if (abc > 1024 * 1024) {
|
|
|
|
String msg = "Avatar type=" + info.type +
|
|
|
|
String msg = "Avatar type=" + info.type +
|
|
|
|
|
|
|
|
" domain=" + UriHelper.getEmailDomain(info.email) +
|
|
|
|
" size=" + abc + "/" + info.bitmap.getByteCount() +
|
|
|
|
" 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);
|
|
|
|
Log.e(msg);
|
|
|
|
EntityLog.log(context, EntityLog.Type.Debug5, msg + " email=" + info.email);
|
|
|
|
EntityLog.log(context, EntityLog.Type.Debug5, msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|