diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index 70182929f5..be7a40e27e 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -170,9 +170,9 @@ public class ContactInfo { boolean identicons = prefs.getBoolean("identicons", false); if (identicons) { identicon = true; - info.bitmap = Identicon.icon(key, dp, 5, dark); + info.bitmap = IconHelper.generateIdenticon(key, dp, 5, dark); } else - info.bitmap = Identicon.letter(key, dp, dark); + info.bitmap = IconHelper.generateLetterIcon(key, dp, dark); } } diff --git a/app/src/main/java/eu/faircode/email/Identicon.java b/app/src/main/java/eu/faircode/email/IconHelper.java similarity index 94% rename from app/src/main/java/eu/faircode/email/Identicon.java rename to app/src/main/java/eu/faircode/email/IconHelper.java index d18db9cc0c..da53d6fc26 100644 --- a/app/src/main/java/eu/faircode/email/Identicon.java +++ b/app/src/main/java/eu/faircode/email/IconHelper.java @@ -32,10 +32,10 @@ import androidx.core.graphics.ColorUtils; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; -class Identicon { +class IconHelper { private static final float MIN_LUMINANCE = 0.33f; - static Bitmap icon(@NonNull String email, int size, int pixels, boolean dark) { + static Bitmap generateIdenticon(@NonNull String email, int size, int pixels, boolean dark) { byte[] hash = getHash(email); int color = Color.argb(255, hash[0], hash[1], hash[2]); @@ -63,7 +63,7 @@ class Identicon { return bitmap; } - static Bitmap letter(@NonNull String email, int size, boolean dark) { + static Bitmap generateLetterIcon(@NonNull String email, int size, boolean dark) { String text = null; for (int i = 0; i < email.length(); i++) { char kar = email.charAt(i);