Preserving editor status on rotation
Bug: 3452739
Change-Id: I9127ad4b37ff2a50123cde5b4e3ae8b4021e14e9
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 7b936ce..2f1c7ff 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -111,6 +111,7 @@
private static final String KEY_CONTACT_ID_FOR_JOIN = "contactidforjoin";
private static final String KEY_SHOW_JOIN_SUGGESTIONS = "showJoinSuggestions";
private static final String KEY_ENABLED = "enabled";
+ private static final String KEY_STATUS = "status";
public static final String SAVE_MODE_EXTRA_KEY = "saveMode";
@@ -366,7 +367,7 @@
mContactIdForJoin = savedState.getLong(KEY_CONTACT_ID_FOR_JOIN);
mAggregationSuggestionsRawContactId = savedState.getLong(KEY_SHOW_JOIN_SUGGESTIONS);
mEnabled = savedState.getBoolean(KEY_ENABLED);
- mStatus = Status.EDITING;
+ mStatus = savedState.getInt(KEY_STATUS);
}
}
@@ -1463,6 +1464,7 @@
outState.putLong(KEY_CONTACT_ID_FOR_JOIN, mContactIdForJoin);
outState.putLong(KEY_SHOW_JOIN_SUGGESTIONS, mAggregationSuggestionsRawContactId);
outState.putBoolean(KEY_ENABLED, mEnabled);
+ outState.putInt(KEY_STATUS, mStatus);
super.onSaveInstanceState(outState);
}