Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5b686e7 authored by Tingting Wang's avatar Tingting Wang
Browse files

Show phonetic name next to display name in UI.

In Quick contact UI, show phonetic name following its display name
if phonetic name exists.

BUG 22235947

Change-Id: I0066d2811b207bb36480f1d3c14712573b92a1a0
parent f87a924b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
    <!-- Initial height of transparent space above QuickContacts -->
    <dimen name="quickcontact_starting_empty_height">150dp</dimen>
    <!-- Initial size of QuickContact's title size -->
    <dimen name="quickcontact_maximum_title_size">36dp</dimen>
    <dimen name="quickcontact_maximum_title_size">30dp</dimen>
    <!-- When QC is uncollapsed, the title has this much margin on its left, right and bottom -->
    <dimen name="quickcontact_title_initial_margin">16dp</dimen>
    <!-- The ratio of width:height for the contact's photo in landscape -->
+3 −0
Original line number Diff line number Diff line
@@ -767,4 +767,7 @@

    <!-- Content description for the compact contact editor photo overlay which, when clicked, shows a dialog with the options for changing the contact photo. [CHAR LIMIT=30] -->
    <string name="compact_editor_change_photo_content_description">Change photo</string>

    <!-- Quick contact display name with phonetic name -->
    <string name="quick_contact_display_name_with_phonetic"><xliff:g id="display_name">%s</xliff:g> (<xliff:g id="phonetic_name">%s</xliff:g>)</string>
</resources>
+10 −1
Original line number Diff line number Diff line
@@ -940,7 +940,16 @@ public class QuickContactActivity extends ContactsActivity {
        mPhotoView.setIsBusiness(mContactData.isDisplayNameFromOrganization());
        mPhotoSetter.setupContactPhoto(data, mPhotoView);
        extractAndApplyTintFromPhotoViewAsynchronously();
        setHeaderNameText(ContactDisplayUtils.getDisplayName(this, data).toString());
        String phoneticName = ContactDisplayUtils.getPhoneticName(this, data);
        String displayName = ContactDisplayUtils.getDisplayName(this, data).toString();
        if (mContactData.getDisplayNameSource() != DisplayNameSources.STRUCTURED_PHONETIC_NAME
                && !TextUtils.isEmpty(phoneticName)) {
            displayName = getResources().getString(
                    R.string.quick_contact_display_name_with_phonetic, displayName, phoneticName);
            setHeaderNameText(displayName);
        } else {
            setHeaderNameText(displayName);
        }

        Trace.endSection();