From c389a9d3cee06ab47e59faad35cd4d2c800a6b84 Mon Sep 17 00:00:00 2001 From: Mateo Hernandez Date: Fri, 14 Apr 2017 23:20:46 -0500 Subject: [PATCH] Support non-BMP chars (e.g. emojis) in avatars Closes #6527 Fixes #6522 // FREEBIE --- .../securesms/contacts/avatars/GeneratedContactPhoto.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/contacts/avatars/GeneratedContactPhoto.java b/src/org/thoughtcrime/securesms/contacts/avatars/GeneratedContactPhoto.java index 5c8a311eef..d002495464 100644 --- a/src/org/thoughtcrime/securesms/contacts/avatars/GeneratedContactPhoto.java +++ b/src/org/thoughtcrime/securesms/contacts/avatars/GeneratedContactPhoto.java @@ -42,7 +42,7 @@ public class GeneratedContactPhoto implements ContactPhoto { if (cleanedName.isEmpty()) { return "#"; } else { - return String.valueOf(cleanedName.charAt(0)); + return new StringBuilder().appendCodePoint(cleanedName.codePointAt(0)).toString(); } }