diff --git a/src/com/android/contacts/common/util/ContactDisplayUtils.java b/src/com/android/contacts/common/util/ContactDisplayUtils.java
index ca5fdbd..934ba25 100644
--- a/src/com/android/contacts/common/util/ContactDisplayUtils.java
+++ b/src/com/android/contacts/common/util/ContactDisplayUtils.java
@@ -18,6 +18,8 @@
 
 import static android.provider.ContactsContract.CommonDataKinds.Phone;
 
+import com.google.common.base.Preconditions;
+
 import android.content.Context;
 import android.telephony.PhoneNumberUtils;
 import android.text.Spannable;
@@ -31,8 +33,6 @@
 import com.android.contacts.common.preference.ContactsPreferences;
 import com.android.contacts.common.testing.NeededForTesting;
 
-import com.google.common.base.Preconditions;
-
 /**
  * Methods for handling various contact data labels.
  */
@@ -237,26 +237,44 @@
      *          {@link ContactsPreferences#DISPLAY_ORDER_ALTERNATIVE}
      * @return namePrimary or nameAlternative depending on the value of displayOrderPreference
      */
-    @NeededForTesting // TODO Temporary until used in source
-    public static String getPreferredName(String namePrimary, String nameAlternative,
+    public static String getPreferredDisplayName(String namePrimary, String nameAlternative,
             int displayOrderPreference) {
-        if (TextUtils.isEmpty(nameAlternative)) {
-            Log.d(TAG, "nameAlternative was empty - defaulting to primary");
-            return namePrimary;
-        }
-
-        if (displayOrderPreference != ContactsPreferences.DISPLAY_ORDER_PRIMARY
-                && displayOrderPreference != ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE) {
-            Log.d(TAG, "Attempted to get preferredName with invalid preference "
-                    + "- defaulting to primary");
-            return namePrimary;
-        }
-
-
         if (displayOrderPreference == ContactsPreferences.DISPLAY_ORDER_PRIMARY) {
             return namePrimary;
         }
 
-        return nameAlternative;
+        if (displayOrderPreference == ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE &&
+                !TextUtils.isEmpty(nameAlternative)) {
+            return nameAlternative;
+        }
+
+        return namePrimary;
+    }
+
+    /**
+     * Returns either namePrimary or nameAlternative based on the value of sortOrderPreference
+     *
+     * In the event that nameAlternative is empty or sortOrderPreference is neither
+     * {@link ContactsPreferences#SORT_ORDER_PRIMARY} nor
+     * {@link ContactsPreferences#SORT_ORDER_ALTERNATIVE}, namePrimary is returned
+     *
+     * @param namePrimary the primary name
+     * @param nameAlternative the alternative name
+     * @param sortOrderPreference one of {@link ContactsPreferences#SORT_ORDER_PRIMARY} or
+     *          {@link ContactsPreferences#SORT_ORDER_ALTERNATIVE}
+     * @return namePrimary or nameAlternative depending on the value of displayOrderPreference
+     */
+    public static String getPreferredSortName(String namePrimary, String nameAlternative,
+            int sortOrderPreference) {
+        if (sortOrderPreference == ContactsPreferences.SORT_ORDER_PRIMARY) {
+            return namePrimary;
+        }
+
+        if (sortOrderPreference == ContactsPreferences.SORT_ORDER_ALTERNATIVE &&
+                !TextUtils.isEmpty(nameAlternative)) {
+            return nameAlternative;
+        }
+
+        return namePrimary;
     }
 }
diff --git a/tests/src/com/android/contacts/common/util/ContactDisplayUtilTests.java b/tests/src/com/android/contacts/common/util/ContactDisplayUtilTests.java
index 3871b7c..a8e3038 100644
--- a/tests/src/com/android/contacts/common/util/ContactDisplayUtilTests.java
+++ b/tests/src/com/android/contacts/common/util/ContactDisplayUtilTests.java
@@ -96,23 +96,43 @@
         assertEquals(R.string.sms_home, ContactDisplayUtils.getSmsLabelResourceId(Phone.TYPE_HOME));
     }
 
-    public void testGetPreferredNameEmptyAlternative() {
-        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredName(NAME_PRIMARY, "",
-                ContactsPreferences.DISPLAY_ORDER_PRIMARY));
+    public void testGetPreferredDisplayNameEmptyAlternative() {
+        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredDisplayName(NAME_PRIMARY, "",
+                ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE));
     }
 
-    public void testGetPreferredInvalidPreference() {
-        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredName(NAME_PRIMARY,
+    public void testGetPreferredDisplayNameInvalidPreference() {
+        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredDisplayName(NAME_PRIMARY,
                 NAME_ALTERNATIVE, -1));
     }
 
-    public void testGetPreferredNamePrimary() {
-        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredName(NAME_PRIMARY,
+    public void testGetPreferredDisplayNamePrimary() {
+        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredDisplayName(NAME_PRIMARY,
                 NAME_ALTERNATIVE, ContactsPreferences.DISPLAY_ORDER_PRIMARY));
     }
 
-    public void testGetPreferredNameAlternative() {
-        assertEquals(NAME_ALTERNATIVE, ContactDisplayUtils.getPreferredName(NAME_PRIMARY,
+    public void testGetPreferredDisplayNameAlternative() {
+        assertEquals(NAME_ALTERNATIVE, ContactDisplayUtils.getPreferredDisplayName(NAME_PRIMARY,
                 NAME_ALTERNATIVE, ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE));
     }
+
+    public void testGetPreferredSortNameEmptyAlternative() {
+        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredSortName(NAME_PRIMARY, "",
+                ContactsPreferences.SORT_ORDER_ALTERNATIVE));
+    }
+
+    public void testGetPreferredSortNameInvalidPreference() {
+        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredSortName(NAME_PRIMARY,
+                NAME_ALTERNATIVE, -1));
+    }
+
+    public void testGetPreferredSortNamePrimary() {
+        assertEquals(NAME_PRIMARY, ContactDisplayUtils.getPreferredSortName(NAME_PRIMARY,
+                NAME_ALTERNATIVE, ContactsPreferences.SORT_ORDER_PRIMARY));
+    }
+
+    public void testGetPreferredSortNameAlternative() {
+        assertEquals(NAME_ALTERNATIVE, ContactDisplayUtils.getPreferredSortName(NAME_PRIMARY,
+                NAME_ALTERNATIVE, ContactsPreferences.SORT_ORDER_ALTERNATIVE));
+    }
 }
