Merge pull request #1335 from deltachat/fix-address-book

fix calling dc_add_address_book()
This commit is contained in:
bjoern
2020-05-04 01:07:27 +02:00
committed by GitHub
@@ -65,8 +65,15 @@ public class ContactAccessor {
List<String> mailList = new ArrayList<>();
Set<String> contactPhotoIdentifiers = new HashSet<>();
while (systemContactsCursor != null && systemContactsCursor.moveToNext()) {
String name = systemContactsCursor.getString(CONTACT_CURSOR_NAME);
name = name.replace("\r", ""); // remove characters later used as field separator
name = name.replace("\n", "");
String mail = systemContactsCursor.getString(CONTACT_CURSOR_MAIL);
mail = mail.replace("\r", ""); // remove characters later used as field separator
mail = mail.replace("\n", "");
String contactId = systemContactsCursor.getString(CONTACT_CURSOR_CONTACT_ID);
if (contactId != null) {
String identifier = name + mail;