Removed Gravatar support for Play store version

This commit is contained in:
M66B
2021-06-23 14:19:21 +02:00
parent 85e991dacd
commit 74f605bb4e
4 changed files with 18 additions and 2 deletions

View File

@@ -287,7 +287,7 @@ public class ContactInfo {
}
// Gravatar
if (info.bitmap == null && gravatars) {
if (info.bitmap == null && gravatars && !BuildConfig.PLAY_STORE_RELEASE) {
if (!TextUtils.isEmpty(info.email)) {
String gkey = info.email.toLowerCase(Locale.ROOT);
boolean lookup;
@@ -300,7 +300,7 @@ public class ContactInfo {
HttpURLConnection urlConnection = null;
try {
String hash = Helper.md5(gkey.getBytes());
URL url = new URL("https://www.gravatar.com/avatar/" + hash + "?d=404");
URL url = new URL(BuildConfig.GRAVATAR_URI + hash + "?d=404");
Log.i("Gravatar key=" + gkey + " url=" + url);
urlConnection = (HttpURLConnection) url.openConnection();