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

Commit 6b447ced authored by Brian Attwell's avatar Brian Attwell Committed by Android (Google) Code Review
Browse files

Merge "Don't save contact after deleting it" into lmp-mr1-dev

parents 4829b548 b4154e46
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1454,7 +1454,7 @@ public class ContactEditorFragment extends Fragment implements
    public static interface Listener {
        /**
         * Contact was not found, so somehow close this fragment. This is raised after a contact
         * is removed via Menu/Delete (unless it was a new contact)
         * is removed via Menu/Delete
         */
        void onContactNotFound();

@@ -1968,8 +1968,9 @@ public class ContactEditorFragment extends Fragment implements
            final long loaderCurrentTime = SystemClock.elapsedRealtime();
            Log.v(TAG, "Time needed for loading: " + (loaderCurrentTime-mLoaderStartTime));
            if (!data.isLoaded()) {
                // Item has been deleted
                // Item has been deleted. Close activity without saving again.
                Log.i(TAG, "No contact found. Closing activity");
                mStatus = Status.CLOSING;
                if (mListener != null) mListener.onContactNotFound();
                return;
            }