Loading AndroidManifest.xml +20 −1 Original line number Diff line number Diff line Loading @@ -138,6 +138,12 @@ <data android:mimeType="vnd.android.cursor.dir/contact" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.INSERT" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.dir/group" /> </intent-filter> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> Loading Loading @@ -267,7 +273,20 @@ <!-- Displays the members of a group in a list --> <activity android:name=".activities.GroupMembersActivity" android:theme="@style/PeopleActivityTheme"/> android:theme="@style/PeopleActivityTheme"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/group" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.EDIT" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/group" /> </intent-filter> </activity> <activity android:name=".quickcontact.QuickContactActivity" Loading src/com/android/contacts/ContactsDrawerActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ public abstract class ContactsDrawerActivity extends AppCompatContactsActivity i } } private void onCreateGroupMenuItemClicked() { protected void onCreateGroupMenuItemClicked() { // Select the account to create the group final Bundle extras = getIntent().getExtras(); final Account account = extras == null ? null : Loading src/com/android/contacts/activities/PeopleActivity.java +12 −6 Original line number Diff line number Diff line Loading @@ -281,13 +281,19 @@ public class PeopleActivity extends ContactsDrawerActivity implements return false; } if (mRequest.getActionCode() == ContactsRequest.ACTION_VIEW_CONTACT) { 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; } } return true; } Loading src/com/android/contacts/group/GroupUtil.java +0 −18 Original line number Diff line number Diff line Loading @@ -49,9 +49,6 @@ import java.util.Set; @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")); Loading Loading @@ -142,21 +139,6 @@ public final class GroupUtil { return intent; } /** * 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". Loading src/com/android/contacts/list/ContactsIntentResolver.java +3 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.contacts.list; import android.accounts.Account; import android.app.Activity; import android.app.SearchManager; import android.content.Intent; Loading Loading @@ -131,6 +130,9 @@ public class ContactsIntentResolver { } } 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 Loading Loading
AndroidManifest.xml +20 −1 Original line number Diff line number Diff line Loading @@ -138,6 +138,12 @@ <data android:mimeType="vnd.android.cursor.dir/contact" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.INSERT" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.dir/group" /> </intent-filter> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> Loading Loading @@ -267,7 +273,20 @@ <!-- Displays the members of a group in a list --> <activity android:name=".activities.GroupMembersActivity" android:theme="@style/PeopleActivityTheme"/> android:theme="@style/PeopleActivityTheme"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/group" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.EDIT" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/group" /> </intent-filter> </activity> <activity android:name=".quickcontact.QuickContactActivity" Loading
src/com/android/contacts/ContactsDrawerActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ public abstract class ContactsDrawerActivity extends AppCompatContactsActivity i } } private void onCreateGroupMenuItemClicked() { protected void onCreateGroupMenuItemClicked() { // Select the account to create the group final Bundle extras = getIntent().getExtras(); final Account account = extras == null ? null : Loading
src/com/android/contacts/activities/PeopleActivity.java +12 −6 Original line number Diff line number Diff line Loading @@ -281,13 +281,19 @@ public class PeopleActivity extends ContactsDrawerActivity implements return false; } if (mRequest.getActionCode() == ContactsRequest.ACTION_VIEW_CONTACT) { 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; } } return true; } Loading
src/com/android/contacts/group/GroupUtil.java +0 −18 Original line number Diff line number Diff line Loading @@ -49,9 +49,6 @@ import java.util.Set; @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")); Loading Loading @@ -142,21 +139,6 @@ public final class GroupUtil { return intent; } /** * 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". Loading
src/com/android/contacts/list/ContactsIntentResolver.java +3 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.contacts.list; import android.accounts.Account; import android.app.Activity; import android.app.SearchManager; import android.content.Intent; Loading Loading @@ -131,6 +130,9 @@ public class ContactsIntentResolver { } } 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 Loading