Home
last modified time | relevance | path

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

12

/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/DocumentClient/src/com/android/cts/documentclient/
DDocumentsClientTest.java152 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testOpenVirtual() local
153 final String streamTypes[] = resolver.getStreamTypes(uri, "*/*"); in testOpenVirtual()
251 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testTree() local
252 Cursor cursor = resolver.query(children, new String[] { in testTree()
263 Uri pic = DocumentsContract.createDocument(resolver, doc, "image/png", "pic.png"); in testTree()
264 Uri dir = DocumentsContract.createDocument(resolver, doc, Document.MIME_TYPE_DIR, "my dir"); in testTree()
265 Uri dirPic = DocumentsContract.createDocument(resolver, dir, "image/png", "pic2.png"); in testTree()
273 assertTrue("delete", DocumentsContract.deleteDocument(resolver, file4)); in testTree()
281 dirPic = DocumentsContract.renameDocument(resolver, dirPic, "wow"); in testTree()
348 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testTransferDocument() local
[all …]
DScopedDirectoryAccessClientTest.java276 final ContentResolver resolver = context.getContentResolver(); in userAcceptsOpenExternalDirectoryTest() local
280 resolver.takePersistableUriPermission(grantedUri, modeFlags); in userAcceptsOpenExternalDirectoryTest()
286 final Uri pic = DocumentsContract.createDocument(resolver, doc, "image/png", "pic.png"); in userAcceptsOpenExternalDirectoryTest()
288 final Uri dir = DocumentsContract.createDocument(resolver, doc, Document.MIME_TYPE_DIR, in userAcceptsOpenExternalDirectoryTest()
291 final Uri dirPic = DocumentsContract.createDocument(resolver, dir, "image/png", "pic2.png"); in userAcceptsOpenExternalDirectoryTest()
298 assertTrue("delete", DocumentsContract.deleteDocument(resolver, pic)); in userAcceptsOpenExternalDirectoryTest()
299 assertTrue("delete", DocumentsContract.deleteDocument(resolver, dirPic)); in userAcceptsOpenExternalDirectoryTest()
300 assertTrue("delete", DocumentsContract.deleteDocument(resolver, dir)); in userAcceptsOpenExternalDirectoryTest()
DDocumentsClientTestCase.java74 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in getColumn() local
75 final Cursor cursor = resolver.query(uri, new String[] { column }, null, null, null); in getColumn()
/cts/tests/tests/net/src/android/net/cts/
DAirplaneModeTest.java35 private ContentResolver resolver; field in AirplaneModeTest
39 resolver = mContext.getContentResolver(); in setup()
77 Settings.Global.putInt(resolver, Settings.Global.AIRPLANE_MODE_ON, enabling ? 1 : 0); in setAirplaneModeOn()
DTheaterModeTest.java34 private ContentResolver resolver; field in TheaterModeTest
38 resolver = mContext.getContentResolver(); in setup()
76 Settings.Global.putInt(resolver, Settings.Global.THEATER_MODE_ON, enabling ? 1 : 0); in setTheaterModeOn()
/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/apps/CtsVerifier/src/com/android/cts/verifier/
DTestResultsBackupHelper.java53 ContentResolver resolver = mContext.getContentResolver(); in performBackup() local
56 cursor = resolver.query(TestResultsProvider.getResultContentUri(mContext), in performBackup()
130 ContentResolver resolver = mContext.getContentResolver(); in restoreEntity() local
131 resolver.bulkInsert(TestResultsProvider.getResultContentUri(mContext), values); in restoreEntity()
DTestListAdapter.java165 ContentResolver resolver = context.getContentResolver(); in TestListAdapter() local
166resolver.registerContentObserver(TestResultsProvider.getResultContentUri(context), true, observer); in TestListAdapter()
236 ContentResolver resolver = mContext.getContentResolver(); in getRefreshResults() local
239 … cursor = resolver.query(TestResultsProvider.getResultContentUri(mContext), REFRESH_PROJECTION, in getRefreshResults()
264 ContentResolver resolver = mContext.getContentResolver(); in doInBackground() local
265 resolver.delete(TestResultsProvider.getResultContentUri(mContext), "1", null); in doInBackground()
DPassFailButtons.java328 ContentResolver resolver = activity.getContentResolver(); in hasSeenInfoDialog() local
331 cursor = resolver.query(TestResultsProvider.getTestNameUri(activity), in hasSeenInfoDialog()
389 ContentResolver resolver = activity.getContentResolver(); in markSeenInfoDialog() local
393 int numUpdated = resolver.update( in markSeenInfoDialog()
396 resolver.insert(TestResultsProvider.getResultContentUri(activity), values); in markSeenInfoDialog()
DTestResultsProvider.java237 ContentResolver resolver = context.getContentResolver(); in setTestResult() local
238 int numUpdated = resolver.update(uri, values, in setTestResult()
243 resolver.insert(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.java358 public static void assertMediaNoAccess(ContentResolver resolver, boolean legacyApp) in assertMediaNoAccess() argument
366 Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in assertMediaNoAccess()
378 public static void assertMediaReadWriteAccess(ContentResolver resolver) throws Exception { in assertMediaReadWriteAccess() argument
384 final Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in assertMediaReadWriteAccess()
386 resolver.openFileDescriptor(uri, "rw").close(); in assertMediaReadWriteAccess()
387 resolver.openFileDescriptor(uri, "w").close(); in assertMediaReadWriteAccess()
388 resolver.openFileDescriptor(uri, "r").close(); in assertMediaReadWriteAccess()
390 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()
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 …]
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()
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.java262 ContentResolver resolver = getContext().getContentResolver(); in clearCallLog() local
263 resolver.delete(Calls.CONTENT_URI, null, null); in clearCallLog()
300 ContentResolver resolver = getContext().getContentResolver(); in getCalls() local
301 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 …]

12