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

Commit c638d1f9 authored by kaiyiz's avatar kaiyiz Committed by Steve Kondik
Browse files

Contact: Phone crash when save a contact after switch the account

The state of the account switcher is incorrect after end a MT call,
the contact has been saved and the action is "EDIT" after end a MT
call, so user should can't switch account now.

Add a judgment to update the value of the variable that indicates
whether there is a new contact, the program will disable the account
switcher according to this value.

CRs-Fixed: 528413

Change-Id: Iaf3dbddc4803f7120c1a7613e42997cb72684387
parent 0cfb1c57
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -507,6 +507,15 @@ public class ContactEditorFragment extends Fragment implements
        }
    }

    @Override
    public void onResume() {
        super.onResume();

        if (Intent.ACTION_EDIT.equals(mAction)) {
            mHasNewContact = false;
        }
    }

    public void setData(Contact contact) {

        // If we have already loaded data, we do not want to change it here to not confuse the user