Adds phonetic name to the about card
Bug: 16467163
Change-Id: Ibd989eb1aba58b7991b477839151e4e961fdb8c0
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 45b49c6..5eb1fd5 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -816,6 +816,26 @@
Trace.endSection();
Trace.beginSection("bind about card");
+ // Phonetic name is not a data item, so the entry needs to be created separately
+ final String phoneticName = mContactData.getPhoneticName();
+ if (!TextUtils.isEmpty(phoneticName)) {
+ Entry phoneticEntry = new Entry(/* viewId = */ -1,
+ /* icon = */ null,
+ getResources().getString(R.string.name_phonetic),
+ phoneticName,
+ /* text = */ null,
+ /* intent = */ null,
+ /* alternateIcon = */ null,
+ /* alternateIntent = */ null,
+ /* alternateContentDescription = */ null,
+ /* shouldApplyColor = */ false,
+ /* isEditable = */ false
+ );
+ List<Entry> phoneticList = new ArrayList<>();
+ phoneticList.add(phoneticEntry);
+ aboutCardEntries.add(0, phoneticList);
+ }
+
mAboutCard.initialize(aboutCardEntries,
/* numInitialVisibleEntries = */ 1,
/* isExpanded = */ true,