Added source label name to account name hsection.
Internal Bug: 2154925
diff --git a/src/com/android/contacts/ViewContactActivity.java b/src/com/android/contacts/ViewContactActivity.java
index a0f7061..c27262d 100644
--- a/src/com/android/contacts/ViewContactActivity.java
+++ b/src/com/android/contacts/ViewContactActivity.java
@@ -947,8 +947,11 @@
continue;
}
+ final ContactsSource source = sources.getInflatedSource(accountType,
+ ContactsSource.LEVEL_SUMMARY);
final String accountName = entValues.getAsString(RawContacts.ACCOUNT_NAME);
- mAccountName.setText(getString(R.string.account_name_format, accountName));
+ mAccountName.setText(getString(R.string.account_name_format,
+ source.getDisplayLabel(this), accountName));
for (NamedContentValues subValue : entity.getSubValues()) {
ViewEntry entry = new ViewEntry();
diff --git a/src/com/android/contacts/ui/EditContactActivity.java b/src/com/android/contacts/ui/EditContactActivity.java
index 9290b96..450f4a9 100644
--- a/src/com/android/contacts/ui/EditContactActivity.java
+++ b/src/com/android/contacts/ui/EditContactActivity.java
@@ -402,7 +402,9 @@
final ContactsSource source = sources.getInflatedSource(accountType,
ContactsSource.LEVEL_CONSTRAINTS);
- mAccountName.setText(getString(R.string.account_name_format, accountName));
+ mAccountName.setText(getString(R.string.account_name_format,
+ source.getDisplayLabel(this), accountName));
+ mAccountName.setVisibility(View.VISIBLE);
// Assign editor state based on entity and source
mEditor.setState(entity, source);