Home
last modified time | relevance | path

Searched refs:CONTENT_URI (Results 1 – 25 of 108) sorted by relevance

12345

/cts/tests/tests/database/src/android/database/cts/
DContentObserverTest.java30 private static final Uri CONTENT_URI = Uri.parse("content://uri"); field in ContentObserverTest
80 contentObserver.dispatchChange(true, CONTENT_URI); in testContentObserverWithUri()
83 assertEquals(CONTENT_URI, contentObserver.getUri()); in testContentObserverWithUri()
89 contentObserver.dispatchChange(false, CONTENT_URI); in testContentObserverWithUri()
92 assertEquals(CONTENT_URI, contentObserver.getUri()); in testContentObserverWithUri()
103 contentObserver.dispatchChange(true, CONTENT_URI); in testContentObserverWithUri()
106 assertEquals(CONTENT_URI, contentObserver.getUri()); in testContentObserverWithUri()
112 contentObserver.dispatchChange(false, CONTENT_URI); in testContentObserverWithUri()
115 assertEquals(CONTENT_URI, contentObserver.getUri()); in testContentObserverWithUri()
132 observer.dispatchChange(false, Arrays.asList(CONTENT_URI), 0); in testDispatchChange_Completeness()
[all …]
DContentObservableTest.java26 private static final Uri CONTENT_URI = Uri.parse("content://uri"); field in ContentObservableTest
99 mContentObservable.dispatchChange(false, CONTENT_URI); in testDispatchChangeWithUri()
101 assertEquals(CONTENT_URI, mObserver.getUri()); in testDispatchChangeWithUri()
105 mContentObservable.dispatchChange(true, CONTENT_URI); in testDispatchChangeWithUri()
108 mContentObservable.dispatchChange(true, CONTENT_URI); in testDispatchChangeWithUri()
110 assertEquals(CONTENT_URI, mObserver.getUri()); in testDispatchChangeWithUri()
115 mContentObservable.dispatchChange(false, CONTENT_URI); in testDispatchChangeWithUri()
/cts/tests/tests/permission2/src/android/permission2/cts/
DContactsProviderTest.java38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts()
49 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts()
64 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile()
76 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile()
91 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile()
/cts/tests/tests/provider/src/android/provider/cts/
DBlockedNumberContractTest.java103 BlockedNumbers.CONTENT_URI, getContentValues("1234567890"))); in testProviderInteractionsAsRegularApp_fails()
109 mContentResolver.query(BlockedNumbers.CONTENT_URI, null, null, null, null); in testProviderInteractionsAsRegularApp_fails()
116 BlockedNumbers.CONTENT_URI, getContentValues("123"), null, null); in testProviderInteractionsAsRegularApp_fails()
138 mContentResolver.getType(BlockedNumbers.CONTENT_URI)); in testGetType()
141 ContentUris.withAppendedId(BlockedNumbers.CONTENT_URI, 0))); in testGetType()
240 ContentUris.withAppendedId(BlockedNumbers.CONTENT_URI, 1), in testInsert_failsWithInvalidInputs()
249 mContentResolver.insert(BlockedNumbers.CONTENT_URI, new ContentValues())); in testInsert_failsWithInvalidInputs()
258 mAddedUris.add(mContentResolver.insert(BlockedNumbers.CONTENT_URI, cv)); in testInsert_failsWithInvalidInputs()
267 mAddedUris.add(mContentResolver.insert(BlockedNumbers.CONTENT_URI, cv)); in testInsert_failsWithInvalidInputs()
282 BlockedNumbers.CONTENT_URI, getContentValues("123"), null, null); in testUpdate_isUnsupported()
[all …]
DSmsBackupRestoreTest.java113 mContentResolver.delete(Telephony.Sms.CONTENT_URI, SMS_SELECTION, smsAddressBody1); in clearMessages()
114 mContentResolver.delete(Telephony.Sms.CONTENT_URI, SMS_SELECTION, smsAddressBody2); in clearMessages()
116 mContentResolver.query(Telephony.Mms.CONTENT_URI, ID_PROJECTION, MMS_SELECTION, in clearMessages()
120 final Uri partUri = Telephony.Mms.CONTENT_URI.buildUpon() in clearMessages()
130 mContentResolver.delete(Telephony.Mms.CONTENT_URI, MMS_SELECTION, new String[]{mmsSubject}); in clearMessages()
150 mContentResolver.bulkInsert(Telephony.Sms.CONTENT_URI, smsContentValues); in testSmsBackupRestore()
166 mContentResolver.delete(Telephony.Sms.CONTENT_URI, SMS_SELECTION, smsAddressBody1)); in testSmsBackupRestore()
168 mContentResolver.delete(Telephony.Sms.CONTENT_URI, SMS_SELECTION, smsAddressBody2)); in testSmsBackupRestore()
170 try (Cursor mmsCursor = mContentResolver.query(Telephony.Mms.CONTENT_URI, in testSmsBackupRestore()
178 final Uri partUri = Telephony.Mms.CONTENT_URI.buildUpon() in testSmsBackupRestore()
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DProviderPermissionTest.java56 add(Contacts.People.CONTENT_URI); // Deprecated.
60 add(ContactsContract.CommonDataKinds.Email.CONTENT_URI);
62 add(ContactsContract.Directory.CONTENT_URI);
64 add(ContactsContract.Profile.CONTENT_URI);
86 assertWritingContentUriRequiresPermission(Contacts.People.CONTENT_URI, in testWriteContacts()
97 assertReadingContentUriRequiresPermission(CallLog.CONTENT_URI, in testReadCallLog()
108 assertWritingContentUriRequiresPermission(CallLog.CONTENT_URI, in testWriteCallLog()
118 assertNull(getContext().getContentResolver().query(CallLog.CONTENT_URI, null, null, null, in testReadCallLogInstant()
129 getContext().getContentResolver().insert(CallLog.CONTENT_URI, new ContentValues()); in testWriteCallLogInstant()
149 assertReadingContentUriRequiresPermission(Telephony.Sms.CONTENT_URI, in testReadSms()
[all …]
DTvPermissionTest.java84 verifyInsert(TvContract.Channels.CONTENT_URI, "channels"); in testInsertChannels()
90 verifyUpdate(TvContract.Channels.CONTENT_URI, "channels"); in testUpdateChannels()
96 verifyDelete(TvContract.Channels.CONTENT_URI, "channels"); in testDeleteChannels()
102 verifyInsert(TvContract.Programs.CONTENT_URI, "programs"); in testInsertPrograms()
108 verifyUpdate(TvContract.Programs.CONTENT_URI, "programs"); in testUpdatePrograms()
114 verifyDelete(TvContract.Programs.CONTENT_URI, "programs"); in testDeletePrograms()
DContactsProviderTest.java38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts()
56 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts()
74 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile()
94 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile()
112 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile()
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/
DContactsTest.java89 mProvider.delete(People.CONTENT_URI, PeopleColumns.NAME + " = ?", in testPeopleTable()
99 Uri uri = mProvider.insert(People.CONTENT_URI, value); in testPeopleTable()
100 Cursor cursor = mProvider.query(People.CONTENT_URI, in testPeopleTable()
123 cursor = mProvider.query(People.CONTENT_URI, PEOPLE_PROJECTION, in testPeopleTable()
138 cursor = mProvider.query(People.CONTENT_URI, PEOPLE_PROJECTION, in testPeopleTable()
171 Uri uri = mProvider.insert(Groups.CONTENT_URI, value); in testGroupsTable()
172 Cursor cursor = mProvider.query(Groups.CONTENT_URI, in testGroupsTable()
188 cursor = mProvider.query(Groups.CONTENT_URI, GROUPS_PROJECTION, in testGroupsTable()
235 mProvider.insert(Photos.CONTENT_URI, value); in testPhotosTable()
270 Uri peopleUri = mProvider.insert(People.CONTENT_URI, value); in testPhonesTable()
[all …]
DCallLogProviderTest.java57 mContentResolver.insert(CallLog.Calls.CONTENT_URI, values); in testNoSubqueries()
62 Cursor c = mProvider.query(Calls.CONTENT_URI, null, CallLog.Calls.NUMBER + " = ?", in testNoSubqueries()
78 Uri uri = mContentResolver.insert(CallLog.Calls.CONTENT_URI, values); in testUpdate()
84 CallLog.Calls.CONTENT_URI, true, in testUpdate()
128 Uri uri = mContentResolver.insert(CallLog.Calls.CONTENT_URI, values); in testDelete()
132 CallLog.Calls.CONTENT_URI, true, in testDelete()
144 int count = mContentResolver.delete(Calls.CONTENT_URI, Calls._ID + "=" in testDelete()
DContactsContract_Subquery.java56 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()
DContacts_PeopleTest.java83 mPeopleRowsAdded.add(mProvider.insert(People.CONTENT_URI, value)); in setUp()
88 mGroupRowsAdded.add(mProvider.insert(Groups.CONTENT_URI, value)); in setUp()
90 mGroupRowsAdded.add(mProvider.insert(Groups.CONTENT_URI, value)); in setUp()
120 mProvider.insert(Groups.CONTENT_URI, testValues); in testAddToGroup()
129 cursor = mProvider.query(Groups.CONTENT_URI, GROUPS_PROJECTION, in testAddToGroup()
152 cursor = mProvider.query(People.CONTENT_URI, PEOPLE_PROJECTION, in testAddToGroup()
157 mRowsAdded.add(ContentUris.withAppendedId(People.CONTENT_URI, personId)); in testAddToGroup()
159 cursor = mProvider.query(Groups.CONTENT_URI, GROUPS_PROJECTION, in testAddToGroup()
213 cursor = mProvider.query(Groups.CONTENT_URI, GROUPS_PROJECTION, in testAddToGroup()
/cts/tests/tests/content/src/android/content/cts/
DAsyncQueryHandlerTest.java82 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()
116 startInsert(INSERT_TOKEN_1, INSERT_COOKIE, DummyProvider.CONTENT_URI, values1, NO_CANCEL); in testStartInsert()
121 assertEquals(DummyProvider.CONTENT_URI, (Uri) mAsyncHandler.getResult()); in testStartInsert()
125 startInsert(INSERT_TOKEN_2, INSERT_COOKIE, DummyProvider.CONTENT_URI, values2, CANCELABLE); in testStartInsert()
132 cursor = mResolver.query(DummyProvider.CONTENT_URI, PROJECTIONS, null, null, ORDER_BY); in testStartInsert()
148 startQuery(QUERY_TOKEN_1, QUERY_COOKIE, DummyProvider.CONTENT_URI, in testStartQuery()
173 startQuery(QUERY_TOKEN_2, QUERY_COOKIE, DummyProvider.CONTENT_URI, in testStartQuery()
[all …]
DContentQueryMapTest.java68 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()
290 mResolver.update(DummyProvider.CONTENT_URI, values, in testSetKeepUpdatedWithHandler()
321 mResolver.insert(DummyProvider.CONTENT_URI, values); in testSetKeepUpdatedWithHandler()
[all …]
DBuggyProviderTest.java35 MockBuggyProvider.CONTENT_URI, UserHandle.USER_CURRENT); in testGetTypeDoesntCrashSystem()
45 resolver.getType(MockBuggyProvider.CONTENT_URI); in testGetTypeViaResolverDoesntCrashSystem()
/cts/tests/tests/telephonyprovider/src/android/telephonyprovider/cts/
DSmsConversationTest.java56 contentResolver.delete(Telephony.Sms.CONTENT_URI, null, null); in cleanup()
78 .query(Telephony.Sms.CONTENT_URI, null, null, null); in testQueryConversation_snippetEqualsMostRecentMessageBody()
82 .query(Conversations.CONTENT_URI, null, null, null); in testQueryConversation_snippetEqualsMostRecentMessageBody()
103 .query(Telephony.Sms.CONTENT_URI, null, null, null); in testQueryConversation_returnsCorrectMessageCount()
107 .query(Conversations.CONTENT_URI, null, null, null); in testQueryConversation_returnsCorrectMessageCount()
120 Uri uri1 = mContentResolver.insert(Telephony.Sms.CONTENT_URI, values); in saveToTelephony()
DThreadsTest.java57 contentResolver.delete(Telephony.Threads.CONTENT_URI, null, null); in cleanup()
58 contentResolver.delete(Telephony.Sms.CONTENT_URI, null, null); in cleanup()
114 return mContext.getContentResolver().insert(Telephony.Sms.CONTENT_URI, contentValues); in addMessageToTelephonyWithDate()
118 Cursor cursor = mContentResolver.query(Telephony.Threads.CONTENT_URI, in assertVerifyThreadDate()
134 return mContext.getContentResolver().insert(Telephony.Sms.Inbox.CONTENT_URI, contentValues); in saveToTelephony()
DSmsTest.java58 contentResolver.delete(Telephony.Sms.CONTENT_URI, null, null); in cleanup()
59 contentResolver.delete(Telephony.Threads.CONTENT_URI, null, null); in cleanup()
130 Uri uri = mContentResolver.insert(Telephony.Sms.CONTENT_URI, values); in testInsertSmsFromSubid_verifySmsFromNotOtherSubId()
191 Uri uri = mContentResolver.insert(Telephony.Sms.CONTENT_URI, values); in testQueryThreadId_returnSameThreadId()
208 int count = mContentResolver.bulkInsert(Telephony.Sms.CONTENT_URI, smsContentValues); in testSmsBulkInsert()
221 Cursor cursor = mContentResolver.query(Telephony.Sms.CONTENT_URI, null, null, null); in testDefaultValuesAreInsertedInSmsTable()
262 Cursor cursor = mContentResolver.query(Telephony.Sms.CONTENT_URI, null, null, null); in testDeleteSms_ifLastSmsDeletedThenThreadIsDeleted()
298 Cursor cursor1 = mContentResolver.query(Telephony.Sms.CONTENT_URI, in testSubqueryNotAllowed()
308 Cursor cursor1 = mContentResolver.query(Telephony.Sms.CONTENT_URI, in testSubqueryNotAllowed()
318 Cursor cursor1 = mContentResolver.query(Telephony.Sms.CONTENT_URI, in testSubqueryNotAllowed()
DMmsTest.java65 contentResolver.delete(Telephony.Mms.CONTENT_URI, null, null); in cleanup()
164 Cursor msgCursor = mContentResolver.query(Sent.CONTENT_URI, null, null, null, in testInsertMessageBoxUri_canSaveAndQueryMmsSent()
183 Cursor msgCursor = mContentResolver.query(Draft.CONTENT_URI, null, null, null, in testInsertMessageBoxUri_canSaveAndQueryMmsDraft()
202 Cursor msgCursor = mContentResolver.query(Inbox.CONTENT_URI, null, null, null, in testInsertMessageBoxUri_canSaveAndQueryMmsInbox()
221 Cursor msgCursor = mContentResolver.query(Outbox.CONTENT_URI, null, null, null, in testInsertMessageBoxUri_canSaveAndQueryMmsOutbox()
237 .query(Telephony.Mms.CONTENT_URI, null, null, null, in testMmsQuery_retrieveAllWhenSelectorNotSpecified()
275 .query(Telephony.Mms.CONTENT_URI, null, selection, null, null); in testMmsQuery_retrieveAllFailedMmsWhenSelectorSpecified()
289 .query(Telephony.Mms.CONTENT_URI, null, selection, null, null); in testMmsQuery_retrieveAllSentMmsWhenSelectorSpecified()
303 .query(Telephony.Mms.CONTENT_URI, null, selection, null, null); in testMmsQuery_retrieveAllQueuedMmsWhenSelectorSpecified()
405 final Uri mmsUri = mContentResolver.insert(Telephony.Mms.CONTENT_URI, mmsValues); in insertIntoMmsTable()
[all …]
/cts/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/
DSimPhonebookContract_ElementaryFilesNoSimTest.java63 String mimeType = mResolver.getType(ElementaryFiles.CONTENT_URI); in getType_elementaryFiles()
79 ElementaryFiles.CONTENT_URI.buildUpon().appendPath("invalid").build())).isNull(); in getType_invalidUri_returnsNull()
136 () -> mResolver.insert(ElementaryFiles.CONTENT_URI, new ContentValues())); in insert_throwsUnsupportedOperationException()
142 () -> mResolver.update(ElementaryFiles.CONTENT_URI, new ContentValues(), null)); in update_throwsUnsupportedOperationException()
148 () -> mResolver.delete(ElementaryFiles.CONTENT_URI, null)); in delete_throwsUnsupportedOperationException()
154 mResolver.query(ElementaryFiles.CONTENT_URI, projection, null, null)); in query()
/cts/tests/tests/database/apps/src/com/android/cts/providerapp/
DDummyProvider.java34 private static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY); field in DummyProvider
36 private static final Uri TEST_URI1 = Uri.withAppendedPath(CONTENT_URI, "test1");
37 private static final Uri TEST_URI2 = Uri.withAppendedPath(CONTENT_URI, "test2");
51 if (!CONTENT_URI.equals(uri)) { in query()
/cts/hostsidetests/inputmethodservice/deviceside/provider/src/android/inputmethodservice/cts/receiver/
DEventReceiver.java39 private static final Uri CONTENT_URI = Uri.parse(EventTableConstants.CONTENT_URI); field in EventReceiver
54 context.getContentResolver().insert(CONTENT_URI, values); in onReceive()
/cts/hostsidetests/numberblocking/app/src/com/android/cts/numberblocking/hostside/
DNumberBlockingAppTest.java30 BlockedNumberContract.BlockedNumbers.CONTENT_URI, in testCleanupBlockedNumberAsPrimaryUserSucceeds()
55 BlockedNumberContract.BlockedNumbers.CONTENT_URI, in testUnblockNumberAsPrimaryUserSucceeds()
64 BlockedNumberContract.BlockedNumbers.CONTENT_URI, cv); in verifyInsertBlockedNumberSucceeds()
/cts/tests/tests/calendarprovider/src/android/provider/cts/calendar/
DCalendarTest.java200 return resolver.delete(Calendars.CONTENT_URI, Calendars._ID + "=?", in deleteCalendarById()
205 return resolver.delete(Calendars.CONTENT_URI, Calendars.ACCOUNT_NAME + "=?", in deleteCalendarByAccount()
221 return resolver.query(Calendars.CONTENT_URI, CALENDARS_SYNC_PROJECTION, selection, in getCalendarsByAccount()
258 Uri uri = ContentUris.withAppendedId(SyncState.CONTENT_URI, id); in getSyncStateById()
270 return resolver.query(SyncState.CONTENT_URI, SYNCSTATE_PROJECTION, selection, in getSyncStateByAccount()
278 Uri uri = ContentUris.withAppendedId(SyncState.CONTENT_URI, id); in deleteSyncStateById()
288 Uri uri = SyncState.CONTENT_URI; in deleteSyncStateByAccount()
566 return resolver.query(Events.CONTENT_URI, EVENTS_PROJECTION, selection, selectionArgs, in getEventsByAccount()
579 return getIntFromDatabase(resolver, Events.CONTENT_URI, eventId, in lookupSelfAttendeeStatus()
588 return getIntFromDatabase(resolver, Events.CONTENT_URI, eventId, in lookupHasAlarm()
[all …]
/cts/tests/tvprovider/src/android/tvprovider/cts/
DTvProviderPerfTest.java75 mContentResolver.delete(Programs.CONTENT_URI, null, null); in tearDown()
76 mContentResolver.delete(Channels.CONTENT_URI, null, null); in tearDown()
92 mContentResolver.delete(Channels.CONTENT_URI, null, null); in testChannels()
105 ContentProviderOperation.newInsert(Channels.CONTENT_URI) in testChannels()
123 try (final Cursor cursor = mContentResolver.query(Channels.CONTENT_URI, in testChannels()
153 try (Cursor cursor = mContentResolver.query(Channels.CONTENT_URI, null, null, in testChannels()
166 try (final Cursor cursor = mContentResolver.query(Channels.CONTENT_URI, in testChannels()
219 ContentProviderOperation.newInsert(Channels.CONTENT_URI) in testPrograms()
243 ContentProviderOperation.newInsert(Programs.CONTENT_URI) in testPrograms()
298 try (Cursor cursor = mContentResolver.query(Programs.CONTENT_URI, null, null, in testPrograms()
[all …]

12345