You cannot insert photos into the call log itself; those are stored in the Contact that is linked to the call log entry. See ContactsContract.Data for more information about how to do that.
As far as the HTC device not updating the call log with an existing photo, it could be tied to the way that HTC Sense caches call log entries; I have seen similar issues that only appear on Sense devices.
Call log entries are typically stored in the calls
table in the Contacts app database (/data/data/com.android.providers.contacts/databases/contacts2.db
). For some reason, it appears that HTC Sense does not update existing call log entries if contact data changes, but other ROMs do.
For example, if I use an HTC EVO LTE with stock Sense 5.0 to place a call to someone I have saved as "Jenny Smith", an entry is created in the calls
table, which includes a name
field -- where it stores Jenny Smith. If I update her contact information to "Jenny Jones" and place a new call to her, a new entry is stored in the calls
table with the name Jenny Jones, but the previous entry is not changed. The actual Call History screen shows all of the calls as Jenny Jones, but the database itself has old name.
Other devices I have tested (including an Nexus 5) update previous entries in the calls
table when the Call Log is viewed. Your Motorola device likely behaves like the Nexus 5, refreshing the data as needed.
I am not a database wizard, but have a reasonable amount of familiarity with them. From a database structure perspective, it seems odd to me that any contact-specific information is stored in that calls
table (it contains a raw_contacts_id
field that is linked to the same field in the contacts
table of that database where all of the actual contact information is stored), but that's how it is implemented.