Home
last modified time | relevance | path

Searched refs:resolver (Results 1 – 21 of 21) sorted by relevance

/cts/tests/tests/provider/src/android/provider/cts/contacts/
DRawContactUtil.java36 public static void update(ContentResolver resolver, long rawContactId, in update() argument
39 resolver.update(uri, values, null, null); in update()
42 public static long createRawContactWithName(ContentResolver resolver, Account account, in createRawContactWithName() argument
44 Long rawContactId = insertRawContact(resolver, account); in createRawContactWithName()
45 DataUtil.insertName(resolver, rawContactId, name); in createRawContactWithName()
49 public static long createRawContactWithAutoGeneratedName(ContentResolver resolver, in createRawContactWithAutoGeneratedName() argument
51 Long rawContactId = insertRawContact(resolver, account); in createRawContactWithAutoGeneratedName()
52 DataUtil.insertAutoGeneratedName(resolver, rawContactId); in createRawContactWithAutoGeneratedName()
56 public static long insertRawContact(ContentResolver resolver, Account account) { in insertRawContact() argument
60 Uri uri = resolver.insert(URI, values); in insertRawContact()
[all …]
DDataUtil.java35 public static String[] queryById(ContentResolver resolver, long dataId, String[] projection) { in queryById() argument
37 Cursor cursor = resolver.query(uri, projection, null, null, null); in queryById()
41 public static void insertName(ContentResolver resolver, long rawContactId, String name) { in insertName() argument
46 insertData(resolver, rawContactId, values); in insertName()
49 public static long insertPhoneNumber(ContentResolver resolver, long rawContactId, in insertPhoneNumber() argument
54 return DataUtil.insertData(resolver, rawContactId, values); in insertPhoneNumber()
57 public static long insertEmail(ContentResolver resolver, long rawContactId, String email) { in insertEmail() argument
61 return DataUtil.insertData(resolver, rawContactId, values); in insertEmail()
64 public static void insertAutoGeneratedName(ContentResolver resolver, long rawContactId) { in insertAutoGeneratedName() argument
65 insertName(resolver, rawContactId, "test raw contact " + rawContactId); in insertAutoGeneratedName()
[all …]
DDatabaseAsserts.java38 public static void assertDeleteIsUnsupported(ContentResolver resolver, Uri uri) { in assertDeleteIsUnsupported() argument
40 resolver.delete(uri, null, null); in assertDeleteIsUnsupported()
48 public static void assertInsertIsUnsupported(ContentResolver resolver, Uri uri) { in assertInsertIsUnsupported() argument
51 resolver.insert(uri, values); in assertInsertIsUnsupported()
64 public static ContactIdPair assertAndCreateContact(ContentResolver resolver) { in assertAndCreateContact() argument
65 return assertAndCreateContact(resolver, StaticAccountAuthenticator.ACCOUNT_1); in assertAndCreateContact()
73 public static ContactIdPair assertAndCreateContactWithName(ContentResolver resolver, in assertAndCreateContactWithName() argument
75 long rawContactId = RawContactUtil.createRawContactWithName(resolver, account, name); in assertAndCreateContactWithName()
77 long contactId = RawContactUtil.queryContactIdByRawContactId(resolver, rawContactId); in assertAndCreateContactWithName()
88 public static ContactIdPair assertAndCreateContact(ContentResolver resolver, Account account) { in assertAndCreateContact() argument
[all …]
DDeletedContactUtil.java35 public static long queryDeletedTimestampForContactId(ContentResolver resolver, long contactId) { in queryDeletedTimestampForContactId() argument
40 Cursor cursor = resolver.query(uri, projection, null, null, null); in queryDeletedTimestampForContactId()
52 public static long getCount(ContentResolver resolver) { in getCount() argument
56 Cursor cursor = resolver.query(URI, projection, null, null, null); in getCount()
69 public static List<String[]> query(ContentResolver resolver, String[] projection) { in query() argument
70 Cursor cursor = resolver.query(URI, projection, null, null, null); in query()
79 public static List<String[]> querySinceTimestamp(ContentResolver resolver, String[] projection, in querySinceTimestamp() argument
83 Cursor cursor = resolver.query(URI, projection, selection, args, null); in querySinceTimestamp()
DContactUtil.java36 public static void update(ContentResolver resolver, long contactId, in update() argument
39 resolver.update(uri, values, null, null); in update()
42 public static void delete(ContentResolver resolver, long contactId) { in delete() argument
44 resolver.delete(uri, null, null); in delete()
47 public static boolean recordExistsForContactId(ContentResolver resolver, long contactId) { in recordExistsForContactId() argument
52 Cursor cursor = resolver.query(uri, projection, null, null, null); in recordExistsForContactId()
59 public static long queryContactLastUpdatedTimestamp(ContentResolver resolver, long contactId) { in queryContactLastUpdatedTimestamp() argument
65 Cursor cursor = resolver.query(uri, projection, null, null, null); in queryContactLastUpdatedTimestamp()
126 public static void setAggregationException(ContentResolver resolver, int type, in setAggregationException() argument
134 Assert.assertEquals(1, resolver.update(AggregationExceptions.CONTENT_URI, values, null, in setAggregationException()
/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DAccessPermissionWithDiffSigTest.java118 final ContentResolver resolver = getContext().getContentResolver(); in assertWritingContentUriNotAllowed() local
120 resolver.insert(uri, new ContentValues()); in assertWritingContentUriNotAllowed()
127 resolver.update(uri, new ContentValues(), null, null); in assertWritingContentUriNotAllowed()
134 resolver.delete(uri, null, null); in assertWritingContentUriNotAllowed()
157 final ContentResolver resolver = getContext().getContentResolver(); in assertWritingContentUriAllowed() local
159 resolver.insert(uri, new ContentValues()); in assertWritingContentUriAllowed()
160 resolver.update(uri, new ContentValues(), null, null); in assertWritingContentUriAllowed()
161 resolver.delete(uri, null, null); in assertWritingContentUriAllowed()
163 resolver.openOutputStream(uri).close(); in assertWritingContentUriAllowed()
164 resolver.openFileDescriptor(uri, "w").close(); in assertWritingContentUriAllowed()
[all …]
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/
DDocumentsClientTest.java236 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testTree() local
237 Cursor cursor = resolver.query(children, new String[] { in testTree()
248 Uri pic = DocumentsContract.createDocument(resolver, doc, "image/png", "pic.png"); in testTree()
249 Uri dir = DocumentsContract.createDocument(resolver, doc, Document.MIME_TYPE_DIR, "my dir"); in testTree()
250 Uri dirPic = DocumentsContract.createDocument(resolver, dir, "image/png", "pic2.png"); in testTree()
258 assertTrue("delete", DocumentsContract.deleteDocument(resolver, file4)); in testTree()
266 dirPic = DocumentsContract.renameDocument(resolver, dirPic, "wow"); in testTree()
305 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in getColumn() local
306 final Cursor cursor = resolver.query(uri, new String[] { column }, null, null, null); in getColumn()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DTestResultsBackupHelper.java53 ContentResolver resolver = mContext.getContentResolver(); in performBackup() local
56 cursor = resolver.query(TestResultsProvider.RESULTS_CONTENT_URI, in performBackup()
130 ContentResolver resolver = mContext.getContentResolver(); in restoreEntity() local
131 resolver.bulkInsert(TestResultsProvider.RESULTS_CONTENT_URI, values); in restoreEntity()
DTestListAdapter.java165 ContentResolver resolver = context.getContentResolver(); in TestListAdapter() local
166 resolver.registerContentObserver(TestResultsProvider.RESULTS_CONTENT_URI, true, observer); in TestListAdapter()
236 ContentResolver resolver = mContext.getContentResolver(); in getRefreshResults() local
239 cursor = resolver.query(TestResultsProvider.RESULTS_CONTENT_URI, REFRESH_PROJECTION, in getRefreshResults()
264 ContentResolver resolver = mContext.getContentResolver(); in doInBackground() local
265 resolver.delete(TestResultsProvider.RESULTS_CONTENT_URI, "1", null); in doInBackground()
DPassFailButtons.java324 ContentResolver resolver = activity.getContentResolver(); in hasSeenInfoDialog() local
327 cursor = resolver.query( in hasSeenInfoDialog()
386 ContentResolver resolver = activity.getContentResolver(); in markSeenInfoDialog() local
390 int numUpdated = resolver.update( in markSeenInfoDialog()
394 resolver.insert(TestResultsProvider.RESULTS_CONTENT_URI, values); in markSeenInfoDialog()
DTestResultsProvider.java222 ContentResolver resolver = context.getContentResolver(); in setTestResult() local
223 int numUpdated = resolver.update(TestResultsProvider.RESULTS_CONTENT_URI, values, in setTestResult()
228 resolver.insert(TestResultsProvider.RESULTS_CONTENT_URI, values); in setTestResult()
/cts/tests/tests/tv/src/android/media/tv/cts/
DStubTunerTvInputService.java48 public static void insertChannels(ContentResolver resolver, TvInputInfo info) { in insertChannels() argument
67 resolver.bulkInsert(TvContract.Channels.CONTENT_URI, in insertChannels()
71 public static void deleteChannels(ContentResolver resolver, TvInputInfo info) { in deleteChannels() argument
75 resolver.delete(TvContract.buildChannelsUriForInput(info.getId()), null, null); in deleteChannels()
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/
DCommonExternalStorageTest.java311 public static void assertMediaNoAccess(ContentResolver resolver) throws Exception { in assertMediaNoAccess() argument
318 resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in assertMediaNoAccess()
324 public static void assertMediaReadWriteAccess(ContentResolver resolver) throws Exception { in assertMediaReadWriteAccess() argument
330 final Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in assertMediaReadWriteAccess()
332 resolver.openFileDescriptor(uri, "rw").close(); in assertMediaReadWriteAccess()
333 resolver.openFileDescriptor(uri, "w").close(); in assertMediaReadWriteAccess()
334 resolver.openFileDescriptor(uri, "r").close(); in assertMediaReadWriteAccess()
336 resolver.delete(uri, null, null); in assertMediaReadWriteAccess()
/cts/tests/tests/provider/src/android/provider/cts/
DContactsContract_StreamItemsTest.java84 static long insertRawContact(ContentResolver resolver) { in insertRawContact() argument
90 Uri contactUri = resolver.insert(RawContacts.CONTENT_URI, values); in insertRawContact()
96 static Uri insertViaContentDirectoryUri(ContentResolver resolver, long rawContactId) { in insertViaContentDirectoryUri() argument
108 return resolver.insert(contactStreamUri, values); in insertViaContentDirectoryUri()
DSettings_NameValueTableTest.java78 protected static boolean putString(ContentResolver resolver, Uri uri, String name, in putString() argument
80 return NameValueTable.putString(resolver, uri, name, value); in putString()
DCalendarTest.java198 public static int deleteCalendarById(ContentResolver resolver, long id) { in deleteCalendarById() argument
199 return resolver.delete(Calendars.CONTENT_URI, Calendars._ID + "=?", in deleteCalendarById()
203 public static int deleteCalendarByAccount(ContentResolver resolver, String account) { in deleteCalendarByAccount() argument
204 return resolver.delete(Calendars.CONTENT_URI, Calendars.ACCOUNT_NAME + "=?", in deleteCalendarByAccount()
208 public static Cursor getCalendarsByAccount(ContentResolver resolver, String account) { in getCalendarsByAccount() argument
220 return resolver.query(Calendars.CONTENT_URI, CALENDARS_SYNC_PROJECTION, selection, in getCalendarsByAccount()
256 public static Cursor getSyncStateById(ContentResolver resolver, long id) { in getSyncStateById() argument
258 return resolver.query(uri, SYNCSTATE_PROJECTION, null, null, null); in getSyncStateById()
264 public static Cursor getSyncStateByAccount(ContentResolver resolver, String account) { in getSyncStateByAccount() argument
269 return resolver.query(SyncState.CONTENT_URI, SYNCSTATE_PROJECTION, selection, in getSyncStateByAccount()
[all …]
DContactsContract_PinnedPositionsTest.java396 private static void applyBatch(ContentResolver resolver, in applyBatch() argument
399 resolver.applyBatch(ContactsContract.AUTHORITY, operations); in applyBatch()
DContactsContract_RawContactsTest.java217 private long getContactLastUpdatedTimestampByRawContactId(ContentResolver resolver, in getContactLastUpdatedTimestampByRawContactId() argument
/cts/tests/tests/calllog/src/android/calllog/cts/
DCallLogBackupTest.java215 ContentResolver resolver = getContext().getContentResolver(); in clearCallLog() local
216 resolver.delete(Calls.CONTENT_URI, null, null); in clearCallLog()
234 ContentResolver resolver = getContext().getContentResolver(); in getCalls() local
235 Cursor cursor = resolver.query(Calls.CONTENT_URI, CALL_LOG_PROJECTION, null, null, null); in getCalls()
/cts/tests/tests/accounts/src/android/accounts/cts/
DAccountManagerUnaffiliatedAuthenticatorTests.java55 ContentResolver resolver = getContext().getContentResolver(); in setUp() local
56 mProviderClient = resolver.acquireContentProviderClient( in setUp()
/cts/tests/tests/content/src/android/content/cts/
DIntentFilterTest.java770 final ContentResolver resolver = mContext.getContentResolver(); in testMatchWithIntent() local
773 assertEquals(IntentFilter.NO_MATCH_ACTION, mIntentFilter.match(resolver, intent, true, in testMatchWithIntent()
777 mIntentFilter.match(resolver, intent, true, null)); in testMatchWithIntent()
781 assertEquals(IntentFilter.NO_MATCH_DATA, mIntentFilter.match(resolver, intent, true, null)); in testMatchWithIntent()
783 assertEquals(IntentFilter.NO_MATCH_DATA, mIntentFilter.match(resolver, intent, true, null)); in testMatchWithIntent()
785 assertEquals(IntentFilter.NO_MATCH_DATA, mIntentFilter.match(resolver, intent, true, null)); in testMatchWithIntent()
790 mIntentFilter.match(resolver, intent, true, null)); in testMatchWithIntent()
792 mIntentFilter.match(resolver, intent, false, null)); in testMatchWithIntent()
794 assertEquals(IntentFilter.NO_MATCH_CATEGORY, mIntentFilter.match(resolver, intent, true, in testMatchWithIntent()
798 mIntentFilter.match(resolver, intent, true, null)); in testMatchWithIntent()
[all …]