diff --git a/src/com/android/contacts/editor/CompactContactEditorFragment.java b/src/com/android/contacts/editor/CompactContactEditorFragment.java
index f25d01a..22396a6 100644
--- a/src/com/android/contacts/editor/CompactContactEditorFragment.java
+++ b/src/com/android/contacts/editor/CompactContactEditorFragment.java
@@ -134,6 +134,7 @@
     private long mPhotoRawContactId;
     private Bundle mUpdatedPhotos = new Bundle();
     private MaterialColorMapUtils.MaterialPalette mMaterialPalette;
+    private boolean mShowToastAfterSave = true;
 
     @Override
     public void onCreate(Bundle savedState) {
@@ -289,6 +290,11 @@
     }
 
     @Override
+    protected boolean showToastAfterSave() {
+        return mShowToastAfterSave;
+    }
+
+    @Override
     protected boolean doSaveAction(int saveMode) {
         // Save contact
         final Intent intent = ContactSaveService.createSaveContactIntent(mContext, mState,
@@ -353,7 +359,8 @@
             // Pass on all the data that has been entered so far
             ArrayList<ContentValues> contentValues = mState.get(0).getContentValues();
             if (contentValues != null && contentValues.size() != 0) {
-                intent.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, contentValues);
+                intent.putParcelableArrayListExtra(
+                        ContactsContract.Intents.Insert.DATA, contentValues);
             }
             // Name must be passed separately since it is skipped in RawContactModifier.parseValues
             final StructuredNameEditorView structuredNameEditorView =
@@ -366,7 +373,10 @@
             }
             getActivity().finish();
         } else {
-            // Whatever is in the form will be saved when the hosting activity is finished
+            // Prevent a Toast from being displayed as we transition to the full editor
+            mShowToastAfterSave = false;
+
+            // Save whatever is in the form
             save(SaveMode.RELOAD);
         }
 
diff --git a/src/com/android/contacts/editor/ContactEditorBaseFragment.java b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
index 57905d1..ecba02b 100644
--- a/src/com/android/contacts/editor/ContactEditorBaseFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
@@ -1273,7 +1273,7 @@
             Uri contactLookupUri) {
         if (hadChanges) {
             if (saveSucceeded) {
-                if (saveMode != SaveMode.JOIN) {
+                if (saveMode != SaveMode.JOIN && showToastAfterSave()) {
                     Toast.makeText(mContext, R.string.contactSavedToast, Toast.LENGTH_SHORT).show();
                 }
             } else {
@@ -1327,6 +1327,14 @@
     }
 
     /**
+     * Whether to show a Toast message after saves have completed.
+     * Does not affect successful toasts shown after joins, which are never displayed.
+     */
+    protected boolean showToastAfterSave() {
+        return true;
+    }
+
+    /**
      * Shows a list of aggregates that can be joined into the currently viewed aggregate.
      *
      * @param contactLookupUri the fresh URI for the currently edited contact (after saving it)
