Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37ff2832 authored by Adnan's avatar Adnan Committed by Adnan Begovic
Browse files

Contacts: Don't show phone-local profile as null.

Change-Id: I4ea165640303e31fdc1d96bf43c6aa7dfa612da6
parent c722cf2b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
                }
            }
+2 −1
Original line number Diff line number Diff line
@@ -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 {