Get join suggestions for the compact editor name field

Also fix photo height in portrait -- made a mistake in
ag/641233.

Bug 19124091

Change-Id: I988cbcf457002bc6f0996c87a8611fca82bdf78a
diff --git a/src/com/android/contacts/editor/CompactRawContactsEditorView.java b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
index 44cf698..48e655b 100644
--- a/src/com/android/contacts/editor/CompactRawContactsEditorView.java
+++ b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
@@ -70,6 +70,7 @@
 
     private AccountTypeManager mAccountTypeManager;
     private LayoutInflater mLayoutInflater;
+
     private ViewIdGenerator mViewIdGenerator;
     private MaterialColorMapUtils.MaterialPalette mMaterialPalette;
 
@@ -82,7 +83,6 @@
     private ViewGroup mOther;
     private View mMoreFields;
 
-    // TODO: remove this after we handle account selection for photos
     private long mPhotoRawContactId;
 
     public CompactRawContactsEditorView(Context context) {
@@ -171,11 +171,25 @@
     /**
      * Get the raw contact ID for the CompactHeaderView photo.
      */
-    // TODO: remove me once we support multiple accounts
     public long getPhotoRawContactId() {
         return mPhotoRawContactId;
     }
 
+    public StructuredNameEditorView getStructuredNameEditorView() {
+        // We only ever show one StructuredName
+        return mNames.getChildCount() == 0
+                ? null : (StructuredNameEditorView) mNames.getChildAt(0);
+    }
+
+    public View getAggregationAnchorView() {
+        // Since there is only one structured name we can just return it as the anchor for
+        // the aggregation suggestions popup
+        if (mNames.getChildCount() == 0) {
+            return null;
+        }
+        return mNames.getChildAt(0).findViewById(R.id.anchor_view);
+    }
+
     public void setState(RawContactDeltaList rawContactDeltas,
             MaterialColorMapUtils.MaterialPalette materialPalette,
             ViewIdGenerator viewIdGenerator) {