Loading src/com/android/contacts/model/dataitem/DataItem.java +11 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,17 @@ public class DataItem { return actionBody == null ? null : actionBody.toString(); } /** * This builds the data string(intended for display) depending on the type of data item. It * returns the same value as {@link #buildDataString} by default, but certain data items can * override it to provide their version of formatted data strings. * * @return Data string representing the data item, possibly formatted for display */ public String buildDataStringForDisplay() { return buildDataString(); } public String getKindString() { final DataKind kind = getDataKind(); return (kind.titleRes == -1 || kind.titleRes == 0) ? "" Loading src/com/android/contacts/model/dataitem/PhoneDataItem.java +13 −0 Original line number Diff line number Diff line Loading @@ -70,4 +70,17 @@ public class PhoneDataItem extends DataItem { } } /** * Returns the formatted phone number (if already computed using {@link * #computeFormattedPhoneNumber}). Otherwise this method returns the unformatted phone number. */ @Override public String buildDataStringForDisplay() { final String formatted = getFormattedPhoneNumber(); if (formatted != null) { return formatted; } else { return getNumber(); } } } src/com/android/contacts/quickcontact/DataAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ public class DataAction implements Action { } mIsPrimary = item.isSuperPrimary(); mBody = item.buildDataString(); mBody = item.buildDataStringForDisplay(); mDataId = item.getId(); mDataUri = ContentUris.withAppendedId(Data.CONTENT_URI, mDataId); Loading src/com/android/contacts/quickcontact/QuickContactActivity.java +4 −1 Original line number Diff line number Diff line Loading @@ -546,7 +546,10 @@ public class QuickContactActivity extends Activity { if (mLookupUri == null) { Log.wtf(TAG, "Lookup uri wasn't initialized. Loader was started too early"); } return new ContactLoader(getApplicationContext(), mLookupUri, false); return new ContactLoader(getApplicationContext(), mLookupUri, false /*loadGroupMetaData*/, false /*loadStreamItems*/, false /*loadInvitableAccountTypes*/, false /*postViewNotification*/, true /*computeFormattedPhoneNumber*/); } }; Loading Loading
src/com/android/contacts/model/dataitem/DataItem.java +11 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,17 @@ public class DataItem { return actionBody == null ? null : actionBody.toString(); } /** * This builds the data string(intended for display) depending on the type of data item. It * returns the same value as {@link #buildDataString} by default, but certain data items can * override it to provide their version of formatted data strings. * * @return Data string representing the data item, possibly formatted for display */ public String buildDataStringForDisplay() { return buildDataString(); } public String getKindString() { final DataKind kind = getDataKind(); return (kind.titleRes == -1 || kind.titleRes == 0) ? "" Loading
src/com/android/contacts/model/dataitem/PhoneDataItem.java +13 −0 Original line number Diff line number Diff line Loading @@ -70,4 +70,17 @@ public class PhoneDataItem extends DataItem { } } /** * Returns the formatted phone number (if already computed using {@link * #computeFormattedPhoneNumber}). Otherwise this method returns the unformatted phone number. */ @Override public String buildDataStringForDisplay() { final String formatted = getFormattedPhoneNumber(); if (formatted != null) { return formatted; } else { return getNumber(); } } }
src/com/android/contacts/quickcontact/DataAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ public class DataAction implements Action { } mIsPrimary = item.isSuperPrimary(); mBody = item.buildDataString(); mBody = item.buildDataStringForDisplay(); mDataId = item.getId(); mDataUri = ContentUris.withAppendedId(Data.CONTENT_URI, mDataId); Loading
src/com/android/contacts/quickcontact/QuickContactActivity.java +4 −1 Original line number Diff line number Diff line Loading @@ -546,7 +546,10 @@ public class QuickContactActivity extends Activity { if (mLookupUri == null) { Log.wtf(TAG, "Lookup uri wasn't initialized. Loader was started too early"); } return new ContactLoader(getApplicationContext(), mLookupUri, false); return new ContactLoader(getApplicationContext(), mLookupUri, false /*loadGroupMetaData*/, false /*loadStreamItems*/, false /*loadInvitableAccountTypes*/, false /*postViewNotification*/, true /*computeFormattedPhoneNumber*/); } }; Loading