Fix bug when showing overflow menu in Compact editor.
Set default value for rawContact id to display alone.
BUG 24899070
Change-Id: Ibdb25080e62f669f9c466bf55e67dbbe63ff6afb
diff --git a/src/com/android/contacts/editor/ContactEditorBaseFragment.java b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
index 1e18e2c..9ae81f6 100644
--- a/src/com/android/contacts/editor/ContactEditorBaseFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
@@ -1368,7 +1368,7 @@
}
mPhotoId = mIntentExtras.getLong(INTENT_EXTRA_PHOTO_ID);
mRawContactIdToDisplayAlone = mIntentExtras.getLong(
- INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE);
+ INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE, -1);
mRawContactDisplayAloneIsReadOnly = mIntentExtras.getBoolean(
INTENT_EXTRA_RAW_CONTACT_DISPLAY_ALONE_IS_READ_ONLY);
}
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index c602a1d..a3830ef 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -114,7 +114,7 @@
mCurrentPhotoUri = savedState.getParcelable(KEY_CURRENT_PHOTO_URI);
mUpdatedPhotos = savedState.getParcelable(KEY_UPDATED_PHOTOS);
mRawContactIdToDisplayAlone = savedState.getLong(
- ContactEditorBaseFragment.INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE);
+ ContactEditorBaseFragment.INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE, -1);
}
}
@@ -123,7 +123,7 @@
super.load(action, lookupUri, intentExtras);
if (intentExtras != null) {
mRawContactIdToDisplayAlone = intentExtras.getLong(
- ContactEditorBaseFragment.INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE);
+ ContactEditorBaseFragment.INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE, -1);
}
}