From 7db21136a3221beccdddf6c94ecf1303a6be986a Mon Sep 17 00:00:00 2001 From: Rene Treffer Date: Thu, 3 Apr 2014 18:37:48 +0200 Subject: [PATCH] Add support for users with empty name --- src/eu/siacs/conversations/utils/UIHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index a05d590db..f17e738c3 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -66,7 +66,7 @@ public class UIHelper { } private static Bitmap getUnknownContactPicture(String name, int size) { - String firstLetter = name.substring(0, 1).toUpperCase(Locale.US); + String firstLetter = (name.length() > 0) ? name.substring(0, 1).toUpperCase(Locale.US) : " "; int holoColors[] = { 0xFF1da9da, 0xFFb368d9, 0xFF83b600, 0xFFffa713, 0xFFe92727 };