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

Commit 25319a5f authored by kaiyiz's avatar kaiyiz Committed by Gerrit - the friendly Code Review server
Browse files

Contacts: Error when try to edit user profile

When trying to bind editors for existing profile, it will
check whether the local profile exists. However, the local
account type it used is null.

Change the local account to Phone account

Change-Id: Id4e20aede689ec30d142166b2670354d460b2fda
CRs-Fixed: 786614
parent 03f35a6f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ import com.android.contacts.R;
import com.android.contacts.RcsApiManager;
import com.android.contacts.activities.ContactEditorAccountsChangedActivity;
import com.android.contacts.activities.ContactEditorActivity;
import com.android.contacts.common.SimContactsConstants;
import com.android.contacts.common.model.AccountTypeManager;
import com.android.contacts.common.model.ValuesDelta;
import com.android.contacts.common.model.account.AccountType;
@@ -616,7 +617,8 @@ 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) {
                if (SimContactsConstants.ACCOUNT_TYPE_PHONE.equals(state.getValues()
                        .getAsString(RawContacts.ACCOUNT_TYPE))) {
                    localProfileExists = true;
                }
            }