AI 143104: Add long press to groups in contact view activity, which takes the user to
edit activity.
BUG=1241747
Automated import of CL 143104
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a5348f5..0f604fc 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -134,6 +134,9 @@
<!-- Provides a delimeter in a list of groups. For example, "g1, g2" has ", g2" generated using this string -->
<string name="group_list">, <xliff:g id="groupName">%s</xliff:g></string>
+ <!-- Menu item used to send user to the edit contact screen -->
+ <string name="menu_viewGroup">Edit groups</string>
+
<!-- Hint text for the contact name when editing -->
<string name="ghostData_name">First and Last</string>
diff --git a/src/com/android/contacts/ViewContactActivity.java b/src/com/android/contacts/ViewContactActivity.java
index b66811f..ddacbe0 100644
--- a/src/com/android/contacts/ViewContactActivity.java
+++ b/src/com/android/contacts/ViewContactActivity.java
@@ -398,6 +398,11 @@
menu.add(0, 0, 0, R.string.menu_viewAddress).setIntent(entry.intent);
break;
}
+
+ case ContactEntryAdapter.Entry.KIND_GROUP: {
+ menu.add(0, 0, 0, R.string.menu_viewGroup).setIntent(entry.intent);
+ break;
+ }
}
}
@@ -886,6 +891,7 @@
entry.kind = ContactEntryAdapter.Entry.KIND_GROUP;
entry.label = getString(R.string.label_groups);
entry.data = sb.toString();
+ entry.intent = new Intent(Intent.ACTION_EDIT, mUri);
// TODO: Add an icon for the groups item.