Home
last modified time | relevance | path

Searched refs:mResolver (Results 1 – 25 of 26) sorted by relevance

12

/cts/tests/tests/provider/src/android/provider/cts/
DContactsContract_RawContactsTest.java39 private ContentResolver mResolver; field in ContactsContract_RawContactsTest
78 mResolver = getContext().getContentResolver(); in setUp()
80 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
103 Uri lookupUri = RawContacts.getContactLookupUri(mResolver, rawContact.getUri()); in testGetLookupUriBySourceId()
120 Uri lookupUri = RawContacts.getContactLookupUri(mResolver, rawContact.getUri()); in testGetLookupUriByDisplayName()
129 long rawContactid = RawContactUtil.insertRawContact(mResolver, in testRawContactDelete_setsDeleteFlag()
132 assertTrue(RawContactUtil.rawContactExistsById(mResolver, rawContactid)); in testRawContactDelete_setsDeleteFlag()
134 RawContactUtil.delete(mResolver, rawContactid, false); in testRawContactDelete_setsDeleteFlag()
140 String[] result = RawContactUtil.queryByRawContactId(mResolver, rawContactid, in testRawContactDelete_setsDeleteFlag()
150 long rawContactid = RawContactUtil.insertRawContact(mResolver, in testRawContactDelete_removesRecord()
[all …]
DContactsContract_PhotoTest.java41 private ContentResolver mResolver; field in ContactsContract_PhotoTest
48 mResolver = mContext.getContentResolver(); in setUp()
50 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
64 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri())); in testAddPhoto()
65 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), true)); in testAddPhoto()
66 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), false)); in testAddPhoto()
76 assertPhotoStream(Contacts.openContactPhotoInputStream(mResolver, contact.getUri())); in testAddPhoto()
77 assertPhotoStream(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), true)); in testAddPhoto()
78 assertPhotoStream(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), false)); in testAddPhoto()
85 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri())); in testAddEmptyPhoto()
[all …]
DMediaStore_FilesTest.java48 private ContentResolver mResolver; field in MediaStore_FilesTest
53 mResolver = mContext.getContentResolver(); in setUp()
65 mResolver.delete(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, in cleanup()
101 mResolver.insert(allFilesUri, values); in testGetContentUri()
111 Uri fileUri = mResolver.insert(allFilesUri, values); in testGetContentUri()
129 assertEquals(1, mResolver.update(fileUri, values, null, null)); in testGetContentUri()
133 Uri foo = mResolver.insert(allFilesUri, values); in testGetContentUri()
137 assertEquals(1, mResolver.delete(fileUri, null, null)); in testGetContentUri()
141 Cursor cursor = mResolver.query(fileUri, null, null, null, null); in testGetContentUri()
153 fileUri = mResolver.insert(allFilesUri, values); in testGetContentUri()
[all …]
DContactsContract_PinnedPositionsTest.java48 private ContentResolver mResolver; field in ContactsContract_PinnedPositionsTest
53 mResolver = getContext().getContentResolver(); in setUp()
62 final DatabaseAsserts.ContactIdPair i1 = DatabaseAsserts.assertAndCreateContact(mResolver); in testPinnedPositionsUpdate()
63 final DatabaseAsserts.ContactIdPair i2 = DatabaseAsserts.assertAndCreateContact(mResolver); in testPinnedPositionsUpdate()
64 final DatabaseAsserts.ContactIdPair i3 = DatabaseAsserts.assertAndCreateContact(mResolver); in testPinnedPositionsUpdate()
65 final DatabaseAsserts.ContactIdPair i4 = DatabaseAsserts.assertAndCreateContact(mResolver); in testPinnedPositionsUpdate()
88 applyBatch(mResolver, operations); in testPinnedPositionsUpdate()
109 applyBatch(mResolver, operations); in testPinnedPositionsUpdate()
129 ContactUtil.delete(mResolver, i1.mContactId); in testPinnedPositionsUpdate()
130 ContactUtil.delete(mResolver, i2.mContactId); in testPinnedPositionsUpdate()
[all …]
DContactsContract_DataUsageTest.java33 private ContentResolver mResolver; field in ContactsContract_DataUsageTest
38 mResolver = getContext().getContentResolver(); in setUp()
42 DatabaseAsserts.ContactIdPair ids = DatabaseAsserts.assertAndCreateContact(mResolver); in testSingleDataUsageFeedback_incrementsCorrectDataItems()
58 RawContactUtil.delete(mResolver, ids.mRawContactId, true); in testSingleDataUsageFeedback_incrementsCorrectDataItems()
62 DatabaseAsserts.ContactIdPair ids = DatabaseAsserts.assertAndCreateContact(mResolver); in testMultiIdDataUsageFeedback_incrementsCorrectDataItems()
81 RawContactUtil.delete(mResolver, ids.mRawContactId, true); in testMultiIdDataUsageFeedback_incrementsCorrectDataItems()
87 dataIds[0] = DataUtil.insertPhoneNumber(mResolver, rawContactId, "555-5555"); in setupRawContactDataItems()
88 dataIds[1] = DataUtil.insertPhoneNumber(mResolver, rawContactId, "555-5554"); in setupRawContactDataItems()
89 dataIds[2] = DataUtil.insertEmail(mResolver, rawContactId, "test@thisisfake.com"); in setupRawContactDataItems()
90 dataIds[3] = DataUtil.insertPhoneNumber(mResolver, rawContactId, "555-5556"); in setupRawContactDataItems()
[all …]
DContactsContract_ContactsTest.java45 private ContentResolver mResolver; field in ContactsContract_ContactsTest
51 mResolver = getContext().getContentResolver(); in setUp()
53 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
70 Contacts.markAsContacted(mResolver, contact.getId()); in testMarkAsContacted()
77 Contacts.markAsContacted(mResolver, contact.getId()); in testMarkAsContacted()
111 Uri lookupUri2 = Contacts.getLookupUri(mResolver, contactUri);
114 Uri contactUri2 = Contacts.lookupContact(mResolver, lookupUri);
119 DatabaseAsserts.assertInsertIsUnsupported(mResolver, Contacts.CONTENT_URI);
129 DatabaseAsserts.assertHasDeleteLogGreaterThan(mResolver, ids.mContactId, start);
132 RawContactUtil.delete(mResolver, ids.mRawContactId, true);
[all …]
DContactsContract_DeletedContacts.java40 private ContentResolver mResolver; field in ContactsContract_DeletedContacts
44 mResolver = getContext().getContentResolver(); in setUp()
49 DatabaseAsserts.assertDeleteIsUnsupported(mResolver, URI); in testDelete_isUnsupported()
52 DatabaseAsserts.assertDeleteIsUnsupported(mResolver, uri); in testDelete_isUnsupported()
56 DatabaseAsserts.assertInsertIsUnsupported(mResolver, URI); in testInsert_isUnsupported()
67 List<String[]> records = DeletedContactUtil.query(mResolver, projection); in testQuery_returnsProperColumns()
82 DeletedContactUtil.queryDeletedTimestampForContactId(mResolver, ids.mContactId)); in testQueryByContactId()
90 long startCount = DeletedContactUtil.getCount(mResolver); in testQueryAll()
96 long endCount = DeletedContactUtil.getCount(mResolver); in testQueryAll()
120 List<String[]> records = DeletedContactUtil.querySinceTimestamp(mResolver, projection, in testQuerySinceTimestamp()
[all …]
DMediaStore_Video_ThumbnailsTest.java43 private ContentResolver mResolver; field in MediaStore_Video_ThumbnailsTest
54 mResolver = mContext.getContentResolver(); in setUp()
85 assertNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MINI_KIND, null)); in testGetThumbnail()
91 assertNotNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MINI_KIND, null)); in testGetThumbnail()
92 assertNotNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MICRO_KIND, null)); in testGetThumbnail()
95 Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.FULL_SCREEN_KIND, null); in testGetThumbnail()
105 Cursor c = mResolver.query(Thumbnails.EXTERNAL_CONTENT_URI, in testGetThumbnail()
115 mResolver.delete(ContentUris.withAppendedId(Thumbnails.EXTERNAL_CONTENT_URI, id), in testGetThumbnail()
121 assertEquals(1, mResolver.delete(videoUri, null, null)); in testGetThumbnail()
127 mResolver.delete(Media.EXTERNAL_CONTENT_URI, in insertVideo()
[all …]
DContactsContract_DumpFileProviderTest.java43 private ContentResolver mResolver; field in ContactsContract_DumpFileProviderTest
48 mResolver = getContext().getContentResolver(); in setUp()
62 mResolver.openFileDescriptor(uri, "r"); in testOpenFileDescriptor_worksWithValidFileName()
79 mResolver.query(uri, null, null, null, null); in testQuery_worksWithValidFileName()
85 mResolver.query(uri, null, null, null, null); in assertQueryThrowsError()
96 mResolver.openFileDescriptor(uri, "r"); in assertOpenFileDescriptorThrowsError()
DContactsContract_StreamItemPhotosTest.java29 private ContentResolver mResolver; field in ContactsContract_StreamItemPhotosTest
38 mResolver = mContext.getContentResolver(); in setUp()
40 long rawContactId = ContactsContract_StreamItemsTest.insertRawContact(mResolver); in setUp()
41 mStreamItemUri = ContactsContract_StreamItemsTest.insertViaContentDirectoryUri(mResolver, in setUp()
56 Uri uri = mResolver.insert(insertUri, values); in testContentDirectoryUri()
69 Uri uri = mResolver.insert(StreamItems.CONTENT_PHOTO_URI, values); in testContentPhotoUri()
DContactsProvider2_AccountRemovalTest.java56 private ContentResolver mResolver; field in ContactsProvider2_AccountRemovalTest
62 mResolver = getContext().getContentResolver(); in setUp()
120 long baseTime = ContactUtil.queryContactLastUpdatedTimestamp(mResolver, contactId); in testAccountRemovalWithMergedContact_doesNotDeleteContactAndTimestampUpdated()
124 while (ContactUtil.queryContactLastUpdatedTimestamp(mResolver, contactId) == baseTime) { in testAccountRemovalWithMergedContact_doesNotDeleteContactAndTimestampUpdated()
141 ContactIdPair ids1 = DatabaseAsserts.assertAndCreateContactWithName(mResolver, acct, in createAndAssertMergedContact()
143 DataUtil.insertPhoneNumber(mResolver, ids1.mRawContactId, "555-5555"); in createAndAssertMergedContact()
145 ContactIdPair ids2 = DatabaseAsserts.assertAndCreateContactWithName(mResolver, acct2, in createAndAssertMergedContact()
147 DataUtil.insertPhoneNumber(mResolver, ids2.mRawContactId, "555-5555"); in createAndAssertMergedContact()
173 long contactId = RawContactUtil.queryContactIdByRawContactId(mResolver, rawContactId); in checkMerged()
174 long contactId2 = RawContactUtil.queryContactIdByRawContactId(mResolver, rawContactId2); in checkMerged()
[all …]
DContactsContract_ProviderStatus.java39 private ContentResolver mResolver; field in ContactsContract_ProviderStatus
45 mResolver = getContext().getContentResolver(); in setUp()
47 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
69 Cursor cursor = mResolver.query(ProviderStatus.CONTENT_URI, null, null, null, null); in testProviderStatus_addedContacts()
DContactsContract_AggregationSuggestionsTest.java40 private ContentResolver mResolver; field in ContactsContract_AggregationSuggestionsTest
46 mResolver = getContext().getContentResolver(); in setUp()
48 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
68 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByNameReversed()
90 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByName()
111 Cursor cursor = mResolver.query( in testAggregationSuggestionsByName_noMatch()
128 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByName_matchSecondNameParameter()
149 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByName_matchFirstNameParameter()
DContactsContract_StatusUpdatesTest.java39 private ContentResolver mResolver; field in ContactsContract_StatusUpdatesTest
45 mResolver = mContext.getContentResolver(); in setUp()
61 ContentProviderResult[] results = mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in setUp()
113 ContentProviderResult[] results = mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in insertStatusUpdate()
124 mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in assertRowCount()
134 mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in assertPresence()
144 mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in assertStatus()
148 Cursor cursor = mResolver.query(uri, null, null, null, null); in assertHasTimestamp()
DContactsContract_StreamItemsTest.java47 private ContentResolver mResolver; field in ContactsContract_StreamItemsTest
52 mResolver = mContext.getContentResolver(); in setUp()
56 long rawContactId = insertRawContact(mResolver); in testContentDirectoryUri()
57 Uri streamItemUri = insertViaContentDirectoryUri(mResolver, rawContactId); in testContentDirectoryUri()
80 assertEquals(1, mResolver.update(streamItemUri, values, null, null)); in testContentDirectoryUri()
129 ContentProviderResult[] results = mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in testContentUri()
155 results = mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in testContentUri()
169 Cursor cursor = mResolver.query(uri, null, null, null, null); in assertStreamItem()
DContactsContract_DataTest.java53 private ContentResolver mResolver; field in ContactsContract_DataTest
197 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
199 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
222 Uri lookupUri = Data.getContactLookupUri(mResolver, data.getUri()); in testGetLookupUriBySourceId()
240 DatabaseAsserts.checkProjection(mResolver, Data.CONTENT_URI, in testDataProjection()
256 DatabaseAsserts.checkProjection(mResolver, RawContactsEntity.CONTENT_URI, in testRawContactsEntityProjection()
317 DatabaseAsserts.checkProjection(mResolver, Contacts.CONTENT_URI.buildUpon().appendPath( in testEntityProjection()
417 Uri lookupUri = Data.getContactLookupUri(mResolver, data.getUri()); in testGetLookupUriByDisplayName()
456 DatabaseAsserts.assertStoredValuesInUriMatchExactly(mResolver, contentUri, null, in testContactablesUri()
537 DatabaseAsserts.ContactIdPair ids = DatabaseAsserts.assertAndCreateContact(mResolver); in testDataInsert_updatesContactLastUpdatedTimestamp()
[all …]
DContactsContract_StructuredPhoneticName.java39 private ContentResolver mResolver; field in ContactsContract_StructuredPhoneticName
45 mResolver = getContext().getContentResolver(); in setUp()
47 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
98 ContactUtil.setAggregationException(mResolver, AggregationExceptions.TYPE_KEEP_TOGETHER, in testPhoneticStructuredName_phoneticPriority1()
135 ContactUtil.setAggregationException(mResolver, AggregationExceptions.TYPE_KEEP_TOGETHER, in testPhoneticStructuredName_phoneticPriority2()
DContactsContract_IsSuperPrimaryName.java42 private ContentResolver mResolver; field in ContactsContract_IsSuperPrimaryName
48 mResolver = getContext().getContentResolver(); in setUp()
50 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
118 mResolver.update(nonPrimaryName.getUri(), values, null, null); in testInner_displayNameFromIsSuperPrimary()
175 mResolver.update(AggregationExceptions.CONTENT_URI, values, null, null); in setAggregationException()
DContactsContract_FrequentsStrequentsTest.java48 private ContentResolver mResolver; field in ContactsContract_FrequentsStrequentsTest
150 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
152 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
264 DatabaseAsserts.checkProjection(mResolver, Contacts.CONTENT_STREQUENT_URI, in testStrequents_projection()
270 DatabaseAsserts.checkProjection(mResolver, in testStrequents_projection()
328 DatabaseAsserts.checkProjection(mResolver, uri, in testStrequents_phoneOnly_projection()
362 DatabaseAsserts.checkProjection(mResolver, Contacts.CONTENT_FREQUENT_URI, in testFrequent_projection()
393 DatabaseAsserts.assertStoredValuesInUriMatchExactly(mResolver, uri, null, sb.toString(), in assertCursorStoredValuesWithContactsFilter()
406 mResolver.update(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), values, in starContact()
423 mResolver.update(uri, new ContentValues(), null, null); in markDataAsUsed()
DContactsContract_ContactCountsTest.java39 private ContentResolver mResolver; field in ContactsContract_ContactCountsTest
47 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
49 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
61 final Cursor cursor = mResolver.query(Contacts.CONTENT_URI, TEST_PROJECTION, in testContactCounts_noExtraNoExtrasReturned()
76 final Cursor cursor = mResolver.query(uri, TEST_PROJECTION, in testContactCounts_correctCountsReturned()
DContactsContract_PhoneLookup.java45 private ContentResolver mResolver; field in ContactsContract_PhoneLookup
51 mResolver = getContext().getContentResolver(); in setUp()
53 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
192 DatabaseAsserts.assertStoredValuesInUriMatchExactly(mResolver, uri, null, in assertCursorStoredValuesWithContactsFilter()
DContactsContract_SearchSnippetsTest.java42 private ContentResolver mResolver; field in ContactsContract_SearchSnippetsTest
68 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
70 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
205 DatabaseAsserts.assertStoredValuesInUriMatchExactly(mResolver, uri, TEST_PROJECTION, in assertCursorStoredValuesWithContactsFilter()
/cts/tests/tests/content/src/android/content/cts/
DContentQueryMapTest.java54 private ContentResolver mResolver; field in ContentQueryMapTest
63 mResolver = mContext.getContentResolver(); in setUp()
68 mResolver.insert(DummyProvider.CONTENT_URI, values0); in setUp()
73 mResolver.insert(DummyProvider.CONTENT_URI, values1); in setUp()
75 mCursor = mResolver.query(DummyProvider.CONTENT_URI, PROJECTIONS, null, null, null); in setUp()
90 mResolver.delete(DummyProvider.CONTENT_URI, null, null); in tearDown()
154 mResolver.update(DummyProvider.CONTENT_URI, values, in testRequery()
188 mResolver.update(DummyProvider.CONTENT_URI, values, in testSetKeepUpdated()
232 mResolver.insert(DummyProvider.CONTENT_URI, values); in testSetKeepUpdated()
260 mResolver.update(DummyProvider.CONTENT_URI, values, in testSetKeepUpdated()
[all …]
DAsyncQueryHandlerTest.java72 private ContentResolver mResolver; field in AsyncQueryHandlerTest
78 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
82 mResolver.insert(DummyProvider.CONTENT_URI, values0); in setUp()
86 mResolver.insert(DummyProvider.CONTENT_URI, values1); in setUp()
90 mResolver.insert(DummyProvider.CONTENT_URI, values2); in setUp()
95 mResolver.delete(DummyProvider.CONTENT_URI, null, null); in tearDown()
102 new AsyncQueryHandler(mResolver) {}; in testConstructor() argument
132 cursor = mResolver.query(DummyProvider.CONTENT_URI, PROJECTIONS, null, null, ORDER_BY); in testStartInsert()
207 cursor = mResolver.query(DummyProvider.CONTENT_URI, PROJECTIONS, null, null, ORDER_BY); in testStartUpdate()
247 cursor = mResolver.query(DummyProvider.CONTENT_URI, PROJECTIONS, null, null, ORDER_BY); in testStartDelete()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DContactsTest.java70 private ContentResolver mResolver; field in ContactsTest
107 mResolver = getContext().getContentResolver(); in setUp()
465 mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in insertContact()
480 Cursor cursor = mResolver.query(uri, in getContactInfoFromPhoneLookup()
503 Cursor cursor = mResolver.query(uri, in getContactInfoFromEmailUri()
562 mResolver.applyBatch(ContactsContract.AUTHORITY, ops); in removeAllTestContactsInProfile()
585 final InputStream is = mResolver.openInputStream(Uri.parse(uri)); in assertPhotoUriReadable()

12