diff --git a/src/com/android/contacts/activities/ContactEditorBaseActivity.java b/src/com/android/contacts/activities/ContactEditorBaseActivity.java
index c4abd58..8a8ce1d 100644
--- a/src/com/android/contacts/activities/ContactEditorBaseActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorBaseActivity.java
@@ -323,7 +323,7 @@
         public void onEditOtherContactRequested(
                 Uri contactLookupUri, ArrayList<ContentValues> values) {
             final Intent intent = EditorIntents.createEditOtherContactIntent(
-                    contactLookupUri, values);
+                    ContactEditorBaseActivity.this, contactLookupUri, values);
             ImplicitIntentsUtil.startActivityInApp(ContactEditorBaseActivity.this, intent);
             finish();
         }
diff --git a/src/com/android/contacts/activities/ContactSelectionActivity.java b/src/com/android/contacts/activities/ContactSelectionActivity.java
index 29d2cf6..7bb921d 100644
--- a/src/com/android/contacts/activities/ContactSelectionActivity.java
+++ b/src/com/android/contacts/activities/ContactSelectionActivity.java
@@ -42,6 +42,7 @@
 import com.android.contacts.common.list.OnPhoneNumberPickerActionListener;
 import com.android.contacts.common.list.PhoneNumberPickerFragment;
 import com.android.contacts.common.logging.ListEvent;
+import com.android.contacts.common.util.ImplicitIntentsUtil;
 import com.android.contacts.common.util.ViewUtil;
 import com.android.contacts.editor.EditorIntents;
 import com.android.contacts.list.ContactPickerFragment;
@@ -493,7 +494,8 @@
         @Override
         public void onEditContactAction(Uri contactLookupUri) {
             startActivityAndForwardResult(EditorIntents.createEditContactIntent(
-                    contactLookupUri, /* materialPalette =*/ null, /* photoId =*/ -1));
+                    ContactSelectionActivity.this, contactLookupUri, /* materialPalette =*/ null,
+                    /* photoId =*/ -1));
         }
 
         @Override
@@ -603,7 +605,7 @@
             intent.putExtras(extras);
         }
         try {
-            startActivity(intent);
+            ImplicitIntentsUtil.startActivityInApp(ContactSelectionActivity.this, intent);
         } catch (ActivityNotFoundException e) {
             Log.e(TAG, "startActivity() failed: " + e);
             Toast.makeText(ContactSelectionActivity.this, R.string.missing_app,
diff --git a/src/com/android/contacts/activities/GroupMembersActivity.java b/src/com/android/contacts/activities/GroupMembersActivity.java
index a39981d..000cae4 100644
--- a/src/com/android/contacts/activities/GroupMembersActivity.java
+++ b/src/com/android/contacts/activities/GroupMembersActivity.java
@@ -367,7 +367,7 @@
     }
 
     public void startGroupAddMemberActivity() {
-        startActivityForResult(GroupUtil.createPickMemberIntent(mGroupMetadata,
+        startActivityForResult(GroupUtil.createPickMemberIntent(this, mGroupMetadata,
                 mMembersFragment.getMemberContactIds()), RESULT_GROUP_ADD_MEMBER);
     }
 
@@ -596,7 +596,7 @@
         final int count = mMembersFragment.getAdapter().getCount();
         Logger.logListEvent(ListEvent.ActionType.CLICK, ListEvent.ListType.GROUP, count,
                 /* clickedIndex */ position, /* numSelected */ 0);
-        final Intent intent = ImplicitIntentsUtil.composeQuickContactIntent(
+        final Intent intent = ImplicitIntentsUtil.composeQuickContactIntent(this,
                 contactLookupUri, QuickContactActivity.MODE_FULLY_EXPANDED);
         intent.putExtra(QuickContactActivity.EXTRA_PREVIOUS_SCREEN_TYPE, ScreenType.LIST_GROUP);
         startActivity(intent);
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 4e7f300..5f53396 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -312,7 +312,8 @@
         switch (mRequest.getActionCode()) {
             case ContactsRequest.ACTION_VIEW_CONTACT: {
                 final Intent intent = ImplicitIntentsUtil.composeQuickContactIntent(
-                        mRequest.getContactUri(), QuickContactActivity.MODE_FULLY_EXPANDED);
+                        PeopleActivity.this, mRequest.getContactUri(),
+                        QuickContactActivity.MODE_FULLY_EXPANDED);
                 intent.putExtra(QuickContactActivity.EXTRA_PREVIOUS_SCREEN_TYPE, ScreenType.UNKNOWN);
                 ImplicitIntentsUtil.startActivityInApp(this, intent);
                 return false;
@@ -1029,7 +1030,8 @@
                         QuickContactActivity.MODE_FULLY_EXPANDED, null);
             } else {
                 final Intent intent = ImplicitIntentsUtil.composeQuickContactIntent(
-                        contactLookupUri, QuickContactActivity.MODE_FULLY_EXPANDED);
+                        PeopleActivity.this, contactLookupUri,
+                        QuickContactActivity.MODE_FULLY_EXPANDED);
                 final int previousScreen;
                 if (mAllFragment.isSearchMode()) {
                     previousScreen = ScreenType.SEARCH;
@@ -1106,7 +1108,7 @@
         @Override
         public void onCreateNewContactAction() {
             ImplicitIntentsUtil.startActivityInApp(PeopleActivity.this,
-                    EditorIntents.createCompactInsertContactIntent());
+                    EditorIntents.createCompactInsertContactIntent(PeopleActivity.this));
         }
 
         @Override
diff --git a/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java b/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
index 6afcb13..6593619 100644
--- a/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
+++ b/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
@@ -303,7 +303,8 @@
             final Intent intent;
             if (mHasProfile) {
                 final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, mProfileContactId);
-                intent = ImplicitIntentsUtil.composeQuickContactIntent(uri, mModeFullyExpanded);
+                intent = ImplicitIntentsUtil.composeQuickContactIntent(getContext(), uri,
+                        mModeFullyExpanded);
                 intent.putExtra(mPreviousScreenExtra, ScreenType.ME_CONTACT);
             } else {
                 intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
diff --git a/src/com/android/contacts/common/util/ImplicitIntentsUtil.java b/src/com/android/contacts/common/util/ImplicitIntentsUtil.java
index c6a875b..47bf605 100644
--- a/src/com/android/contacts/common/util/ImplicitIntentsUtil.java
+++ b/src/com/android/contacts/common/util/ImplicitIntentsUtil.java
@@ -28,6 +28,7 @@
 import android.text.TextUtils;
 
 import com.android.contacts.common.model.account.GoogleAccountType;
+import com.android.contacts.quickcontact.QuickContactActivity;
 
 import java.util.List;
 
@@ -95,9 +96,10 @@
     /**
      * Returns an implicit intent for opening QuickContacts.
      */
-    public static Intent composeQuickContactIntent(Uri contactLookupUri,
+    public static Intent composeQuickContactIntent(Context context, Uri contactLookupUri,
             int extraMode) {
-        final Intent intent = new Intent(QuickContact.ACTION_QUICK_CONTACT);
+        final Intent intent = new Intent(context, QuickContactActivity.class);
+        intent.setAction(QuickContact.ACTION_QUICK_CONTACT);
         intent.setData(contactLookupUri);
         intent.putExtra(QuickContact.EXTRA_MODE, extraMode);
         // Make sure not to show QuickContacts on top of another QuickContacts.
diff --git a/src/com/android/contacts/editor/ContactEditorBaseFragment.java b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
index d149f16..7286c46 100644
--- a/src/com/android/contacts/editor/ContactEditorBaseFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorBaseFragment.java
@@ -61,6 +61,7 @@
 import com.android.contacts.activities.ContactEditorAccountsChangedActivity;
 import com.android.contacts.activities.ContactEditorBaseActivity;
 import com.android.contacts.activities.ContactEditorBaseActivity.ContactEditor;
+import com.android.contacts.activities.ContactSelectionActivity;
 import com.android.contacts.common.logging.ScreenEvent.ScreenType;
 import com.android.contacts.common.model.AccountTypeManager;
 import com.android.contacts.common.model.Contact;
@@ -1476,8 +1477,8 @@
                 if (saveSucceeded && contactLookupUri != null) {
                     final Uri lookupUri = maybeConvertToLegacyLookupUri(
                             mContext, contactLookupUri, mLookupUri);
-                    resultIntent = ImplicitIntentsUtil.composeQuickContactIntent(lookupUri,
-                            QuickContactActivity.MODE_FULLY_EXPANDED);
+                    resultIntent = ImplicitIntentsUtil.composeQuickContactIntent(getContext(),
+                            lookupUri, QuickContactActivity.MODE_FULLY_EXPANDED);
                     resultIntent.putExtra(QuickContactActivity.EXTRA_PREVIOUS_SCREEN_TYPE,
                             ScreenType.EDITOR);
                     resultIntent.putExtra(QuickContactActivity.EXTRA_CONTACT_EDITED, true);
@@ -1533,7 +1534,8 @@
         }
 
         mContactIdForJoin = ContentUris.parseId(contactLookupUri);
-        final Intent intent = new Intent(UiIntentActions.PICK_JOIN_CONTACT_ACTION);
+        final Intent intent = new Intent(getContext(), ContactSelectionActivity.class);
+        intent.setAction(UiIntentActions.PICK_JOIN_CONTACT_ACTION);
         intent.putExtra(UiIntentActions.TARGET_CONTACT_ID_EXTRA_KEY, mContactIdForJoin);
         startActivityForResult(intent, REQUEST_CODE_JOIN);
     }
diff --git a/src/com/android/contacts/editor/EditorIntents.java b/src/com/android/contacts/editor/EditorIntents.java
index d87a726..14476c8 100644
--- a/src/com/android/contacts/editor/EditorIntents.java
+++ b/src/com/android/contacts/editor/EditorIntents.java
@@ -15,22 +15,20 @@
  */
 package com.android.contacts.editor;
 
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
+import android.text.TextUtils;
+
 import com.android.contacts.activities.CompactContactEditorActivity;
 import com.android.contacts.activities.ContactEditorActivity;
 import com.android.contacts.activities.ContactEditorBaseActivity;
 import com.android.contacts.common.model.RawContactDeltaList;
 import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
 
-import android.app.Activity;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.ContactsContract;
-import android.provider.ContactsContract.Contacts;
-import android.text.TextUtils;
-
 import java.util.ArrayList;
 
 /**
@@ -45,9 +43,10 @@
      * Returns an Intent to start the {@link CompactContactEditorActivity} for an
      * existing contact.
      */
-    public static Intent createCompactEditContactIntent(Uri contactLookupUri,
+    public static Intent createCompactEditContactIntent(Context context, Uri contactLookupUri,
             MaterialPalette materialPalette, long photoId) {
-        final Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
+        final Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri, context,
+                CompactContactEditorActivity.class);
         putMaterialPalette(intent, materialPalette);
         putPhotoId(intent, photoId);
         return intent;
@@ -56,8 +55,8 @@
     /**
      * Returns an Intent to start the {@link CompactContactEditorActivity} for a new contact.
      */
-    public static Intent createCompactInsertContactIntent() {
-        return createCompactInsertContactIntent(/* rawContactDeltaList =*/ null,
+    public static Intent createCompactInsertContactIntent(Context context) {
+        return createCompactInsertContactIntent(context, /* rawContactDeltaList =*/ null,
                 /* displayName =*/ null, /* phoneticName =*/ null,
                 /* isNewLocalProfile =*/ false);
     }
@@ -66,10 +65,11 @@
      * Returns an Intent to start the {@link CompactContactEditorActivity} for a new contact with
      * the field values specified by rawContactDeltaList pre-populate in the form.
      */
-    public static Intent createCompactInsertContactIntent(RawContactDeltaList rawContactDeltaList,
-            String displayName, String phoneticName, /* Bundle updatedPhotos, */
-            boolean isNewLocalProfile) {
-        final Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+    public static Intent createCompactInsertContactIntent(Context context,
+            RawContactDeltaList rawContactDeltaList, String displayName, String phoneticName,
+            /* Bundle updatedPhotos, */ boolean isNewLocalProfile) {
+        final Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI,
+                context, CompactContactEditorActivity.class);
         intent.putExtra(ContactEditorFragment.INTENT_EXTRA_NEW_LOCAL_PROFILE, isNewLocalProfile);
         if (rawContactDeltaList != null || displayName != null || phoneticName != null) {
             putRawContactDeltaValues(intent, rawContactDeltaList, displayName, phoneticName);
@@ -81,9 +81,10 @@
      * Returns an Intent to edit a different contact (in the fully expaned editor) with whatever
      * values were already entered on the currently displayed contact editor.
      */
-    public static Intent createEditOtherContactIntent(Uri contactLookupUri,
+    public static Intent createEditOtherContactIntent(Context context, Uri contactLookupUri,
             ArrayList<ContentValues> contentValues) {
-        final Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
+        final Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri, context,
+                ContactEditorActivity.class);
         intent.setFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
                 | Intent.FLAG_ACTIVITY_FORWARD_RESULT);
         intent.putExtra(ContactEditorFragment.INTENT_EXTRA_ADD_TO_DEFAULT_DIRECTORY, "");
@@ -99,9 +100,10 @@
      * Returns an Intent to start the fully expanded {@link ContactEditorActivity} for an
      * existing contact.
      */
-    public static Intent createEditContactIntent(Uri contactLookupUri,
+    public static Intent createEditContactIntent(Context context, Uri contactLookupUri,
             MaterialPalette materialPalette, long photoId) {
-        final Intent intent = new Intent(ContactEditorBaseActivity.ACTION_EDIT, contactLookupUri);
+        final Intent intent = new Intent(ContactEditorBaseActivity.ACTION_EDIT, contactLookupUri,
+                context, ContactEditorActivity.class);
         addContactIntentFlags(intent);
         putMaterialPalette(intent, materialPalette);
         putPhotoId(intent, photoId);
@@ -112,10 +114,11 @@
      * Returns an Intent to start the fully expanded {@link ContactEditorActivity} for a
      * new contact.
      */
-    public static Intent createInsertContactIntent(RawContactDeltaList rawContactDeltaList,
-            String displayName, String phoneticName, boolean isNewLocalProfile) {
+    public static Intent createInsertContactIntent(Context context,
+            RawContactDeltaList rawContactDeltaList, String displayName, String phoneticName,
+            boolean isNewLocalProfile) {
         final Intent intent = new Intent(ContactEditorBaseActivity.ACTION_INSERT,
-                Contacts.CONTENT_URI);
+                Contacts.CONTENT_URI, context, ContactEditorActivity.class);
         intent.putExtra(ContactEditorFragment.INTENT_EXTRA_NEW_LOCAL_PROFILE, isNewLocalProfile);
         addContactIntentFlags(intent);
         putRawContactDeltaValues(intent, rawContactDeltaList, displayName, phoneticName);
@@ -128,9 +131,8 @@
      */
     public static Intent createEditContactIntentForRawContact(Context context,
             Uri rawContactUri, long rawContactId, boolean isReadOnly) {
-        final Intent intent = new Intent(context, ContactEditorActivity.class);
-        intent.setAction(ContactEditorBaseActivity.ACTION_EDIT);
-        intent.setData(rawContactUri);
+        final Intent intent = new Intent(ContactEditorBaseActivity.ACTION_EDIT, rawContactUri,
+                context, ContactEditorActivity.class);
         intent.putExtra(ContactEditorFragment.INTENT_EXTRA_RAW_CONTACT_ID_TO_DISPLAY_ALONE,
                 rawContactId);
         intent.putExtra(
diff --git a/src/com/android/contacts/group/GroupUtil.java b/src/com/android/contacts/group/GroupUtil.java
index eae0217..b9a6425 100644
--- a/src/com/android/contacts/group/GroupUtil.java
+++ b/src/com/android/contacts/group/GroupUtil.java
@@ -128,9 +128,10 @@
     }
 
     /** Returns an Intent to pick contacts to add to a group. */
-    public static Intent createPickMemberIntent(
+    public static Intent createPickMemberIntent(Context context,
             GroupMetadata groupMetadata, ArrayList<String> memberContactIds) {
-        final Intent intent = new Intent(Intent.ACTION_PICK);
+        final Intent intent = new Intent(context, GroupMembersActivity.class);
+        intent.setAction(Intent.ACTION_PICK);
         intent.setType(Groups.CONTENT_TYPE);
         intent.putExtra(UiIntentActions.GROUP_ACCOUNT_NAME, groupMetadata.accountName);
         intent.putExtra(UiIntentActions.GROUP_ACCOUNT_TYPE, groupMetadata.accountType);
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index c595f23..43dd18e 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -2793,7 +2793,7 @@
     }
 
     private Intent getEditContactIntent() {
-        return EditorIntents.createCompactEditContactIntent(
+        return EditorIntents.createCompactEditContactIntent(QuickContactActivity.this,
                 mContactData.getLookupUri(),
                 mHasComputedThemeColor
                         ? new MaterialPalette(mColorFilterColor, mStatusBarColor) : null,
@@ -3004,6 +3004,7 @@
                     intent.putExtra(ContactEditorFragment.INTENT_EXTRA_DISABLE_DELETE_MENU_OPTION,
                             true);
 
+                    intent.setPackage(getPackageName());
                     startActivityForResult(intent, REQUEST_CODE_CONTACT_SELECTION_ACTIVITY);
                 } else if (InvisibleContactUtil.isInvisibleAndAddable(mContactData, this)) {
                     InvisibleContactUtil.addToDefaultGroup(mContactData, this);
