Merge "Guard JOIN in case the state machine gets into an erroneous state" into jb-mr1-dev
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 5ee6ff9..1f4cb45 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -1149,7 +1149,7 @@
case SaveMode.JOIN:
if (saveSucceeded && contactLookupUri != null) {
// If it was a JOIN, we are now ready to bring up the join activity.
- if (saveMode == SaveMode.JOIN) {
+ if (saveMode == SaveMode.JOIN && hasValidState()) {
showJoinAggregateActivity(contactLookupUri);
}