[Issue 2097049] Updating the header of contact join screen - new icon and text

Change-Id: Ib780fba650dad0e070eabce497dde3ffa75661f5
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index 1c30ebb..aa6654d 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -160,6 +160,14 @@
      */
     public static final String EXTRA_AGGREGATE_ID =
             "com.android.contacts.action.AGGREGATE_ID";
+    /**
+     * Used with {@link #JOIN_AGGREGATE} to give it the name of the aggregation target.
+     * <p>
+     * Type: STRING
+     */
+    public static final String EXTRA_AGGREGATE_NAME =
+            "com.android.contacts.action.AGGREGATE_NAME";
+
 
     public static final String AUTHORITIES_FILTER_KEY = "authorities";
 
@@ -550,6 +558,15 @@
 
         if (mMode == MODE_JOIN_CONTACT) {
             setContentView(R.layout.contacts_list_content_join);
+            TextView blurbView = (TextView)findViewById(R.id.join_contact_blurb);
+            String contactName = intent.getStringExtra(EXTRA_AGGREGATE_NAME);
+            if (contactName == null) {
+                contactName = "";
+            }
+
+            String blurb = getString(R.string.blurbJoinContactDataWith, contactName);
+            blurbView.setText(blurb);
+
         } else {
             setContentView(R.layout.contacts_list_content);
         }
diff --git a/src/com/android/contacts/ViewContactActivity.java b/src/com/android/contacts/ViewContactActivity.java
index c27262d..8172423 100644
--- a/src/com/android/contacts/ViewContactActivity.java
+++ b/src/com/android/contacts/ViewContactActivity.java
@@ -763,8 +763,15 @@
      * Shows a list of aggregates that can be joined into the currently viewed aggregate.
      */
     public void showJoinAggregateActivity() {
+        String displayName = null;
+        if (mCursor.moveToFirst()) {
+            displayName = mCursor.getString(0);
+        }
         Intent intent = new Intent(ContactsListActivity.JOIN_AGGREGATE);
         intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_ID, ContentUris.parseId(mUri));
+        if (displayName != null) {
+            intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_NAME, displayName);
+        }
         startActivityForResult(intent, REQUEST_JOIN_CONTACT);
     }