summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdnan <adnan@cyngn.com>2014-10-27 15:32:55 -0700
committerAdnan Begovic <adnan@cyngn.com>2014-10-28 04:33:06 +0000
commit37ff28327bc7045ddfe50c2dd92439741882c8e5 (patch)
treed25f0c7d2b98e48321282d4feb8cd6b64105b576
parentc722cf2b77f6fe14910d3fa3e56bf6e29f37b81a (diff)
downloadpackages_apps_Contacts-37ff28327bc7045ddfe50c2dd92439741882c8e5.tar.gz
packages_apps_Contacts-37ff28327bc7045ddfe50c2dd92439741882c8e5.tar.bz2
packages_apps_Contacts-37ff28327bc7045ddfe50c2dd92439741882c8e5.zip
Contacts: Don't show phone-local profile as null.
Change-Id: I4ea165640303e31fdc1d96bf43c6aa7dfa612da6
-rw-r--r--src/com/android/contacts/editor/ContactEditorFragment.java4
-rw-r--r--src/com/android/contacts/editor/RawContactEditorView.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 547443370..c5fabc1e6 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -596,7 +596,9 @@ public class ContactEditorFragment extends Fragment implements
// For profile contacts, we need a different query URI
state.setProfileQueryUri();
// Try to find a local profile contact
- if (state.getValues().getAsString(RawContacts.ACCOUNT_TYPE) == null) {
+ String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
+ if (accountType == null
+ || TextUtils.equals(accountType, PhoneAccountType.ACCOUNT_TYPE)) {
localProfileExists = true;
}
}
diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java
index ebd29e5e3..0b76b61ce 100644
--- a/src/com/android/contacts/editor/RawContactEditorView.java
+++ b/src/com/android/contacts/editor/RawContactEditorView.java
@@ -237,7 +237,8 @@ public class RawContactEditorView extends BaseRawContactEditorView {
// Fill in the account info
if (isProfile) {
String accountName = state.getAccountName();
- if (TextUtils.isEmpty(accountName)) {
+ if (TextUtils.isEmpty(accountName)
+ || TextUtils.equals(state.getAccountType(), PhoneAccountType.ACCOUNT_TYPE)) {
mAccountNameTextView.setVisibility(View.GONE);
mAccountTypeTextView.setText(R.string.local_profile_title);
} else {