diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5674fc5..053d0e3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -439,11 +439,6 @@
 
     <!-- The message in a confirmation dialog shown when the user selects a
         contact aggregation suggestion in Contact editor. [CHAR LIMIT=512]-->
-    <string name="aggregation_suggestion_join_dialog_message">Link
-        the current contact with the selected contact?</string>
-
-    <!-- The message in a confirmation dialog shown when the user selects a
-        contact aggregation suggestion in Contact editor. [CHAR LIMIT=512]-->
     <string name="aggregation_suggestion_edit_dialog_message">Switch to editing
         the selected contact? Information you entered so far will be copied.</string>
 
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
index abb8463..326ff93 100644
--- a/src/com/android/contacts/activities/ContactEditorActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -468,7 +468,12 @@
      */
     public void changePhoto(int photoMode) {
         mPhotoMode = photoMode;
-        PhotoSourceDialogFragment.show(this, mPhotoMode);
+        // This method is called from an onClick handler in the PhotoEditorView. It's possible for
+        // onClick methods to run after onSaveInstanceState is called for the activity, so check
+        // if it's safe to commit transactions before trying.
+        if (isSafeToCommitTransactions()) {
+            PhotoSourceDialogFragment.show(this, mPhotoMode);
+        }
     }
 
     public Toolbar getToolbar() {
diff --git a/src/com/android/contacts/editor/JoinSuggestedContactDialogFragment.java b/src/com/android/contacts/editor/JoinSuggestedContactDialogFragment.java
deleted file mode 100644
index be3313b..0000000
--- a/src/com/android/contacts/editor/JoinSuggestedContactDialogFragment.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.contacts.editor;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-
-import com.android.contacts.R;
-
-public class JoinSuggestedContactDialogFragment extends DialogFragment {
-
-    private static final String ARG_RAW_CONTACT_IDS = "rawContactIds";
-
-    public static void show(ContactEditorFragment fragment, long[] rawContactIds) {
-        final Bundle args = new Bundle();
-        args.putLongArray(ARG_RAW_CONTACT_IDS, rawContactIds);
-
-        final JoinSuggestedContactDialogFragment dialog = new JoinSuggestedContactDialogFragment();
-        dialog.setArguments(args);
-        dialog.setTargetFragment(fragment, 0);
-        dialog.show(fragment.getFragmentManager(), "join");
-    }
-
-    @Override
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
-        return new AlertDialog.Builder(getActivity())
-                .setIconAttribute(android.R.attr.alertDialogIcon)
-                .setMessage(R.string.aggregation_suggestion_join_dialog_message)
-                .setPositiveButton(android.R.string.yes,
-                        new DialogInterface.OnClickListener() {
-                            @Override
-                            public void onClick(DialogInterface dialog, int whichButton) {
-                                ContactEditorFragment targetFragment =
-                                        (ContactEditorFragment) getTargetFragment();
-                                long rawContactIds[] =
-                                        getArguments().getLongArray(ARG_RAW_CONTACT_IDS);
-                                targetFragment.doJoinSuggestedContact(rawContactIds);
-                            }
-                        }
-                )
-                .setNegativeButton(android.R.string.no, null)
-                .create();
-    }
-}
