summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-03-14 02:25:51 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-03-14 02:25:51 -0700
commitf976904c2149c07e273f27d03d6393fc9b0974fb (patch)
tree914bbef06a8878be18ff5bbfecf0a0cf12370acb
parentce4b4c133799e88fc0c204f86727e7a380593865 (diff)
parent88163be6ff8285f5358a3fbdf25e30dfe6b35148 (diff)
downloadpackages_apps_Contacts-f976904c2149c07e273f27d03d6393fc9b0974fb.tar.gz
packages_apps_Contacts-f976904c2149c07e273f27d03d6393fc9b0974fb.tar.bz2
packages_apps_Contacts-f976904c2149c07e273f27d03d6393fc9b0974fb.zip
Merge "Don't save contact after deleting it"
-rw-r--r--src/com/android/contacts/editor/ContactEditorFragment.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 7d218d1f8..2ed1dc280 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -1565,7 +1565,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();
@@ -1922,7 +1922,7 @@ public class ContactEditorFragment extends Fragment implements
outState.putBoolean(KEY_EXISTING_CONTACT_READY, mExistingContactDataReady);
outState.putParcelableArrayList(KEY_RAW_CONTACTS,
mRawContacts == null ?
- Lists.<RawContact> newArrayList() : Lists.newArrayList(mRawContacts));
+ Lists.<RawContact>newArrayList() : Lists.newArrayList(mRawContacts));
outState.putBoolean(KEY_SEND_TO_VOICE_MAIL_STATE, mSendToVoicemailState);
outState.putString(KEY_CUSTOM_RINGTONE, mCustomRingtone);
outState.putBoolean(KEY_ARE_PHONE_OPTIONS_CHANGEABLE, mArePhoneOptionsChangable);
@@ -2089,8 +2089,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;
}