diff --git a/src/com/android/contacts/ContactsDrawerActivity.java b/src/com/android/contacts/ContactsDrawerActivity.java
index a12d0e1..b62d5e6 100644
--- a/src/com/android/contacts/ContactsDrawerActivity.java
+++ b/src/com/android/contacts/ContactsDrawerActivity.java
@@ -426,7 +426,7 @@
         }
     }
 
-    protected void onCreateGroupMenuItemClicked() {
+    private void onCreateGroupMenuItemClicked() {
         // Select the account to create the group
         final Bundle extras = getIntent().getExtras();
         final Account account = extras == null ? null :
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 756aeb4..8429d2a 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -281,18 +281,12 @@
             return false;
         }
 
-        switch (mRequest.getActionCode()) {
-            case ContactsRequest.ACTION_VIEW_CONTACT: {
-                final Intent intent = ImplicitIntentsUtil.composeQuickContactIntent(
-                        mRequest.getContactUri(), QuickContactActivity.MODE_FULLY_EXPANDED);
-                intent.putExtra(QuickContactActivity.EXTRA_PREVIOUS_SCREEN_TYPE, ScreenType.UNKNOWN);
-                ImplicitIntentsUtil.startActivityInApp(this, intent);
-                return false;
-            }
-            case ContactsRequest.ACTION_INSERT_GROUP: {
-                onCreateGroupMenuItemClicked();
-                return true;
-            }
+        if (mRequest.getActionCode() == ContactsRequest.ACTION_VIEW_CONTACT) {
+            final Intent intent = ImplicitIntentsUtil.composeQuickContactIntent(
+                    mRequest.getContactUri(), QuickContactActivity.MODE_FULLY_EXPANDED);
+            intent.putExtra(QuickContactActivity.EXTRA_PREVIOUS_SCREEN_TYPE, ScreenType.UNKNOWN);
+            ImplicitIntentsUtil.startActivityInApp(this, intent);
+            return false;
         }
         return true;
     }
diff --git a/src/com/android/contacts/group/GroupUtil.java b/src/com/android/contacts/group/GroupUtil.java
index 41dfa8c..beba2ea 100644
--- a/src/com/android/contacts/group/GroupUtil.java
+++ b/src/com/android/contacts/group/GroupUtil.java
@@ -49,6 +49,9 @@
 @NeededForTesting
 public final class GroupUtil {
 
+    private static final String LEGACY_CONTACTS_AUTHORITY = "contacts";
+    private static final String LEGACY_CONTACTS_URI = "content://contacts/groups";
+
     // System IDs of FFC groups in Google accounts
     private static final Set<String> FFC_GROUPS =
             new HashSet(Arrays.asList("Friends", "Family", "Coworkers"));
@@ -140,6 +143,21 @@
     }
 
     /**
+     * Converts the given group Uri to the legacy format if the legacy authority was specified
+     * in the given Uri.
+     */
+    // TODO(wjang):
+    public static Uri maybeConvertToLegacyUri(Uri groupUri) {
+        final String requestAuthority = groupUri.getAuthority();
+        if (!LEGACY_CONTACTS_AUTHORITY.equals(requestAuthority)) {
+            return groupUri;
+        }
+        final long groupId = ContentUris.parseId(groupUri);
+        final Uri legacyContentUri = Uri.parse(LEGACY_CONTACTS_URI);
+        return ContentUris.withAppendedId(legacyContentUri, groupId);
+    }
+
+    /**
      * Returns true if it's an empty and read-only group of a Google account and the system ID of
      * the group is one of "Friends", "Family" and "Coworkers".
      */
diff --git a/src/com/android/contacts/list/ContactsIntentResolver.java b/src/com/android/contacts/list/ContactsIntentResolver.java
index 800ed11..39eaeba 100644
--- a/src/com/android/contacts/list/ContactsIntentResolver.java
+++ b/src/com/android/contacts/list/ContactsIntentResolver.java
@@ -16,6 +16,7 @@
 
 package com.android.contacts.list;
 
+import android.accounts.Account;
 import android.app.Activity;
 import android.app.SearchManager;
 import android.content.Intent;
@@ -130,9 +131,6 @@
             }
         } else if (Intent.ACTION_INSERT_OR_EDIT.equals(action)) {
             request.setActionCode(ContactsRequest.ACTION_INSERT_OR_EDIT_CONTACT);
-        } else if (Intent.ACTION_INSERT.equals(action) &&
-                Groups.CONTENT_TYPE.equals(intent.getType())) {
-            request.setActionCode(ContactsRequest.ACTION_INSERT_GROUP);
         } else if (Intent.ACTION_SEARCH.equals(action)) {
             String query = intent.getStringExtra(SearchManager.QUERY);
             // If the {@link SearchManager.QUERY} is empty, then check if a phone number
diff --git a/src/com/android/contacts/list/ContactsRequest.java b/src/com/android/contacts/list/ContactsRequest.java
index e9b3a86..615fac6 100644
--- a/src/com/android/contacts/list/ContactsRequest.java
+++ b/src/com/android/contacts/list/ContactsRequest.java
@@ -42,9 +42,6 @@
     /** Show potential new members of a specific group */
     public static final int ACTION_PICK_GROUP_MEMBERS = 21;
 
-    /** Create a new group */
-    public static final int ACTION_INSERT_GROUP = 22;
-
     /** Show all starred contacts */
     public static final int ACTION_STARRED = 30;
 
