/cts/tests/tests/permission2/src/android/permission2/cts/ |
ContactsProviderTest.java | 27 * Verify that deprecated contacts permissions are not enforced. 33 * Verifies that query(ContactsContract.Contacts.CONTENT_URI) only requires 38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, 43 * Verifies that insert(ContactsContract.Contacts.CONTENT_URI) only requires 49 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, 52 fail("insert(ContactsContract.Contacts.CONTENT_URI) threw SecurityException");
|
/development/samples/BusinessCard/src/com/example/android/businesscard/ |
ContactAccessorSdk3_4.java | 24 import android.provider.Contacts.People; 25 import android.provider.Contacts.People.Phones; 28 * An implementation of {@link ContactAccessor} that uses legacy Contacts API.
|
/packages/apps/Contacts/src/com/android/contacts/compat/ |
AggregationSuggestionsCompat.java | 17 package com.android.contacts.compat; 82 android.net.Uri.Builder builder = ContactsContract.Contacts.CONTENT_URI.buildUpon(); 84 builder.appendPath(ContactsContract.Contacts.AggregationSuggestions.CONTENT_DIRECTORY);
|
/packages/apps/Dialer/java/com/android/dialer/blocking/ |
FilteredNumbersUtil.java | 25 import android.provider.ContactsContract.Contacts; 69 /** Checks if there exists a contact with {@code Contacts.SEND_TO_VOICEMAIL} set to true. */ 84 Contacts.CONTENT_URI, 113 * Blocks all the phone numbers of any contacts marked as SEND_TO_VOICEMAIL, then clears the 114 * SEND_TO_VOICEMAIL flag on those contacts. 130 // Get the phone number of contacts marked as SEND_TO_VOICEMAIL. 160 // Clear SEND_TO_VOICEMAIL on all contacts. The setting has been imported to Dialer. 162 newValues.put(Contacts.SEND_TO_VOICEMAIL, 0); 166 Contacts.CONTENT_URI, 333 static final String[] PROJECTION = {Contacts._ID} [all...] |
/packages/apps/Dialer/java/com/android/dialer/phonenumbercache/ |
PhoneQuery.java | 24 import android.provider.ContactsContract.Contacts; 42 Contacts.DISPLAY_NAME_ALTERNATIVE,
|
/packages/experimental/LoaderApp/src/com/android/loaderapp/model/ |
ContactLoader.java | 18 import android.provider.ContactsContract.Contacts; 66 mLookupUri = Contacts.getLookupUri(resolver, mLookupUri); 68 contactUri = Contacts.lookupContact(resolver, mLookupUri); 78 final Uri dataUri = Uri.withAppendedPath(contactUri, Contacts.Data.CONTENT_DIRECTORY); 100 Contacts.NAME_RAW_CONTACT_ID, Contacts.DISPLAY_NAME_SOURCE 106 .getColumnIndex(Contacts.NAME_RAW_CONTACT_ID)); 108 .getColumnIndex(Contacts.DISPLAY_NAME_SOURCE)); 115 // Read the constituent raw contacts
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
ContactsManagerTest.java | 25 import android.provider.ContactsContract.Contacts; 77 mFakeContactsContentProvider.addQueryResult(Contacts.CONTENT_URI, mMatrixCursor); 79 final ArrayList<String> validNames = mManager.getValidNames(Contacts.CONTENT_URI); 92 mFakeContactsContentProvider.addQueryResult(Contacts.CONTENT_URI, mMatrixCursor); 94 final ArrayList<String> validNames = mManager.getValidNames(Contacts.CONTENT_URI); 109 mFakeContactsContentProvider.addQueryResult(Contacts.CONTENT_URI, mMatrixCursor); 111 Cursor cursor = mFakeContactsContentProvider.query(Contacts.CONTENT_URI, 127 mFakeContactsContentProvider.addQueryResult(Contacts.CONTENT_URI, mMatrixCursor);
|
ContactsContentObserverTest.java | 26 import android.provider.ContactsContract.Contacts; 75 when(mMockManager.getValidNames(eq(Contacts.CONTENT_URI))).thenReturn(STALE_NAMES_LIST); 90 when(mMockManager.getValidNames(eq(Contacts.CONTENT_URI))).thenReturn(UPDATED_NAMES_LIST);
|
/developers/build/prebuilts/gradle/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/contacts/ |
ContactsFragment.java | 17 package com.example.android.system.runtimepermissions.contacts; 45 * This Fragment is only used to illustrate that access to the Contacts ContentProvider API has 50 * This fragments demonstrates a basic use case for accessing the Contacts Provider. The 52 * https://developer.android.com/training/contacts-provider/retrieve-names.html 56 private static final String TAG = "Contacts"; 60 private static final String[] PROJECTION = {ContactsContract.Contacts._ID, 61 ContactsContract.Contacts.DISPLAY_NAME_PRIMARY}; 65 private static final String ORDER = ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + " ASC"; 107 * Restart the Loader to query the Contacts content provider to display the first contact. 118 return new CursorLoader(getActivity(), ContactsContract.Contacts.CONTENT_URI, PROJECTION [all...] |
/developers/samples/android/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/contacts/ |
ContactsFragment.java | 17 package com.example.android.system.runtimepermissions.contacts; 45 * This Fragment is only used to illustrate that access to the Contacts ContentProvider API has 50 * This fragments demonstrates a basic use case for accessing the Contacts Provider. The 52 * https://developer.android.com/training/contacts-provider/retrieve-names.html 56 private static final String TAG = "Contacts"; 60 private static final String[] PROJECTION = {ContactsContract.Contacts._ID, 61 ContactsContract.Contacts.DISPLAY_NAME_PRIMARY}; 65 private static final String ORDER = ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + " ASC"; 107 * Restart the Loader to query the Contacts content provider to display the first contact. 118 return new CursorLoader(getActivity(), ContactsContract.Contacts.CONTENT_URI, PROJECTION [all...] |
/development/samples/training/ContactsList/src/com/example/android/contactslist/ui/ |
ContactsListFragment.java | 31 import android.provider.ContactsContract.Contacts; 32 import android.provider.ContactsContract.Contacts.Photo; 70 * This fragment displays a list of contacts stored in the Contacts Provider. Each item in the list 75 * This Fragment retrieves contacts based on a search string. If the user doesn't enter a search 76 * string, then the list contains all the contacts in the Contacts Provider. If the user enters a 77 * search string, then the list contains only those contacts whose data matches the string. The 78 * Contacts Provider itself controls the matching algorithm, which is a "substring" search: if the 79 * search string is a substring of any of the contacts data, then there is a match [all...] |
/developers/build/prebuilts/gradle/RuntimePermissions/kotlinApp/app/src/main/java/com/example/android/system/runtimepermissions/contacts/ |
ContactsFragment.kt | 17 package com.example.android.system.runtimepermissions.contacts 41 * This Fragment is only used to illustrate that access to the Contacts ContentProvider API has 47 * This fragments demonstrates a basic use case for accessing the Contacts Provider. The 49 * https://developer.android.com/training/contacts-provider/retrieve-names.html 64 * Restart the Loader to query the Contacts content provider to display the first contact. 74 CursorLoader(activity, ContactsContract.Contacts.CONTENT_URI, PROJECTION, null, null, 85 val name = getString(getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)) 98 * Accesses the Contacts content provider directly to insert a new contact. 140 @JvmField val PROJECTION = arrayOf(ContactsContract.Contacts._ID, 141 ContactsContract.Contacts.DISPLAY_NAME_PRIMARY [all...] |
/developers/samples/android/system/RuntimePermissions/kotlinApp/app/src/main/java/com/example/android/system/runtimepermissions/contacts/ |
ContactsFragment.kt | 17 package com.example.android.system.runtimepermissions.contacts 41 * This Fragment is only used to illustrate that access to the Contacts ContentProvider API has 47 * This fragments demonstrates a basic use case for accessing the Contacts Provider. The 49 * https://developer.android.com/training/contacts-provider/retrieve-names.html 64 * Restart the Loader to query the Contacts content provider to display the first contact. 74 CursorLoader(activity, ContactsContract.Contacts.CONTENT_URI, PROJECTION, null, null, 85 val name = getString(getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)) 98 * Accesses the Contacts content provider directly to insert a new contact. 140 @JvmField val PROJECTION = arrayOf(ContactsContract.Contacts._ID, 141 ContactsContract.Contacts.DISPLAY_NAME_PRIMARY [all...] |
/packages/apps/Contacts/tests/src/com/android/contacts/ |
DynamicShortcutsTests.java | 16 package com.android.contacts; 30 import android.provider.ContactsContract.Contacts; 36 import com.android.contacts.test.mocks.MockContentProvider; 94 assertEquals(Contacts.getLookupUri(1, "lookup_key"), shortcut.getIntent().getData()); 99 assertEquals(1l, shortcut.getExtras().getLong(Contacts._ID)); 145 queryForSingleRow(Contacts.getLookupUri(1l, "key1"), 11l, "key1", "New Name1"), 146 queryForSingleRow(Contacts.getLookupUri(2l, "key2"), 2l, "key2", "name2"), 147 queryForSingleRow(Contacts.getLookupUri(3l, "key3"), 33l, "key3", "name3") 174 queryFor(Contacts.CONTENT_STREQUENT_URI, 198 queryFor(Contacts.CONTENT_STREQUENT_URI [all...] |
/packages/apps/Contacts/src/com/android/contacts/model/ |
ContactLoader.java | 17 package com.android.contacts.model; 33 import android.provider.ContactsContract.Contacts; 41 import com.android.contacts.GeoUtil; 42 import com.android.contacts.GroupMetaDataLoader; 43 import com.android.contacts.compat.CompatUtils; 44 import com.android.contacts.group.GroupMetaData; 45 import com.android.contacts.model.account.AccountType; 46 import com.android.contacts.model.account.AccountTypeWithDataSet; 47 import com.android.contacts.model.dataitem.DataItem; 48 import com.android.contacts.model.dataitem.PhoneDataItem [all...] |
/packages/apps/Dialer/java/com/android/contacts/common/model/ |
ContactLoader.java | 17 package com.android.contacts.common.model; 33 import android.provider.ContactsContract.Contacts; 39 import com.android.contacts.common.GroupMetaData; 40 import com.android.contacts.common.model.account.AccountType; 41 import com.android.contacts.common.model.account.AccountTypeWithDataSet; 42 import com.android.contacts.common.model.dataitem.DataItem; 43 import com.android.contacts.common.model.dataitem.PhoneDataItem; 44 import com.android.contacts.common.model.dataitem.PhotoDataItem; 45 import com.android.contacts.common.util.Constants; 46 import com.android.contacts.common.util.ContactLoaderUtils [all...] |
/packages/apps/Bluetooth/src/com/android/bluetooth/map/ |
SmsMmsContacts.java | 23 import android.provider.ContactsContract.Contacts; 56 private static final String[] CONTACT_PROJECTION = {Contacts._ID, Contacts.DISPLAY_NAME}; 57 private static final String CONTACT_SEL_VISIBLE = Contacts.IN_VISIBLE_GROUP + "=1"; 59 Arrays.asList(CONTACT_PROJECTION).indexOf(Contacts._ID); 61 Arrays.asList(CONTACT_PROJECTION).indexOf(Contacts.DISPLAY_NAME); 64 * Get a contacts phone number based on the canonical addresses id of the contact. 150 * Lookup a contacts name in the Android Contacts database. 183 selection += "AND " + ContactsContract.Contacts.DISPLAY_NAME + " like ?" [all...] |
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
GlobalSearchSupport.java | 17 package com.android.providers.contacts; 29 import android.provider.ContactsContract.Contacts; 36 import com.android.providers.contacts.ContactsDatabaseHelper.AggregatedPresenceColumns; 37 import com.android.providers.contacts.ContactsDatabaseHelper.ContactsColumns; 38 import com.android.providers.contacts.ContactsDatabaseHelper.Tables; 39 import com.android.providers.contacts.ContactsDatabaseHelper.Views; 44 * Support for global search integration for Contacts. 146 return Contacts.getLookupUri(contactId, lookupKey).toString(); 230 + Contacts._ID + ", " 231 + Contacts.LOOKUP_KEY + ", [all...] |
/cts/tests/tests/permission/src/android/permission/cts/ |
ProviderPermissionTest.java | 27 import android.provider.Contacts; 46 assertReadingContentUriRequiresPermission(Contacts.People.CONTENT_URI, 56 assertWritingContentUriRequiresPermission(Contacts.People.CONTENT_URI,
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
LegacyPostalAddressListAdapter.java | 16 package com.android.contacts.list; 23 import android.provider.Contacts.ContactMethods; 24 import android.provider.Contacts.People; 63 loader.setSelection(ContactMethods.KIND + "=" + android.provider.Contacts.KIND_POSTAL);
|
/packages/apps/Dialer/java/com/android/dialer/shortcuts/ |
ShortcutUsageReporter.java | 29 import android.provider.ContactsContract.Contacts; 60 * <p>Asynchronously queries the contacts database for the contact's lookup key which corresponds 122 .query(uri, new String[] {Contacts.LOOKUP_KEY}, null, null, null)) { 128 return cursor.getString(cursor.getColumnIndex(Contacts.LOOKUP_KEY));
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
ContactsContentObserver.java | 24 import android.provider.ContactsContract.Contacts; 36 * A content observer that listens to updates to content provider {@link Contacts#CONTENT_URI}. 56 Log.i(TAG, "No permission to read contacts. Not registering the observer."); 57 // do nothing if we do not have the permission to read contacts. 73 contentResolver.registerContentObserver(Contacts.CONTENT_URI, true, mContentObserver); 80 Log.i(TAG, "No permission to read contacts. Not updating the contacts."); 93 Log.d(TAG, "run() : Contacts have changed. Notifying listeners."); 103 Log.i(TAG, "No permission to read contacts. Marking contacts as not changed.") [all...] |
/packages/experimental/LoaderApp/src/com/android/loaderapp/ |
ContactHeaderWidget.java | 34 import android.provider.ContactsContract.Contacts; 96 Contacts._ID, 97 Contacts.LOOKUP_KEY, 98 Contacts.PHOTO_ID, 99 Contacts.DISPLAY_NAME, 100 Contacts.PHONETIC_NAME, 101 Contacts.STARRED, 102 Contacts.CONTACT_PRESENCE, 103 Contacts.CONTACT_STATUS, 104 Contacts.CONTACT_STATUS_TIMESTAMP [all...] |
/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
ContactsContract_StructuredPhoneticName.java | 17 package android.provider.cts.contacts; 26 import android.provider.ContactsContract.Contacts; 30 import android.provider.cts.contacts.ContactsContract_TestDataBuilder.TestContact; 31 import android.provider.cts.contacts.ContactsContract_TestDataBuilder.TestData; 32 import android.provider.cts.contacts.ContactsContract_TestDataBuilder.TestRawContact; 71 contact.assertColumn(Contacts.DISPLAY_NAME_SOURCE, 103 // Execute: aggregate the two raw contacts together 107 // Sanity check: two contacts are aggregated 114 contact.assertColumn(Contacts.DISPLAY_NAME, "name"); 140 // Execute: aggregate the two raw contacts togethe [all...] |
Contacts_OrganizationsTest.java | 17 package android.provider.cts.contacts; 20 import android.provider.Contacts.Organizations;
|