/cts/tests/tests/provider/src/android/provider/cts/ |
D | Contacts_SettingsTest.java | 24 private ContentResolver mContentResolver; field in Contacts_SettingsTest 29 mContentResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp() 37 Settings.setSetting(mContentResolver, "account", key1, value1); in testAccessSetting() 38 Settings.setSetting(mContentResolver, "account", key2, value2); in testAccessSetting() 39 assertEquals(value1, Settings.getSetting(mContentResolver, "account", key1)); in testAccessSetting() 40 assertEquals(value2, Settings.getSetting(mContentResolver, "account", key2)); in testAccessSetting() 41 assertNull(Settings.getSetting(mContentResolver, "account", "key not exist")); in testAccessSetting() 43 Settings.setSetting(mContentResolver, "account", key1, value2); in testAccessSetting() 44 assertEquals(value2, Settings.getSetting(mContentResolver, "account", key1)); in testAccessSetting()
|
D | MediaStore_Audio_GenresTest.java | 32 private ContentResolver mContentResolver; field in MediaStore_Audio_GenresTest 38 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 43 assertNotNull(c = mContentResolver.query( in testGetContentUri() 48 assertNotNull(c = mContentResolver.query( in testGetContentUri() 59 assertNull(mContentResolver.query(Genres.getContentUri(volume), null, null, null, null)); in testGetContentUri() 66 Uri uri = mContentResolver.insert(Genres.EXTERNAL_CONTENT_URI, values); in testStoreAudioGenresExternal() 71 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioGenresExternal() 81 assertEquals(1, mContentResolver.update(uri, values, null, null)); in testStoreAudioGenresExternal() 82 c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioGenresExternal() 87 assertEquals(1, mContentResolver.delete(uri, null, null)); in testStoreAudioGenresExternal() [all …]
|
D | MediaStore_Audio_AlbumsTest.java | 39 private ContentResolver mContentResolver; field in MediaStore_Audio_AlbumsTest 45 mContentResolver = mContext.getContentResolver(); in setUp() 50 assertNotNull(c = mContentResolver.query( in testGetContentUri() 54 assertNotNull(c = mContentResolver.query( in testGetContentUri() 61 assertNull(mContentResolver.query(Albums.getContentUri(volume), null, null, null, null)); in testGetContentUri() 76 mContentResolver.insert(audioAlbumsUri, new ContentValues()); in testStoreAudioAlbums() 84 Uri audioMediaUri = isInternal ? audio1.insertToInternal(mContentResolver) in testStoreAudioAlbums() 85 : audio1.insertToExternal(mContentResolver); in testStoreAudioAlbums() 91 Cursor c = mContentResolver.query(audioAlbumsUri, null, selection, selectionArgs, in testStoreAudioAlbums() 126 mContentResolver.update(audioAlbumsUri, albumValues, selection, selectionArgs); in testStoreAudioAlbums() [all …]
|
D | MediaStore_Audio_ArtistsTest.java | 30 private ContentResolver mContentResolver; field in MediaStore_Audio_ArtistsTest 36 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 41 assertNotNull(c = mContentResolver.query( in testGetContentUri() 45 assertNotNull(c = mContentResolver.query( in testGetContentUri() 52 assertNull(mContentResolver.query(Artists.getContentUri(volume), null, null, null, null)); in testGetContentUri() 67 mContentResolver.insert(artistsUri, new ContentValues()); in testStoreAudioArtists() 73 Uri uri = isInternal ? Audio1.getInstance().insertToInternal(mContentResolver) in testStoreAudioArtists() 74 : Audio1.getInstance().insertToExternal(mContentResolver); in testStoreAudioArtists() 80 Cursor c = mContentResolver.query(artistsUri, null, selection, selectionArgs, null); in testStoreAudioArtists() 96 mContentResolver.update(artistsUri, artistValues, selection, selectionArgs); in testStoreAudioArtists() [all …]
|
D | MediaStore_Audio_Genres_MembersTest.java | 33 private ContentResolver mContentResolver; field in MediaStore_Audio_Genres_MembersTest 43 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 44 Uri uri = Audio1.getInstance().insertToExternal(mContentResolver); in setUp() 45 Cursor c = mContentResolver.query(uri, null, null, null, null); in setUp() 50 uri = Audio2.getInstance().insertToExternal(mContentResolver); in setUp() 51 c = mContentResolver.query(uri, null, null, null, null); in setUp() 61 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mAudioIdOfJam, null); in tearDown() 62 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mAudioIdOfJamLive, in tearDown() 69 assertNotNull(c = mContentResolver.query( in testGetContentUri() 75 assertNotNull(c = mContentResolver.query( in testGetContentUri() [all …]
|
D | MediaStore_Audio_Artists_AlbumsTest.java | 32 private ContentResolver mContentResolver; field in MediaStore_Audio_Artists_AlbumsTest 38 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 45 assertNotNull(c = mContentResolver.query(contentUri, null, null, null, null)); in testGetContentUri() 50 assertNotNull(c = mContentResolver.query(contentUri, null, null, null, null)); in testGetContentUri() 55 assertNull(mContentResolver.query(MediaStore.Audio.Artists.Albums.getContentUri(volume, 1), in testGetContentUri() 69 Uri audioMediaUri = isInternal ? Audio1.getInstance().insertToInternal(mContentResolver) in testStoreAudioArtistsAlbums() 70 : Audio1.getInstance().insertToExternal(mContentResolver); in testStoreAudioArtistsAlbums() 72 Cursor c = mContentResolver.query(audioMediaUri, new String[] { Media.ARTIST_ID }, null, in testStoreAudioArtistsAlbums() 82 mContentResolver.insert(artistsAlbumsUri, new ContentValues()); in testStoreAudioArtistsAlbums() 90 c = mContentResolver.query(artistsAlbumsUri, null, null, null, null); in testStoreAudioArtistsAlbums() [all …]
|
D | MediaStoreTest.java | 35 private ContentResolver mContentResolver; field in MediaStoreTest 40 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 41 Cursor c = mContentResolver.query(mScannerUri, PROJECTION, null, null, null); in setUp() 55 mContentResolver.insert(mScannerUri, values); in tearDown() 67 assertNull(mContentResolver.query(mScannerUri, PROJECTION, in testGetMediaScannerUri() 73 mContentResolver.insert(mScannerUri, values)); in testGetMediaScannerUri() 76 Cursor c = mContentResolver.query(mScannerUri, PROJECTION, in testGetMediaScannerUri() 84 assertEquals(1, mContentResolver.delete(mScannerUri, null, null)); in testGetMediaScannerUri() 85 assertNull(mContentResolver.query(mScannerUri, PROJECTION, null, null, null)); in testGetMediaScannerUri()
|
D | MediaStore_Images_ThumbnailsTest.java | 46 private ContentResolver mContentResolver; field in MediaStore_Images_ThumbnailsTest 54 mContentResolver.delete(row, null, null); in tearDown() 70 mContentResolver = mContext.getContentResolver(); in setUp() 77 Cursor c = Thumbnails.queryMiniThumbnails(mContentResolver, in testQueryInternalThumbnails() 87 Uri uri = mContentResolver.insert(Thumbnails.INTERNAL_CONTENT_URI, values); in testQueryInternalThumbnails() 93 c = Thumbnails.queryMiniThumbnails(mContentResolver, uri, Thumbnails.MINI_KIND, null); in testQueryInternalThumbnails() 100 c = Thumbnails.queryMiniThumbnails(mContentResolver, Thumbnails.INTERNAL_CONTENT_URI, in testQueryInternalThumbnails() 106 c = Thumbnails.query(mContentResolver, uri, null); in testQueryInternalThumbnails() 121 stringUrl = Media.insertImage(mContentResolver, src, null, null); in testQueryExternalMiniThumbnails() 130 Cursor c = mContentResolver.query(Uri.parse(stringUrl), in testQueryExternalMiniThumbnails() [all …]
|
D | MediaStore_Audio_PlaylistsTest.java | 32 private ContentResolver mContentResolver; field in MediaStore_Audio_PlaylistsTest 38 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 43 assertNotNull(c = mContentResolver.query( in testGetContentUri() 50 assertNotNull(c = mContentResolver.query( in testGetContentUri() 60 assertNull(mContentResolver.query(Playlists.getContentUri(volume), null, null, null, in testGetContentUri() 74 Uri uri = mContentResolver.insert(Playlists.EXTERNAL_CONTENT_URI, values); in testStoreAudioPlaylistsExternal() 79 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioPlaylistsExternal() 97 assertEquals(1, mContentResolver.update(uri, values, null, null)); in testStoreAudioPlaylistsExternal() 98 c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioPlaylistsExternal() 108 assertEquals(1, mContentResolver.delete(uri, null, null)); in testStoreAudioPlaylistsExternal() [all …]
|
D | CalendarTest.java | 78 private ContentResolver mContentResolver; field in CalendarTest 917 mContentResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp() 926 CalendarHelper.deleteCalendarByAccount(mContentResolver, account); in testCalendarCreationAndDeletion() 942 CalendarHelper.deleteCalendarByAccount(mContentResolver, account); in testDefaultProjections() 948 c = mContentResolver.query(Calendars.CONTENT_URI, null, null, null, null); in testDefaultProjections() 951 c = mContentResolver.query(Events.CONTENT_URI, null, null, null, null); in testDefaultProjections() 955 c = mContentResolver.query(uri, null, null, null, null); in testDefaultProjections() 958 c = mContentResolver.query(Attendees.CONTENT_URI, null, null, null, null); in testDefaultProjections() 962 c = mContentResolver.query(uri, null, null, null, null); in testDefaultProjections() 965 c = mContentResolver.query(CalendarContract.CalendarAlerts.CONTENT_URI, in testDefaultProjections() [all …]
|
D | MediaStore_Audio_Playlists_MembersTest.java | 96 private ContentResolver mContentResolver; field in MediaStore_Audio_Playlists_MembersTest 105 Uri uri = which.insertToExternal(mContentResolver); in insertAudioItem() 106 Cursor c = mContentResolver.query(uri, null, null, null, null); in insertAudioItem() 117 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 127 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mIdOfAudio1, null); in tearDown() 128 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mIdOfAudio2, null); in tearDown() 129 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mIdOfAudio3, null); in tearDown() 130 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mIdOfAudio4, null); in tearDown() 131 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, Media._ID + "=" + mIdOfAudio5, null); in tearDown() 146 return mContentResolver.insert(playlistMembersUri, values); in insertPlaylistItem() [all …]
|
D | MediaStore_Images_MediaTest.java | 59 private ContentResolver mContentResolver; field in MediaStore_Images_MediaTest 66 mContentResolver.delete(row, null, null); in tearDown() 78 mContentResolver = mContext.getContentResolver(); in setUp() 85 Cursor c = Media.query(mContentResolver, Media.EXTERNAL_CONTENT_URI, null, null, in testInsertImageWithImagePath() 94 stringUrl = Media.insertImage(mContentResolver, path, TEST_TITLE1, TEST_DESCRIPTION1); in testInsertImageWithImagePath() 108 stringUrl = Media.insertImage(mContentResolver, path, TEST_TITLE2, TEST_DESCRIPTION2); in testInsertImageWithImagePath() 119 c = Media.query(mContentResolver, Uri.parse(stringUrl), in testInsertImageWithImagePath() 130 c = Media.query(mContentResolver, Media.EXTERNAL_CONTENT_URI, in testInsertImageWithImagePath() 145 c = Media.query(mContentResolver, Uri.parse(stringUrl), in testInsertImageWithImagePath() 160 stringUrl = Media.insertImage(mContentResolver, src, TEST_TITLE3, TEST_DESCRIPTION3); in testInsertImageWithBitmap() [all …]
|
D | MediaStore_VideoTest.java | 40 private ContentResolver mContentResolver; field in MediaStore_VideoTest 47 mContentResolver.delete(row, null, null); in tearDown() 57 mContentResolver = mContext.getContentResolver(); in setUp() 67 Uri newUri = mContentResolver.insert(Video.Media.INTERNAL_CONTENT_URI, values); in testQuery() 72 Cursor c = Video.query(mContentResolver, newUri, new String[] { VideoColumns.DATA }); in testQuery()
|
D | Contacts_PeopleTest.java | 44 private ContentResolver mContentResolver; field in Contacts_PeopleTest 68 mContentResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp() 69 mProvider = mContentResolver.acquireContentProviderClient(Contacts.AUTHORITY); in setUp() 126 mRowsAdded.add(People.addToMyContactsGroup(mContentResolver, personId)); in testAddToGroup() 132 cursor = People.queryGroups(mContentResolver, personId); in testAddToGroup() 149 mRowsAdded.add(People.createPersonInMyContactsGroup(mContentResolver, values)); in testAddToGroup() 162 cursor = People.queryGroups(mContentResolver, personId); in testAddToGroup() 179 mRowsAdded.add(People.addToGroup(mContentResolver, personId, groupId)); in testAddToGroup() 180 cursor = People.queryGroups(mContentResolver, personId); in testAddToGroup() 200 mRowsAdded.add(People.addToGroup(mContentResolver, personId, groupName)); in testAddToGroup() [all …]
|
D | MediaStore_Audio_MediaTest.java | 31 private ContentResolver mContentResolver; field in MediaStore_Audio_MediaTest 37 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 42 assertNotNull(c = mContentResolver.query( in testGetContentUri() 46 assertNotNull(c = mContentResolver.query( in testGetContentUri() 53 assertNull(mContentResolver.query(Media.getContentUri(volume), null, null, null, null)); in testGetContentUri() 59 … assertNotNull(c = mContentResolver.query(Media.getContentUriForPath(externalPath), null, null, in testGetContentUriForPath() 65 … assertNotNull(c = mContentResolver.query(Media.getContentUriForPath(internalPath), null, null, in testGetContentUriForPath() 83 Uri uri = mContentResolver.insert(mediaUri, values); in testStoreAudioMedia() 91 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioMedia() 132 int result = mContentResolver.update(uri, values, null, null); in testStoreAudioMedia() [all …]
|
D | TelephonyProviderTest.java | 39 private ContentResolver mContentResolver; field in TelephonyProviderTest 50 mContentResolver = getInstrumentation().getContext().getContentResolver(); in setUp() 92 Cursor cursor = mContentResolver.query(Carriers.CONTENT_URI, in testAccessToApns()
|
D | MediaStore_Video_MediaTest.java | 39 private ContentResolver mContentResolver; field in MediaStore_Video_MediaTest 45 mContentResolver = getContext().getContentResolver(); in setUp() 50 assertNotNull(c = mContentResolver.query(Media.getContentUri("internal"), null, null, null, in testGetContentUri() 53 assertNotNull(c = mContentResolver.query(Media.getContentUri("external"), null, null, null, in testGetContentUri() 59 assertNull(mContentResolver.query(Media.getContentUri(volume), null, null, null, null)); in testGetContentUri() 63 mContentResolver.delete(Media.EXTERNAL_CONTENT_URI, "_data=?", new String[] { path }); in cleanExternalMediaFile() 107 Uri uri = mContentResolver.insert(Media.EXTERNAL_CONTENT_URI, values); in testStoreVideoMediaExternal() 112 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreVideoMediaExternal() 164 assertEquals(1, mContentResolver.update(uri, values, null, null)); in testStoreVideoMediaExternal() 166 c = mContentResolver.query(uri, null, null, null, null); in testStoreVideoMediaExternal() [all …]
|
D | UserDictionary_WordsTest.java | 31 private ContentResolver mContentResolver; field in UserDictionary_WordsTest 48 mContentResolver = mContext.getContentResolver(); in setUp() 55 mContentResolver.delete(row, null, null); in tearDown() 69 Cursor cursor = mContentResolver.query(UserDictionary.Words.CONTENT_URI, WORDS_PROJECTION, in testAddWord_deprecated() 93 Cursor cursor = mContentResolver.query(UserDictionary.Words.CONTENT_URI, WORDS_PROJECTION, in assertWord()
|
D | VoicemailContractTest.java | 34 private ContentResolver mContentResolver; field in VoicemailContractTest 47 mContentResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp() 48 mVoicemailProvider = mContentResolver.acquireContentProviderClient(mVoicemailContentUri); in setUp() 49 mStatusProvider = mContentResolver.acquireContentProviderClient(mStatusContentUri); in setUp()
|
D | ContactsTest.java | 52 private ContentResolver mContentResolver; field in ContactsTest 59 mContentResolver = getInstrumentation().getTargetContext().getContentResolver(); in setUp() 60 mProvider = mContentResolver.acquireContentProviderClient(ContactsContract.AUTHORITY); in setUp() 61 mCallLogProvider = mContentResolver.acquireContentProviderClient(CallLog.AUTHORITY); in setUp() 667 Settings.setSetting(mContentResolver, null, insertKey, insertValue); in testSettingsTable()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ContentResolverTest.java | 86 private ContentResolver mContentResolver; field in ContentResolverTest 94 mContentResolver = mContext.getContentResolver(); in setUp() 103 mContentResolver.insert(TABLE1_URI, values); in setUp() 104 mContentResolver.insert(REMOTE_TABLE1_URI, values); in setUp() 108 mContentResolver.insert(TABLE1_URI, values); in setUp() 109 mContentResolver.insert(REMOTE_TABLE1_URI, values); in setUp() 113 mContentResolver.insert(TABLE1_URI, values); in setUp() 114 mContentResolver.insert(REMOTE_TABLE1_URI, values); in setUp() 119 mContentResolver.delete(TABLE1_URI, null, null); in tearDown() 123 mContentResolver.delete(REMOTE_TABLE1_URI, null, null); in tearDown() [all …]
|
/cts/suite/cts/deviceTests/tvproviderperf/src/com/android/cts/tvproviderperf/ |
D | TvProviderPerfTest.java | 55 private ContentResolver mContentResolver; field in TvProviderPerfTest 65 mContentResolver = getContext().getContentResolver(); in setUp() 73 mContentResolver.delete(Programs.CONTENT_URI, null, null); in tearDown() 74 mContentResolver.delete(Channels.CONTENT_URI, null, null); in tearDown() 103 mContentResolver.applyBatch(TvContract.AUTHORITY, operations); in testChannels() 115 try (final Cursor cursor = mContentResolver.query(Channels.CONTENT_URI, in testChannels() 130 mContentResolver.applyBatch(TvContract.AUTHORITY, operations); in testChannels() 145 try (Cursor cursor = mContentResolver.query(Channels.CONTENT_URI, null, null, in testChannels() 158 try (final Cursor cursor = mContentResolver.query(Channels.CONTENT_URI, in testChannels() 165 try (Cursor c = mContentResolver.query(channelUri, null, null, null, null)) { in testChannels() [all …]
|
/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvContractTest.java | 93 private ContentResolver mContentResolver; field in TvContractTest 104 mContentResolver = getContext().getContentResolver(); in setUp() 118 try (Cursor cursor = mContentResolver.query(mChannelsUri, projection, null, null, null)) { in tearDown() 121 mContentResolver.delete( in tearDown() 125 mContentResolver.delete(mChannelsUri, null, null); in tearDown() 191 try (Cursor cursor = mContentResolver.query( in verifyChannel() 225 Uri rowUri = mContentResolver.insert(mChannelsUri, values); in testChannelsTable() 235 mContentResolver.update(channelUri, values, null, null); in testChannelsTable() 239 mContentResolver.delete(mChannelsUri, null, null); in testChannelsTable() 240 try (Cursor cursor = mContentResolver.query( in testChannelsTable() [all …]
|
/cts/tests/tests/text/src/android/text/format/cts/ |
D | DateFormatTest.java | 41 private ContentResolver mContentResolver; field in DateFormatTest 59 mContentResolver = mContext.getContentResolver(); in setUp() 95 Settings.System.putString(mContentResolver, Settings.System.TIME_12_24, "12"); in tearDown() 106 Settings.System.putString(mContentResolver, Settings.System.TIME_12_24, "24"); in test_is24HourFormat() 108 Settings.System.putString(mContentResolver, Settings.System.TIME_12_24, "12"); in test_is24HourFormat()
|