aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRene Treffer <treffer@measite.de>2014-04-03 18:37:48 +0200
committerRene Treffer <treffer@measite.de>2014-04-03 18:37:48 +0200
commit7db21136a3221beccdddf6c94ecf1303a6be986a (patch)
treea5b4d5c00dbbe2bb8d55ab17de5d7d9c3edfd28d
parent9502ff25dd6c32c92d356baaaa1640fe26314595 (diff)
Add support for users with empty name
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/utils/UIHelper.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java
index a05d590d..f17e738c 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 };