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

Commit 7394c437 authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Avoid saving contact when user doesn't intend to do so.

We will not save contact when user:
	1. picks a photo;
	2. presses "Recent" button;
	3. presses "Home" button;

Bug: 24898586
Change-Id: I40339de573ac069abffada1a6329009c3b97076c
parent ba6c41ca
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -81,16 +81,6 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl
        super.onSaveInstanceState(outState);
    }

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

        // If anything was left unsaved, save it now
        if (!getActivity().isChangingConfigurations() && mStatus == Status.EDITING) {
            save(SaveMode.RELOAD);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
+0 −6
Original line number Diff line number Diff line
@@ -643,13 +643,7 @@ abstract public class ContactEditorBaseFragment extends Fragment implements
    @Override
    public void onStop() {
        super.onStop();

        UiClosables.closeQuietly(mAggregationSuggestionPopup);

        // If anything was left unsaved, save it now but keep the editor open.
        if (!getActivity().isChangingConfigurations() && mStatus == Status.EDITING) {
            save(SaveMode.RELOAD);
        }
    }

    @Override