Populate contact name when adding shared contact.

Fixes #8016
This commit is contained in:
Greyson Parrelli 2018-08-02 15:16:51 -04:00
parent 5a1ef31b49
commit 6db3f249c6

View File

@ -143,6 +143,10 @@ public final class ContactUtil {
Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
if (!TextUtils.isEmpty(contact.getName().getDisplayName())) {
intent.putExtra(ContactsContract.Intents.Insert.NAME, contact.getName().getDisplayName());
}
if (!TextUtils.isEmpty(contact.getOrganization())) {
intent.putExtra(ContactsContract.Intents.Insert.COMPANY, contact.getOrganization());
}