Merge "Fix layout for read-only contacts"
diff --git a/res/drawable-sw580dp-hdpi/list_activated_holo.9.png b/res/drawable-sw580dp-hdpi/list_activated_holo.9.png
new file mode 100644
index 0000000..046b24a
--- /dev/null
+++ b/res/drawable-sw580dp-hdpi/list_activated_holo.9.png
Binary files differ
diff --git a/res/drawable-sw580dp-mdpi/list_activated_holo.9.png b/res/drawable-sw580dp-mdpi/list_activated_holo.9.png
new file mode 100644
index 0000000..1ff3373
--- /dev/null
+++ b/res/drawable-sw580dp-mdpi/list_activated_holo.9.png
Binary files differ
diff --git a/res/drawable-sw580dp-xhdpi/list_activated_holo.9.png b/res/drawable-sw580dp-xhdpi/list_activated_holo.9.png
new file mode 100644
index 0000000..2eb7c7e
--- /dev/null
+++ b/res/drawable-sw580dp-xhdpi/list_activated_holo.9.png
Binary files differ
diff --git a/res/layout/stream_item_row_image_and_text.xml b/res/layout/stream_item_row_image_and_text.xml
index c5699f4..0ee6357 100644
--- a/res/layout/stream_item_row_image_and_text.xml
+++ b/res/layout/stream_item_row_image_and_text.xml
@@ -19,12 +19,13 @@
     xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:layout_marginTop="@dimen/detail_update_section_between_items_padding"
     android:orientation="vertical">
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="8dip"
+        android:layout_marginBottom="@dimen/detail_update_section_between_items_padding"
         android:orientation="horizontal"
         android:weightSum="2">
 
@@ -33,7 +34,7 @@
             android:layout_width="0dip"
             android:layout_height="wrap_content"
             android:layout_weight="1"
-            android:layout_marginRight="@dimen/detail_update_section_between_items_horizontal_padding"
+            android:layout_marginRight="@dimen/detail_update_section_between_items_padding"
             ex:ratio="1"
             ex:direction="widthToHeight">
 
diff --git a/res/layout/stream_item_row_text_only.xml b/res/layout/stream_item_row_text_only.xml
index 919ee52..9d82edd 100644
--- a/res/layout/stream_item_row_text_only.xml
+++ b/res/layout/stream_item_row_text_only.xml
@@ -17,6 +17,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:layout_marginTop="@dimen/detail_update_section_between_items_padding"
     android:orientation="vertical">
 
     <TextView android:id="@+id/stream_item_html"
diff --git a/res/layout/stream_item_row_two_images.xml b/res/layout/stream_item_row_two_images.xml
index 3a524bf..7858f6f 100644
--- a/res/layout/stream_item_row_two_images.xml
+++ b/res/layout/stream_item_row_two_images.xml
@@ -18,13 +18,14 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:layout_marginTop="@dimen/detail_update_section_between_items_padding">
 
     <view
         class="com.android.contacts.widget.ProportionalLayout"
         android:layout_width="0dip"
         android:layout_height="wrap_content"
-        android:layout_marginRight="@dimen/detail_update_section_between_items_horizontal_padding"
+        android:layout_marginRight="@dimen/detail_update_section_between_items_padding"
         android:layout_weight="1"
         ex:ratio="1"
         ex:direction="widthToHeight">
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 13bb791..1c439d8 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -116,8 +116,8 @@
     <!-- Horizontal padding for individual stream items -->
     <dimen name="detail_update_section_item_horizontal_padding">8dip</dimen>
 
-    <!-- Horizontal padding between columns images and/or text in a single stream item -->
-    <dimen name="detail_update_section_between_items_horizontal_padding">16dip</dimen>
+    <!-- Padding between columns images and/or text in a single stream item -->
+    <dimen name="detail_update_section_between_items_padding">1dip</dimen>
 
     <!-- Horizontal padding between content sections within a stream item -->
     <dimen name="detail_update_section_internal_padding">16dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 43c4107..c22d1c6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1808,4 +1808,7 @@
     <!-- Toast shown when the app starts showing all contacts regardless of its current
          contact filter state. [CHAR LIMIT=64] -->
     <string name="toast_displaying_all_contacts">Displaying all contacts</string>
+
+    <!-- Message in the standard "no account" prompt that encourages the user to add a Google account before continuing to use the People app [CHAR LIMIT=NONE] -->
+    <string name="no_account_prompt">People works better with a Google Account.\n\n\u2022 Access from any web browser.\n\u2022 Back up your contacts securely.</string>
 </resources>
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