Merge "Fix contact name issue"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index aeade3a..abbb514 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -9166,6 +9166,9 @@
}
</string>
+ <!-- [CHAR LIMIT=50] Zen mode settings: placeholder for a Contact name when the name is empty -->
+ <string name="zen_mode_starred_contacts_empty_name">(No name)</string>
+
<!-- [CHAR LIMIT=40] Zen mode settings: Messages option -->
<string name="zen_mode_messages">Messages</string>
<!-- [CHAR LIMIT=40] Zen mode settings: Messages option -->
diff --git a/src/com/android/settings/notification/zen/ZenModeBackend.java b/src/com/android/settings/notification/zen/ZenModeBackend.java
index 1d41bb9..e3f5063 100644
--- a/src/com/android/settings/notification/zen/ZenModeBackend.java
+++ b/src/com/android/settings/notification/zen/ZenModeBackend.java
@@ -447,9 +447,9 @@
if (cursor != null && cursor.moveToFirst()) {
do {
String contact = cursor.getString(0);
- if (contact != null) {
- starredContacts.add(contact);
- }
+ starredContacts.add(contact != null ? contact :
+ mContext.getString(R.string.zen_mode_starred_contacts_empty_name));
+
} while (cursor.moveToNext());
}
return starredContacts;