UpdateContactTool
Edits an existing contact (the aggregated contact_id from search_contacts / read_contact) in one ContactsContract batch: renames it, and adds or removes a phone number or email. Requires WRITE_CONTACTS and READ_CONTACTS.
namereplaces the display name on every raw contact; the provider re-derives the given / family name parts from it. A contact with no name row yet (e.g. saved with only a number) gets one on its first raw contact.add_phone/add_emailgo onto the contact's first raw contact, labelled byphone_type(default mobile) /email_type(default home), validated likecreate_contact.remove_phonedeletes every number with the same digits (formatting is ignored);remove_emaildeletes every matching address (case-insensitive). Removing something the contact doesn't have is an error, so a typo isn't silently ignored.
Contacts synced from a read-only account may reject the batch; the provider's error is returned. Output: contact_id, updated (the changes applied, e.g. "name", "add_phone"), and phones_removed / emails_removed counts.