Home
last modified time | relevance | path

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

12

/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContract_RawContactsTest.java34 private ContentResolver mResolver; field in ContactsContract_RawContactsTest
73 mResolver = getContext().getContentResolver(); in setUp()
75 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
98 Uri lookupUri = RawContacts.getContactLookupUri(mResolver, rawContact.getUri()); in testGetLookupUriBySourceId()
115 Uri lookupUri = RawContacts.getContactLookupUri(mResolver, rawContact.getUri()); in testGetLookupUriByDisplayName()
124 long rawContactid = RawContactUtil.insertRawContact(mResolver, in testRawContactDelete_setsDeleteFlag()
127 assertTrue(RawContactUtil.rawContactExistsById(mResolver, rawContactid)); in testRawContactDelete_setsDeleteFlag()
129 RawContactUtil.delete(mResolver, rawContactid, false); in testRawContactDelete_setsDeleteFlag()
135 String[] result = RawContactUtil.queryByRawContactId(mResolver, rawContactid, in testRawContactDelete_setsDeleteFlag()
145 long rawContactid = RawContactUtil.insertRawContact(mResolver, in testRawContactDelete_removesRecord()
[all …]
DContactsContract_PhotoTest.java43 private ContentResolver mResolver; field in ContactsContract_PhotoTest
50 mResolver = mContext.getContentResolver(); in setUp()
52 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
66 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri())); in testAddPhoto()
67 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), true)); in testAddPhoto()
68 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), false)); in testAddPhoto()
78 assertPhotoStream(Contacts.openContactPhotoInputStream(mResolver, contact.getUri())); in testAddPhoto()
79 assertPhotoStream(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), true)); in testAddPhoto()
80 assertPhotoStream(Contacts.openContactPhotoInputStream(mResolver, contact.getUri(), false)); in testAddPhoto()
87 assertNull(Contacts.openContactPhotoInputStream(mResolver, contact.getUri())); in testAddEmptyPhoto()
[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_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 …]
DContactsContract_ContactsTest.java44 private ContentResolver mResolver; field in ContactsContract_ContactsTest
50 mResolver = getContext().getContentResolver(); in setUp()
52 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
75 Contacts.markAsContacted(mResolver, contact.getId()); in testMarkAsContacted()
89 Contacts.markAsContacted(mResolver, contact.getId()); in testMarkAsContacted()
103 Contacts.markAsContacted(mResolver, contact.getId()); in testMarkAsContacted()
144 Uri lookupUri2 = Contacts.getLookupUri(mResolver, contactUri); in testLookupUri()
147 Uri contactUri2 = Contacts.lookupContact(mResolver, lookupUri); in testLookupUri()
152 DatabaseAsserts.assertInsertIsUnsupported(mResolver, Contacts.CONTENT_URI); in testInsert_isUnsupported()
162 DatabaseAsserts.assertHasDeleteLogGreaterThan(mResolver, ids.mContactId, start); in testContactDelete_hasDeleteLog()
[all …]
DContactsContract_DataUsageTest.java34 private ContentResolver mResolver; field in ContactsContract_DataUsageTest
39 mResolver = getContext().getContentResolver(); in setUp()
43 DatabaseAsserts.ContactIdPair ids = DatabaseAsserts.assertAndCreateContact(mResolver); in testSingleDataUsageFeedback_incrementsCorrectDataItems()
88 RawContactUtil.delete(mResolver, ids.mRawContactId, true); in testSingleDataUsageFeedback_incrementsCorrectDataItems()
92 DatabaseAsserts.ContactIdPair ids = DatabaseAsserts.assertAndCreateContact(mResolver); in testMultiIdDataUsageFeedback_incrementsCorrectDataItems()
120 RawContactUtil.delete(mResolver, ids.mRawContactId, true); in testMultiIdDataUsageFeedback_incrementsCorrectDataItems()
126 dataIds[0] = DataUtil.insertPhoneNumber(mResolver, rawContactId, "555-5555"); in setupRawContactDataItems()
127 dataIds[1] = DataUtil.insertPhoneNumber(mResolver, rawContactId, "555-5554"); in setupRawContactDataItems()
128 dataIds[2] = DataUtil.insertEmail(mResolver, rawContactId, "test@thisisfake.com"); in setupRawContactDataItems()
129 dataIds[3] = DataUtil.insertPhoneNumber(mResolver, rawContactId, "555-5556"); in setupRawContactDataItems()
[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.java30 private ContentResolver mResolver; field in ContactsContract_StreamItemPhotosTest
39 mResolver = mContext.getContentResolver(); in setUp()
41 long rawContactId = ContactsContract_StreamItemsTest.insertRawContact(mResolver); in setUp()
42 mStreamItemUri = ContactsContract_StreamItemsTest.insertViaContentDirectoryUri(mResolver, in setUp()
57 Uri uri = mResolver.insert(insertUri, values); in testContentDirectoryUri()
70 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_AllUriTest.java183 private ContentResolver mResolver; field in ContactsContract_AllUriTest
192 mResolver = getContext().getContentResolver(); in setUp()
272 try (Cursor c = mResolver.query(uri, in getColumns()
286 try (Cursor c = mResolver.query(uri, projection, selection, in checkQueryExecutable()
295 try (Cursor c = mResolver.query(uri, projection, selection, in checkQueryExecutable()
304 try (Cursor c = mResolver.query( in checkQueryExecutable()
316 try (Cursor c = mResolver.query( in checkQueryExecutable()
334 try (Cursor c = mResolver.query(uri, projection, selection, in checkQueryNotExecutable()
530 try (Cursor c = mResolver.query( in checkColumnAccessible()
554 try (Cursor c = mResolver.query(uri, projection, selection, in checkColumnNotAccessibleInner()
[all …]
DContactsContract_ProviderStatus.java38 private ContentResolver mResolver; field in ContactsContract_ProviderStatus
44 mResolver = getContext().getContentResolver(); in setUp()
46 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
68 Cursor cursor = mResolver.query(ProviderStatus.CONTENT_URI, null, null, null, null); in testProviderStatus_addedContacts()
DContactsContract_AggregationSuggestionsTest.java39 private ContentResolver mResolver; field in ContactsContract_AggregationSuggestionsTest
45 mResolver = getContext().getContentResolver(); in setUp()
47 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
67 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByNameReversed()
89 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByName()
110 Cursor cursor = mResolver.query( in testAggregationSuggestionsByName_noMatch()
127 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByName_matchSecondNameParameter()
148 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); in testAggregationSuggestionsByName_matchFirstNameParameter()
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_StructuredPhoneticName.java39 private ContentResolver mResolver; field in ContactsContract_StructuredPhoneticName
45 mResolver = getContext().getContentResolver(); in setUp()
47 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
104 ContactUtil.setAggregationException(mResolver, AggregationExceptions.TYPE_KEEP_TOGETHER, in testPhoneticStructuredName_phoneticPriority1()
141 ContactUtil.setAggregationException(mResolver, AggregationExceptions.TYPE_KEEP_TOGETHER, in testPhoneticStructuredName_phoneticPriority2()
DContactsContract_FrequentsStrequentsTest.java43 private ContentResolver mResolver; field in ContactsContract_FrequentsStrequentsTest
145 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
147 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
259 DatabaseAsserts.checkProjection(mResolver, Contacts.CONTENT_STREQUENT_URI, in testStrequents_projection()
265 DatabaseAsserts.checkProjection(mResolver, in testStrequents_projection()
323 DatabaseAsserts.checkProjection(mResolver, uri, in testStrequents_phoneOnly_projection()
357 DatabaseAsserts.checkProjection(mResolver, Contacts.CONTENT_FREQUENT_URI, in testFrequent_projection()
388 DatabaseAsserts.assertStoredValuesInUriMatchExactly(mResolver, uri, null, sb.toString(), in assertCursorStoredValuesWithContactsFilter()
401 mResolver.update(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), values, in starContact()
418 mResolver.update(uri, new ContentValues(), null, null); in markDataAsUsed()
DContactsContract_DataTest.java50 private ContentResolver mResolver; field in ContactsContract_DataTest
196 mResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp()
198 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
221 Uri lookupUri = Data.getContactLookupUri(mResolver, data.getUri()); in testGetLookupUriBySourceId()
239 DatabaseAsserts.checkProjection(mResolver, Data.CONTENT_URI, in testDataProjection()
255 DatabaseAsserts.checkProjection(mResolver, RawContactsEntity.CONTENT_URI, in testRawContactsEntityProjection()
318 DatabaseAsserts.checkProjection(mResolver, Contacts.CONTENT_URI.buildUpon().appendPath( in testEntityProjection()
420 Uri lookupUri = Data.getContactLookupUri(mResolver, data.getUri()); in testGetLookupUriByDisplayName()
459 DatabaseAsserts.assertStoredValuesInUriMatchExactly(mResolver, contentUri, null, in testContactablesUri()
571 DatabaseAsserts.ContactIdPair ids = DatabaseAsserts.assertAndCreateContact(mResolver); in testDataInsert_updatesContactLastUpdatedTimestamp()
[all …]
DContactsContract_DirectoryTest.java39 private ContentResolver mResolver; field in ContactsContract_DirectoryTest
49 mResolver = getContext().getContentResolver(); in setUp()
100 assertEquals(Directory.CONTENT_TYPE, mResolver.getType(Directory.CONTENT_URI)); in testQueryParameters()
101 assertEquals(Directory.CONTENT_ITEM_TYPE, mResolver.getType( in testQueryParameters()
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_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()
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_FilesTest.java46 private ContentResolver mResolver; field in MediaStore_FilesTest
51 mResolver = mContext.getContentResolver(); in setUp()
63 mResolver.delete(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, in cleanup()
66 mResolver.delete(MediaStore.Files.getContentUri("external"), in cleanup()
103 mResolver.insert(allFilesUri, values); in testGetContentUri()
113 Uri fileUri = mResolver.insert(allFilesUri, values); in testGetContentUri()
131 assertEquals(1, mResolver.update(fileUri, values, null, null)); in testGetContentUri()
135 Uri foo = mResolver.insert(allFilesUri, values); in testGetContentUri()
139 assertEquals(1, mResolver.delete(fileUri, null, null)); in testGetContentUri()
143 Cursor cursor = mResolver.query(fileUri, null, null, null, null); in testGetContentUri()
[all …]
DMediaStore_Video_ThumbnailsTest.java45 private ContentResolver mResolver; field in MediaStore_Video_ThumbnailsTest
57 mResolver = mContext.getContentResolver(); in setUp()
88 assertNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MINI_KIND, null)); in testGetThumbnail()
94 assertNotNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MINI_KIND, null)); in testGetThumbnail()
95 assertNotNull(Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.MICRO_KIND, null)); in testGetThumbnail()
98 Thumbnails.getThumbnail(mResolver, videoId, Thumbnails.FULL_SCREEN_KIND, null); in testGetThumbnail()
108 Cursor c = mResolver.query(Thumbnails.EXTERNAL_CONTENT_URI, in testGetThumbnail()
118 mResolver.delete(ContentUris.withAppendedId(Thumbnails.EXTERNAL_CONTENT_URI, id), in testGetThumbnail()
124 assertEquals(1, mResolver.delete(videoUri, null, null)); in testGetThumbnail()
139 Thumbnails.getThumbnail(mResolver, Long.valueOf(uri.getLastPathSegment()), in testThumbnailGenerationAndCleanup()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/contacts/account/
DContactsContract_Subquery.java30 private ContentResolver mResolver; field in ContactsContract_Subquery
36 mResolver = getContext().getContentResolver(); in setUp()
38 mResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp()
56 try (Cursor cursor = mResolver.query(Contacts.CONTENT_URI, null, null, null, null)) { in testProviderStatus_addedContacts()
61 try (Cursor cursor = mResolver.query(Contacts.CONTENT_URI, null, in testProviderStatus_addedContacts()
67 try (Cursor cursor = mResolver.query(Contacts.CONTENT_URI, null, in testProviderStatus_addedContacts()
/cts/tests/autofillservice/src/android/autofillservice/cts/common/
DOneTimeSettingsListener.java38 private final ContentResolver mResolver; field in OneTimeSettingsListener
48 mResolver = context.getContentResolver(); in OneTimeSettingsListener()
60 mResolver.registerContentObserver(uri, false, this); in OneTimeSettingsListener()
65 mResolver.unregisterContentObserver(this); in onChange()
/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 …]

12