am ad146e95: am 31599988: Merge "Don\'t allow newly writable contact splits" into mnc-dev
* commit 'ad146e951ec025440fdef0de627b7d4a697b8f5e':
Don't allow newly writable contact splits
diff --git a/src/com/android/contacts/editor/ContactEditorBaseFragment.java b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
index 52076f7..d0750e0 100644
--- a/src/com/android/contacts/editor/ContactEditorBaseFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
@@ -754,8 +754,9 @@
} else if (Intent.ACTION_EDIT.equals(mAction) ||
ContactEditorBaseActivity.ACTION_EDIT.equals(mAction)) {
HelpUtils.prepareHelpMenuItem(mContext, helpMenu, R.string.help_url_people_edit);
- // Split only if more than one raw profile and not a user profile
- splitMenu.setVisible(mState.size() > 1 && !isEditingUserProfile());
+ // Split only if there is more than one raw (non-user profile) contact and doing so
+ // won't result in an empty contact
+ splitMenu.setVisible(mState.size() > 1 && !isEditingUserProfile() && !mHasNewContact);
// Cannot join a user profile
joinMenu.setVisible(!isEditingUserProfile());
deleteMenu.setVisible(!mDisableDeleteMenuOption);