summaryrefslogtreecommitdiff
path: root/src/com/android/contacts/editor/EditorIntents.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/contacts/editor/EditorIntents.java')
-rw-r--r--src/com/android/contacts/editor/EditorIntents.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/contacts/editor/EditorIntents.java b/src/com/android/contacts/editor/EditorIntents.java
index 5d7edd325..b4e2fcec8 100644
--- a/src/com/android/contacts/editor/EditorIntents.java
+++ b/src/com/android/contacts/editor/EditorIntents.java
@@ -44,10 +44,11 @@ public class EditorIntents {
* existing contact.
*/
public static Intent createCompactEditContactIntent(Uri contactLookupUri,
- MaterialPalette materialPalette, Bundle updatedPhotos) {
+ MaterialPalette materialPalette, Bundle updatedPhotos, long photoId) {
final Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
putMaterialPalette(intent, materialPalette);
putUpdatedPhotos(intent, updatedPhotos);
+ putPhotoId(intent, photoId);
return intent;
}
@@ -96,10 +97,11 @@ public class EditorIntents {
* new contact.
*/
public static Intent createEditContactIntent(Uri contactLookupUri,
- MaterialPalette materialPalette) {
+ MaterialPalette materialPalette, long photoId) {
final Intent intent = new Intent(ContactEditorBaseActivity.ACTION_EDIT, contactLookupUri);
addContactIntentFlags(intent);
putMaterialPalette(intent, materialPalette);
+ putPhotoId(intent, photoId);
return intent;
}
@@ -136,6 +138,13 @@ public class EditorIntents {
}
}
+ private static void putPhotoId(Intent intent, long photoId) {
+ if (photoId >= 0) {
+ intent.putExtra(ContactEditorBaseFragment.INTENT_EXTRA_PHOTO_ID, photoId);
+ }
+ }
+
+
private static void putRawContactDeltaValues(Intent intent,
RawContactDeltaList rawContactDeltaList, String displayName, String phoneticName) {
// Pass on all the data that has been entered so far