Merge "Fix contact name issue"

This commit is contained in:
Julia Reynolds
2020-11-12 15:24:58 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 3 deletions

View File

@@ -9166,6 +9166,9 @@
} }
</string> </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 --> <!-- [CHAR LIMIT=40] Zen mode settings: Messages option -->
<string name="zen_mode_messages">Messages</string> <string name="zen_mode_messages">Messages</string>
<!-- [CHAR LIMIT=40] Zen mode settings: Messages option --> <!-- [CHAR LIMIT=40] Zen mode settings: Messages option -->

View File

@@ -447,9 +447,9 @@ public class ZenModeBackend {
if (cursor != null && cursor.moveToFirst()) { if (cursor != null && cursor.moveToFirst()) {
do { do {
String contact = cursor.getString(0); String contact = cursor.getString(0);
if (contact != null) { starredContacts.add(contact != null ? contact :
starredContacts.add(contact); mContext.getString(R.string.zen_mode_starred_contacts_empty_name));
}
} while (cursor.moveToNext()); } while (cursor.moveToNext());
} }
return starredContacts; return starredContacts;