Home
last modified time | relevance | path

Searched refs:getColumnIndex (Results 1 – 25 of 32) sorted by relevance

12

/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_Audio_MediaTest.java94 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreAudioMedia()
97 assertEquals(expected, c.getString(c.getColumnIndex(Media.DATA))); in testStoreAudioMedia()
98 assertTrue(c.getLong(c.getColumnIndex(Media.DATE_ADDED)) > 0); in testStoreAudioMedia()
99 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Media.DATE_MODIFIED))); in testStoreAudioMedia()
100 assertEquals(Audio1.IS_DRM, c.getInt(c.getColumnIndex(Media.IS_DRM))); in testStoreAudioMedia()
101 assertEquals(Audio1.FILE_NAME, c.getString(c.getColumnIndex(Media.DISPLAY_NAME))); in testStoreAudioMedia()
102 assertEquals(Audio1.MIME_TYPE, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testStoreAudioMedia()
103 assertEquals(Audio1.SIZE, c.getInt(c.getColumnIndex(Media.SIZE))); in testStoreAudioMedia()
104 assertEquals(Audio1.TITLE, c.getString(c.getColumnIndex(Media.TITLE))); in testStoreAudioMedia()
105 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreAudioMedia()
[all …]
DMediaStore_Video_MediaTest.java115 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreVideoMediaExternal()
117 assertEquals("cts", c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreVideoMediaExternal()
118 assertEquals("cts team", c.getString(c.getColumnIndex(Media.ARTIST))); in testStoreVideoMediaExternal()
119 assertEquals("test", c.getString(c.getColumnIndex(Media.CATEGORY))); in testStoreVideoMediaExternal()
120 assertEquals(dateTaken, c.getLong(c.getColumnIndex(Media.DATE_TAKEN))); in testStoreVideoMediaExternal()
121 assertEquals(8480, c.getInt(c.getColumnIndex(Media.DURATION))); in testStoreVideoMediaExternal()
123 c.getString(c.getColumnIndex(Media.DESCRIPTION))); in testStoreVideoMediaExternal()
124 assertEquals("en", c.getString(c.getColumnIndex(Media.LANGUAGE))); in testStoreVideoMediaExternal()
125 assertEquals(40.689060d, c.getDouble(c.getColumnIndex(Media.LATITUDE)), 0d); in testStoreVideoMediaExternal()
126 assertEquals(-74.044636d, c.getDouble(c.getColumnIndex(Media.LONGITUDE)), 0d); in testStoreVideoMediaExternal()
[all …]
DMediaStore_Audio_Genres_MembersTest.java47 mAudioIdOfJam = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
53 mAudioIdOfJamLive = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
97 long genreId = c.getLong(c.getColumnIndex(Genres._ID)); in testStoreAudioGenresMembersExternal()
118 assertEquals(mAudioIdOfJam, c.getLong(c.getColumnIndex(Members.AUDIO_ID))); in testStoreAudioGenresMembersExternal()
119 assertEquals(genreId, c.getLong(c.getColumnIndex(Members.GENRE_ID))); in testStoreAudioGenresMembersExternal()
120 assertEquals(mAudioIdOfJam, c.getLong(c.getColumnIndex(Members._ID))); in testStoreAudioGenresMembersExternal()
121 assertEquals(Audio1.EXTERNAL_DATA, c.getString(c.getColumnIndex(Members.DATA))); in testStoreAudioGenresMembersExternal()
122 assertTrue(c.getLong(c.getColumnIndex(Members.DATE_ADDED)) > 0); in testStoreAudioGenresMembersExternal()
123 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Members.DATE_MODIFIED))); in testStoreAudioGenresMembersExternal()
124 assertEquals(Audio1.FILE_NAME, c.getString(c.getColumnIndex(Members.DISPLAY_NAME))); in testStoreAudioGenresMembersExternal()
[all …]
DMediaStore_Images_MediaTest.java123 assertEquals(TEST_TITLE2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
124 assertEquals(TEST_DESCRIPTION2, c.getString(c.getColumnIndex(Media.DESCRIPTION))); in testInsertImageWithImagePath()
125 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
135 assertEquals(TEST_TITLE2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
136 assertEquals(TEST_DESCRIPTION2, c.getString(c.getColumnIndex(Media.DESCRIPTION))); in testInsertImageWithImagePath()
137 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
139 assertEquals(TEST_TITLE1, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
140 assertEquals(TEST_DESCRIPTION1, c.getString(c.getColumnIndex(Media.DESCRIPTION))); in testInsertImageWithImagePath()
141 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
150 assertEquals(TEST_DESCRIPTION2, c.getString(c.getColumnIndex(Media.DESCRIPTION))); in testInsertImageWithImagePath()
[all …]
DMediaStore_Audio_Playlists_MembersTest.java108 long id = c.getLong(c.getColumnIndex(Media._ID)); in insertAudioItem()
175 members[pos], c.getInt(c.getColumnIndex(Members.AUDIO_ID))); in verifyPlaylist()
179 ordering[pos], c.getInt(c.getColumnIndex(Members.PLAY_ORDER))); in verifyPlaylist()
198 long playlistId = c.getLong(c.getColumnIndex(Playlists._ID)); in testStoreAudioPlaylistsMembersExternal()
217 long memberId = c.getLong(c.getColumnIndex(Members._ID)); in testStoreAudioPlaylistsMembersExternal()
219 assertEquals(Audio1.EXTERNAL_DATA, c.getString(c.getColumnIndex(Members.DATA))); in testStoreAudioPlaylistsMembersExternal()
220 assertTrue(c.getLong(c.getColumnIndex(Members.DATE_ADDED)) > 0); in testStoreAudioPlaylistsMembersExternal()
221 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Members.DATE_MODIFIED))); in testStoreAudioPlaylistsMembersExternal()
222 assertEquals(Audio1.IS_DRM, c.getInt(c.getColumnIndex(Members.IS_DRM))); in testStoreAudioPlaylistsMembersExternal()
223 assertEquals(Audio1.FILE_NAME, c.getString(c.getColumnIndex(Members.DISPLAY_NAME))); in testStoreAudioPlaylistsMembersExternal()
[all …]
DMediaStore_Images_ThumbnailsTest.java96 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryInternalThumbnails()
97 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryInternalThumbnails()
109 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryInternalThumbnails()
110 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryInternalThumbnails()
133 long imageId = c.getLong(c.getColumnIndex(Media._ID)); in testQueryExternalMiniThumbnails()
134 String imagePath = c.getString(c.getColumnIndex(Media.DATA)); in testQueryExternalMiniThumbnails()
144 assertTrue(c.getLong(c.getColumnIndex(Thumbnails.WIDTH)) >= Math.min(src.getWidth(), 240)); in testQueryExternalMiniThumbnails()
145 … assertTrue(c.getLong(c.getColumnIndex(Thumbnails.HEIGHT)) >= Math.min(src.getHeight(), 240)); in testQueryExternalMiniThumbnails()
151 assertEquals(50, c.getLong(c.getColumnIndex(Thumbnails.WIDTH))); in testQueryExternalMiniThumbnails()
152 assertEquals(50, c.getLong(c.getColumnIndex(Thumbnails.HEIGHT))); in testQueryExternalMiniThumbnails()
[all …]
DMediaStore_Audio_Artists_AlbumsTest.java75 Long artistId = c.getLong(c.getColumnIndex(Media.ARTIST_ID)); in testStoreAudioArtistsAlbums()
94 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioArtistsAlbums()
95 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioArtistsAlbums()
96 assertNotNull(c.getString(c.getColumnIndex(Albums.ALBUM_KEY))); in testStoreAudioArtistsAlbums()
97 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Albums.ARTIST))); in testStoreAudioArtistsAlbums()
98 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.FIRST_YEAR))); in testStoreAudioArtistsAlbums()
99 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.LAST_YEAR))); in testStoreAudioArtistsAlbums()
100 assertEquals(1, c.getInt(c.getColumnIndex(Albums.NUMBER_OF_SONGS))); in testStoreAudioArtistsAlbums()
101 assertEquals(1, c.getInt(c.getColumnIndex(Albums.NUMBER_OF_SONGS_FOR_ARTIST))); in testStoreAudioArtistsAlbums()
DMediaStore_Audio_PlaylistsTest.java82 assertEquals("My favourites", c.getString(c.getColumnIndex(Playlists.NAME))); in testStoreAudioPlaylistsExternal()
84 c.getString(c.getColumnIndex(Playlists.DATA))); in testStoreAudioPlaylistsExternal()
86 long realDateAdded = c.getLong(c.getColumnIndex(Playlists.DATE_ADDED)); in testStoreAudioPlaylistsExternal()
88 assertEquals(dateModified, c.getLong(c.getColumnIndex(Playlists.DATE_MODIFIED))); in testStoreAudioPlaylistsExternal()
89 assertTrue(c.getLong(c.getColumnIndex(Playlists._ID)) > 0); in testStoreAudioPlaylistsExternal()
100 assertEquals("xxx", c.getString(c.getColumnIndex(Playlists.NAME))); in testStoreAudioPlaylistsExternal()
102 c.getString(c.getColumnIndex(Playlists.DATA))); in testStoreAudioPlaylistsExternal()
104 assertEquals(realDateAdded, c.getLong(c.getColumnIndex(Playlists.DATE_ADDED))); in testStoreAudioPlaylistsExternal()
105 assertEquals(dateModified, c.getLong(c.getColumnIndex(Playlists.DATE_MODIFIED))); in testStoreAudioPlaylistsExternal()
DMediaStore_Audio_AlbumsTest.java95 long id = c.getLong(c.getColumnIndex(Albums._ID)); in testStoreAudioAlbums()
97 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioAlbums()
98 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioAlbums()
99 assertNotNull(c.getString(c.getColumnIndex(Albums.ALBUM_KEY))); in testStoreAudioAlbums()
100 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Albums.ARTIST))); in testStoreAudioAlbums()
101 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.FIRST_YEAR))); in testStoreAudioAlbums()
102 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.LAST_YEAR))); in testStoreAudioAlbums()
103 assertEquals(1, c.getInt(c.getColumnIndex(Albums.NUMBER_OF_SONGS))); in testStoreAudioAlbums()
146 long fid = c.getLong(c.getColumnIndex(Albums._ID)); in testStoreAudioAlbums()
185 long aid = c.getLong(c.getColumnIndex(Albums.ALBUM_ID)); in testAlbumArt()
[all …]
DMediaStore_Audio_ArtistsTest.java84 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Artists.ARTIST))); in testStoreAudioArtists()
85 long id = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
87 assertNotNull(c.getString(c.getColumnIndex(Artists.ARTIST_KEY))); in testStoreAudioArtists()
88 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_ALBUMS))); in testStoreAudioArtists()
89 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_TRACKS))); in testStoreAudioArtists()
116 long fid = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
DContactsContract_TestDataBuilder.java193 mId = mCursor.getLong(getColumnIndex(BaseColumns._ID)); in loadUsingValues()
198 return mCursor.getLong(mCursor.getColumnIndex(columnName)); in getLong()
202 return mCursor.getString(mCursor.getColumnIndex(columnName)); in getString()
206 assertEquals(value, mCursor.getLong(getColumnIndex(columnName))); in assertColumn()
210 assertEquals(value, mCursor.getString(getColumnIndex(columnName))); in assertColumn()
214 assertEquals(value, mCursor.getBlob(getColumnIndex(columnName))); in assertColumn()
218 assertNotNull(mCursor.getBlob(getColumnIndex(columnName))); in assertBlobColumnNotNull()
222 assertNull(mCursor.getBlob(getColumnIndex(columnName))); in assertBlobColumnNull()
237 private int getColumnIndex(String columnName) { in getColumnIndex() method in ContactsContract_TestDataBuilder.Builder
238 int index = mCursor.getColumnIndex(columnName); in getColumnIndex()
DMediaStore_Audio_GenresTest.java74 assertEquals("POP", c.getString(c.getColumnIndex(Genres.NAME))); in testStoreAudioGenresExternal()
75 assertTrue(c.getLong(c.getColumnIndex(Genres._ID)) > 0); in testStoreAudioGenresExternal()
84 assertEquals("ROCK", c.getString(c.getColumnIndex(Genres.NAME))); in testStoreAudioGenresExternal()
133 assertEquals(genreId, cursor.getLong(cursor.getColumnIndex(Genres._ID))); in testGetContentUriForAudioId()
DMediaStore_VideoTest.java75 assertEquals(valueOfData, c.getString(c.getColumnIndex(VideoColumns.DATA))); in testQuery()
/cts/tests/tests/database/src/android/database/cts/
DDatabaseUtils_InsertHelperTest.java63 assertEquals(1, mInsertHelper.getColumnIndex("_id")); in testGetColumnIndex()
64 assertEquals(2, mInsertHelper.getColumnIndex("name")); in testGetColumnIndex()
65 assertEquals(3, mInsertHelper.getColumnIndex("age")); in testGetColumnIndex()
66 assertEquals(4, mInsertHelper.getColumnIndex("address")); in testGetColumnIndex()
68 mInsertHelper.getColumnIndex("missing_column"); in testGetColumnIndex()
113 mInsertHelper.bind(mInsertHelper.getColumnIndex("boolean_value"), true); in testInsert()
114 mInsertHelper.bind(mInsertHelper.getColumnIndex("int_value"), 10); in testInsert()
115 mInsertHelper.bind(mInsertHelper.getColumnIndex("long_value"), 1000L); in testInsert()
116 mInsertHelper.bind(mInsertHelper.getColumnIndex("double_value"), 123.456); in testInsert()
117 mInsertHelper.bind(mInsertHelper.getColumnIndex("float_value"), 1.0f); in testInsert()
[all …]
DMatrixCursorTest.java166 assertEquals(COLUMN0_INDEX, mMatrixCursor.getColumnIndex(COLUMN0_NAME)); in testGetColumnNames()
167 assertEquals(COLUMN1_INDEX, mMatrixCursor.getColumnIndex(COLUMN1_NAME)); in testGetColumnNames()
168 assertEquals(COLUMN2_INDEX, mMatrixCursor.getColumnIndex(COLUMN2_NAME)); in testGetColumnNames()
DAbstractCursorTest.java312 assertEquals(POSITION0, mDatabaseCursor.getColumnIndex(COLUMN_NAMES1[POSITION0])); in testGetColumnIndexOrThrow()
313 assertEquals(POSITION1, mDatabaseCursor.getColumnIndex(COLUMN_NAMES1[POSITION1])); in testGetColumnIndexOrThrow()
326 assertEquals(POSITION0, mDatabaseCursor.getColumnIndex(COLUMN_NAMES1[POSITION0])); in testGetColumnIndex()
327 assertEquals(POSITION1, mDatabaseCursor.getColumnIndex(COLUMN_NAMES1[POSITION1])); in testGetColumnIndex()
DCursorWrapperTest.java182 assertEquals(0, cursorWrapper.getColumnIndex("_id")); in testGettingColumnInfos()
183 assertEquals(1, cursorWrapper.getColumnIndex("number")); in testGettingColumnInfos()
184 assertEquals(-1, cursorWrapper.getColumnIndex("NON_EXISTENCE")); in testGettingColumnInfos()
/cts/tests/tests/calllog/src/android/calllog/cts/
DCallLogBackupTest.java240 call.id = cursor.getInt(cursor.getColumnIndex(Calls._ID)); in getCalls()
241 call.number = cursor.getString(cursor.getColumnIndex(Calls.NUMBER)); in getCalls()
242 call.date = cursor.getLong(cursor.getColumnIndex(Calls.DATE)); in getCalls()
243 call.duration = cursor.getLong(cursor.getColumnIndex(Calls.DURATION)); in getCalls()
244 call.type = cursor.getInt(cursor.getColumnIndex(Calls.TYPE)); in getCalls()
246 cursor.getColumnIndex(Calls.PHONE_ACCOUNT_COMPONENT_NAME)); in getCalls()
248 cursor.getColumnIndex(Calls.PHONE_ACCOUNT_ID)); in getCalls()
250 cursor.getColumnIndex(Calls.NUMBER_PRESENTATION)); in getCalls()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DTestResultsBackupHelper.java58 int nameIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_NAME); in performBackup()
59 int resultIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_RESULT); in performBackup()
60 int infoSeenIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_INFO_SEEN); in performBackup()
61 int detailsIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_DETAILS); in performBackup()
62 int metricsIndex = cursor.getColumnIndex(TestResultsProvider.COLUMN_TEST_METRICS); in performBackup()
/cts/tests/tests/app/src/android/app/cts/
DDownloadManagerTest.java188 cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))); in testMinimumDownload()
190 cursor.getColumnIndex(DownloadManager.COLUMN_TOTAL_SIZE_BYTES))); in testMinimumDownload()
356 int columnIndex = cursor.getColumnIndex(DownloadManager.COLUMN_ID); in clearDownloads()
438 cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))); in assertSuccessfulDownload()
440 cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI))); in assertSuccessfulDownload()
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvContractTest.java158 cursor.getString(cursor.getColumnIndex(columnName))); in verifyStringColumn()
166 cursor.getInt(cursor.getColumnIndex(columnName))); in verifyIntegerColumn()
174 cursor.getLong(cursor.getColumnIndex(columnName))); in verifyLongColumn()
182 byte[] actual = cursor.getBlob(cursor.getColumnIndex(columnName)); in verifyBlobColumn()
196 assertEquals(channelId, cursor.getLong(cursor.getColumnIndex(TvContract.Channels._ID))); in verifyChannel()
252 assertEquals(programId, cursor.getLong(cursor.getColumnIndex(TvContract.Programs._ID))); in verifyProgram()
526 cursor.getString(cursor.getColumnIndex(TvContract.Channels.COLUMN_TYPE))); in testDefaultValues()
528 cursor.getString(cursor.getColumnIndex( in testDefaultValues()
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DDatabaseAsserts.java242 int index = cursor.getColumnIndex(column); in equalsWithExpectedValues()
250 value = cursor.getString(cursor.getColumnIndex(column)); in equalsWithExpectedValues()
331 Assert.assertTrue(column, c.getColumnIndex(column) >= 0); in checkProjectionInner()
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/
DExternalStorageTest.java192 cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))); in assertSuccessfulDownload()
194 cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI))); in assertSuccessfulDownload()
/cts/tests/tests/media/src/android/media/cts/
DMediaScannerTest.java188 long playlistid = c.getLong(c.getColumnIndex(MediaStore.MediaColumns._ID)); in testMediaScanner()
195 long song1a = c.getLong(c.getColumnIndex(MediaStore.Audio.Playlists.Members.AUDIO_ID)); in testMediaScanner()
197 long song1b = c.getLong(c.getColumnIndex(MediaStore.Audio.Playlists.Members.AUDIO_ID)); in testMediaScanner()
209 playlistid = c.getLong(c.getColumnIndex(MediaStore.MediaColumns._ID)); in testMediaScanner()
216 long song2a = c.getLong(c.getColumnIndex(MediaStore.Audio.Playlists.Members.AUDIO_ID)); in testMediaScanner()
218 long song2b = c.getLong(c.getColumnIndex(MediaStore.Audio.Playlists.Members.AUDIO_ID)); in testMediaScanner()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/
DSearchUtil.java69 int index = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1); in verifySearchResult()

12