summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/editor/RawContactEditorView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/contacts/editor/RawContactEditorView.java')
-rwxr-xr-xsrc/com/android/contacts/editor/RawContactEditorView.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java
index 974475c10..3595bf3e2 100755
--- a/src/com/android/contacts/editor/RawContactEditorView.java
+++ b/src/com/android/contacts/editor/RawContactEditorView.java
@@ -242,11 +242,13 @@ public class RawContactEditorView extends BaseRawContactEditorView {
}
} else {
String accountName = state.getAccountName();
- CharSequence accountType = type.getDisplayLabel(mContext);
+ String account = state.getAccountType();
+ CharSequence accountType = type.getDisplayLabel(mContext, accountName);
if (TextUtils.isEmpty(accountType)) {
accountType = mContext.getString(R.string.account_phone);
}
- if (!TextUtils.isEmpty(accountName)) {
+ if (!TextUtils.isEmpty(accountName) && !SimAccountType.ACCOUNT_TYPE.equals(account)
+ && !PhoneAccountType.ACCOUNT_TYPE.equals(account)) {
mAccountNameTextView.setVisibility(View.VISIBLE);
mAccountNameTextView.setText(
mContext.getString(R.string.from_account_format, accountName));
@@ -257,7 +259,7 @@ public class RawContactEditorView extends BaseRawContactEditorView {
mAccountTypeTextView.setText(
mContext.getString(R.string.account_type_format, accountType));
}
- mAccountIcon.setImageDrawable(type.getDisplayIcon(mContext));
+ mAccountIcon.setImageDrawable(type.getDisplayIcon(mContext, state.getAccountName()));
// Show photo editor when supported
RawContactModifier.ensureKindExists(state, type, Photo.CONTENT_ITEM_TYPE);