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

Commit 5e3e8f93 authored by Brian Attwell's avatar Brian Attwell Committed by Android Git Automerger
Browse files

am 6c17e9e8: am 6b447ced: Merge "Don\'t save contact after deleting it" into lmp-mr1-dev

* commit '6c17e9e8':
  Don't save contact after deleting it
parents d0506e98 6c17e9e8
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -1454,7 +1454,7 @@ public class ContactEditorFragment extends Fragment implements
    public static interface Listener {
    public static interface Listener {
        /**
        /**
         * Contact was not found, so somehow close this fragment. This is raised after a contact
         * 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();
        void onContactNotFound();


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