From 6abaa44a9e5a487c0c79d924fdf31952c0fa548f Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 15 May 2014 17:22:49 +0200 Subject: [PATCH] Fixed displaying contacts without display name Refs #1660 --- CHANGELOG.md | 2 ++ src/biz/bokhorst/xprivacy/ActivityApp.java | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) 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();