Loading src/com/android/contacts/editor/TextFieldsEditorView.java +7 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.content.Context; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.provider.ContactsContract; import android.telephony.PhoneNumberUtils; import android.text.Editable; import android.text.InputType; import android.text.TextUtils; Loading Loading @@ -251,7 +253,11 @@ public class TextFieldsEditorView extends LabeledEditorView { // Read current value from state final String column = field.column; final String value = entry.getAsString(column); if (ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE.equals(kind.mimeType)) { fieldView.setText(PhoneNumberUtils.createTtsSpannable(value)); } else { fieldView.setText(value); } // Show the delete button if we have a non-null value setDeleteButtonVisible(value != null); Loading src/com/android/contacts/quickcontact/QuickContactActivity.java +7 −1 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import android.support.v7.widget.CardView; import android.telecom.PhoneAccount; import android.telecom.TelecomManager; import android.text.BidiFormatter; import android.text.Spannable; import android.text.SpannableString; import android.text.TextDirectionHeuristics; import android.text.TextUtils; Loading Loading @@ -1700,6 +1701,7 @@ public class QuickContactActivity extends ContactsActivity String text = null; Drawable textIcon = null; StringBuilder primaryContentDescription = new StringBuilder(); Spannable phoneContentDescription = null; Intent intent = null; boolean shouldApplyColor = true; Drawable alternateIcon = null; Loading Loading @@ -1845,6 +1847,8 @@ public class QuickContactActivity extends ContactsActivity } } primaryContentDescription.append(header); phoneContentDescription = com.android.contacts.common.util.ContactDisplayUtils .getTelephoneTtsSpannable(primaryContentDescription.toString(), header); icon = res.getDrawable(R.drawable.ic_phone_24dp); iconResourceId = R.drawable.ic_phone_24dp; if (PhoneCapabilityTester.isPhone(context)) { Loading Loading @@ -2076,7 +2080,9 @@ public class QuickContactActivity extends ContactsActivity -1 : (int) dataItem.getId(); return new Entry(dataId, icon, header, subHeader, subHeaderIcon, text, textIcon, new SpannableString(primaryContentDescription.toString()), phoneContentDescription == null ? new SpannableString(primaryContentDescription.toString()) : phoneContentDescription, intent, alternateIcon, alternateIntent, alternateContentDescription.toString(), shouldApplyColor, isEditable, entryContextMenuInfo, thirdIcon, thirdIntent, thirdContentDescription, thirdAction, Loading Loading
src/com/android/contacts/editor/TextFieldsEditorView.java +7 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.content.Context; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.provider.ContactsContract; import android.telephony.PhoneNumberUtils; import android.text.Editable; import android.text.InputType; import android.text.TextUtils; Loading Loading @@ -251,7 +253,11 @@ public class TextFieldsEditorView extends LabeledEditorView { // Read current value from state final String column = field.column; final String value = entry.getAsString(column); if (ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE.equals(kind.mimeType)) { fieldView.setText(PhoneNumberUtils.createTtsSpannable(value)); } else { fieldView.setText(value); } // Show the delete button if we have a non-null value setDeleteButtonVisible(value != null); Loading
src/com/android/contacts/quickcontact/QuickContactActivity.java +7 −1 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import android.support.v7.widget.CardView; import android.telecom.PhoneAccount; import android.telecom.TelecomManager; import android.text.BidiFormatter; import android.text.Spannable; import android.text.SpannableString; import android.text.TextDirectionHeuristics; import android.text.TextUtils; Loading Loading @@ -1700,6 +1701,7 @@ public class QuickContactActivity extends ContactsActivity String text = null; Drawable textIcon = null; StringBuilder primaryContentDescription = new StringBuilder(); Spannable phoneContentDescription = null; Intent intent = null; boolean shouldApplyColor = true; Drawable alternateIcon = null; Loading Loading @@ -1845,6 +1847,8 @@ public class QuickContactActivity extends ContactsActivity } } primaryContentDescription.append(header); phoneContentDescription = com.android.contacts.common.util.ContactDisplayUtils .getTelephoneTtsSpannable(primaryContentDescription.toString(), header); icon = res.getDrawable(R.drawable.ic_phone_24dp); iconResourceId = R.drawable.ic_phone_24dp; if (PhoneCapabilityTester.isPhone(context)) { Loading Loading @@ -2076,7 +2080,9 @@ public class QuickContactActivity extends ContactsActivity -1 : (int) dataItem.getId(); return new Entry(dataId, icon, header, subHeader, subHeaderIcon, text, textIcon, new SpannableString(primaryContentDescription.toString()), phoneContentDescription == null ? new SpannableString(primaryContentDescription.toString()) : phoneContentDescription, intent, alternateIcon, alternateIntent, alternateContentDescription.toString(), shouldApplyColor, isEditable, entryContextMenuInfo, thirdIcon, thirdIntent, thirdContentDescription, thirdAction, Loading