diff --git a/CHANGELOG.md b/CHANGELOG.md index 290f4e60c..3add0d882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ Changelog **Next release** +* Fixed displaying contacts without display name ([issue](/../../issues/1660)) + [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) **Version 2.0.22 STABLE** diff --git a/src/biz/bokhorst/xprivacy/ActivityApp.java b/src/biz/bokhorst/xprivacy/ActivityApp.java index 50bb886b2..4080a5eae 100644 --- a/src/biz/bokhorst/xprivacy/ActivityApp.java +++ b/src/biz/bokhorst/xprivacy/ActivityApp.java @@ -779,9 +779,8 @@ protected Object doInBackground(Object... params) { while (cursor.moveToNext()) { long id = cursor.getLong(cursor.getColumnIndex(ContactsContract.Contacts._ID)); String contact = cursor.getString(cursor.getColumnIndex(Phone.DISPLAY_NAME)); - if (contact == null) - contact = "-"; - mapContact.put(id, contact); + if (contact != null) + mapContact.put(id, contact); } } finally { cursor.close();