Merge " Fix data update/delete URIs for profiles."
diff --git a/src/com/android/contacts/model/EntityDelta.java b/src/com/android/contacts/model/EntityDelta.java
index a045eb4..8244e9c 100644
--- a/src/com/android/contacts/model/EntityDelta.java
+++ b/src/com/android/contacts/model/EntityDelta.java
@@ -414,7 +414,14 @@
// Ignore children if parent was deleted
if (isContactDelete) continue;
- builder = child.buildDiff(Data.CONTENT_URI);
+ // Use the profile data URI if the contact is the profile.
+ if (mContactsQueryUri.equals(Profile.CONTENT_RAW_CONTACTS_URI)) {
+ builder = child.buildDiff(Uri.withAppendedPath(Profile.CONTENT_URI,
+ RawContacts.Data.CONTENT_DIRECTORY));
+ } else {
+ builder = child.buildDiff(Data.CONTENT_URI);
+ }
+
if (child.isInsert()) {
if (isContactInsert) {
// Parent is brand new insert, so back-reference _id