Home
last modified time | relevance | path

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

123

/cts/tests/tests/provider/src/android/provider/cts/media/
DMediaStore_Audio_Artists_AlbumsTest.java93 Long artistId = c.getLong(c.getColumnIndex(Media.ARTIST_ID)); in testStoreAudioArtistsAlbums()
110 assertFalse(c.isNull(c.getColumnIndex(Albums._ID))); in testStoreAudioArtistsAlbums()
111 assertFalse(c.isNull(c.getColumnIndex(Albums.ALBUM_ID))); in testStoreAudioArtistsAlbums()
112 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioArtistsAlbums()
113 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioArtistsAlbums()
114 assertNotNull(c.getString(c.getColumnIndex(Albums.ALBUM_KEY))); in testStoreAudioArtistsAlbums()
115 assertFalse(c.isNull(c.getColumnIndex(Albums.ARTIST_ID))); in testStoreAudioArtistsAlbums()
116 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Albums.ARTIST))); in testStoreAudioArtistsAlbums()
117 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.FIRST_YEAR))); in testStoreAudioArtistsAlbums()
118 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.LAST_YEAR))); in testStoreAudioArtistsAlbums()
[all …]
DMediaStore_Audio_Genres_MembersTest.java82 mAudioIdOfJam = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
88 mAudioIdOfJamLive = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
120 long genreId = c.getLong(c.getColumnIndex(Genres._ID)); in testStoreAudioGenresMembersExternal()
141 assertEquals(mAudioIdOfJam, c.getLong(c.getColumnIndex(Members.AUDIO_ID))); in testStoreAudioGenresMembersExternal()
142 assertEquals(genreId, c.getLong(c.getColumnIndex(Members.GENRE_ID))); in testStoreAudioGenresMembersExternal()
143 assertEquals(mAudioIdOfJam, c.getLong(c.getColumnIndex(Members._ID))); in testStoreAudioGenresMembersExternal()
146 assertEquals(expected1, c.getString(c.getColumnIndex(Members.DATA))); in testStoreAudioGenresMembersExternal()
147 assertTrue(c.getLong(c.getColumnIndex(Members.DATE_ADDED)) > 0); in testStoreAudioGenresMembersExternal()
148 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Members.DATE_MODIFIED))); in testStoreAudioGenresMembersExternal()
149 assertEquals(Audio1.DISPLAY_NAME, c.getString(c.getColumnIndex(Members.DISPLAY_NAME))); in testStoreAudioGenresMembersExternal()
[all …]
DMediaStore_Audio_Playlists_MembersTest.java136 long id = c.getLong(c.getColumnIndex(Media._ID)); in insertAudioItem()
206 members[pos], c.getInt(c.getColumnIndex(Members.AUDIO_ID))); in verifyPlaylist()
210 ordering[pos], c.getInt(c.getColumnIndex(Members.PLAY_ORDER))); in verifyPlaylist()
232 long playlistId = c.getLong(c.getColumnIndex(Playlists._ID)); in testStoreAudioPlaylistsMembersExternal()
251 long memberId = c.getLong(c.getColumnIndex(Members._ID)); in testStoreAudioPlaylistsMembersExternal()
255 assertEquals(expected1, c.getString(c.getColumnIndex(Members.DATA))); in testStoreAudioPlaylistsMembersExternal()
256 assertTrue(c.getLong(c.getColumnIndex(Members.DATE_ADDED)) > 0); in testStoreAudioPlaylistsMembersExternal()
257 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Members.DATE_MODIFIED))); in testStoreAudioPlaylistsMembersExternal()
258 assertEquals(Audio1.DISPLAY_NAME, c.getString(c.getColumnIndex(Members.DISPLAY_NAME))); in testStoreAudioPlaylistsMembersExternal()
259 assertEquals(Audio1.MIME_TYPE, c.getString(c.getColumnIndex(Members.MIME_TYPE))); in testStoreAudioPlaylistsMembersExternal()
[all …]
DMediaStore_Audio_MediaTest.java134 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreAudioMedia()
137 assertEquals(expected, c.getString(c.getColumnIndex(Media.DATA))); in testStoreAudioMedia()
138 assertTrue(c.getLong(c.getColumnIndex(Media.DATE_ADDED)) > 0); in testStoreAudioMedia()
139 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Media.DATE_MODIFIED))); in testStoreAudioMedia()
140 assertEquals(Audio1.DISPLAY_NAME, c.getString(c.getColumnIndex(Media.DISPLAY_NAME))); in testStoreAudioMedia()
141 assertEquals(Audio1.MIME_TYPE, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testStoreAudioMedia()
142 assertEquals(Audio1.SIZE, c.getInt(c.getColumnIndex(Media.SIZE))); in testStoreAudioMedia()
143 assertEquals(Audio1.TITLE, c.getString(c.getColumnIndex(Media.TITLE))); in testStoreAudioMedia()
144 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreAudioMedia()
145 String albumKey = c.getString(c.getColumnIndex(Media.ALBUM_KEY)); in testStoreAudioMedia()
[all …]
DMediaStore_Video_MediaTest.java157 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreVideoMediaExternal()
159 assertEquals("cts", c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreVideoMediaExternal()
160 assertEquals("cts team", c.getString(c.getColumnIndex(Media.ARTIST))); in testStoreVideoMediaExternal()
161 assertEquals("test", c.getString(c.getColumnIndex(Media.CATEGORY))); in testStoreVideoMediaExternal()
162 assertEquals(dateTaken, c.getLong(c.getColumnIndex(Media.DATE_TAKEN))); in testStoreVideoMediaExternal()
163 assertEquals(8480, c.getInt(c.getColumnIndex(Media.DURATION))); in testStoreVideoMediaExternal()
165 c.getString(c.getColumnIndex(Media.DESCRIPTION))); in testStoreVideoMediaExternal()
166 assertEquals("en", c.getString(c.getColumnIndex(Media.LANGUAGE))); in testStoreVideoMediaExternal()
167 assertEquals(1, c.getInt(c.getColumnIndex(Media.IS_PRIVATE))); in testStoreVideoMediaExternal()
168 assertEquals(0, c.getLong(c.getColumnIndex(Media.MINI_THUMB_MAGIC))); in testStoreVideoMediaExternal()
[all …]
DMediaStore_Audio_AlbumsTest.java113 long id = c.getLong(c.getColumnIndex(Albums._ID)); in testStoreAudioAlbums()
115 assertFalse(c.isNull(c.getColumnIndex(Albums.ALBUM_ID))); in testStoreAudioAlbums()
116 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioAlbums()
117 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioAlbums()
118 assertNotNull(c.getString(c.getColumnIndex(Albums.ALBUM_KEY))); in testStoreAudioAlbums()
119 assertFalse(c.isNull(c.getColumnIndex(Albums.ARTIST_ID))); in testStoreAudioAlbums()
120 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Albums.ARTIST))); in testStoreAudioAlbums()
121 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.FIRST_YEAR))); in testStoreAudioAlbums()
122 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.LAST_YEAR))); in testStoreAudioAlbums()
123 assertEquals(1, c.getInt(c.getColumnIndex(Albums.NUMBER_OF_SONGS))); in testStoreAudioAlbums()
[all …]
DMediaStore_Audio_ArtistsTest.java100 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Artists.ARTIST))); in testStoreAudioArtists()
101 long id = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
103 assertNotNull(c.getString(c.getColumnIndex(Artists.ARTIST_KEY))); in testStoreAudioArtists()
104 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_ALBUMS))); in testStoreAudioArtists()
105 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_TRACKS))); in testStoreAudioArtists()
132 long fid = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
DMediaStore_Images_ThumbnailsTest.java170 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryExternalThumbnails()
171 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryExternalThumbnails()
183 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryExternalThumbnails()
184 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryExternalThumbnails()
212 long imageId = c.getLong(c.getColumnIndex(Media._ID)); in testQueryExternalMiniThumbnails()
213 String imagePath = c.getString(c.getColumnIndex(Media.DATA)); in testQueryExternalMiniThumbnails()
237 imageId = c.getLong(c.getColumnIndex(Media._ID)); in testQueryExternalMiniThumbnails()
238 imagePath = c.getString(c.getColumnIndex(Media.DATA)); in testQueryExternalMiniThumbnails()
281 long id = c.getLong(c.getColumnIndex(Thumbnails._ID)); in testStoreImagesMediaExternal()
283 assertEquals(Thumbnails.FULL_SCREEN_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testStoreImagesMediaExternal()
[all …]
DMediaStore_Audio_PlaylistsTest.java96 c.getString(c.getColumnIndex(Playlists.NAME))); in testStoreAudioPlaylistsExternal()
98 long realDateAdded = c.getLong(c.getColumnIndex(Playlists.DATE_ADDED)); in testStoreAudioPlaylistsExternal()
100 assertEquals(dateModified, c.getLong(c.getColumnIndex(Playlists.DATE_MODIFIED))); in testStoreAudioPlaylistsExternal()
101 assertTrue(c.getLong(c.getColumnIndex(Playlists._ID)) > 0); in testStoreAudioPlaylistsExternal()
DMediaStore_Audio_GenresTest.java95 assertEquals("POP", c.getString(c.getColumnIndex(Genres.NAME))); in testStoreAudioGenresExternal()
96 assertTrue(c.getLong(c.getColumnIndex(Genres._ID)) > 0); in testStoreAudioGenresExternal()
136 assertEquals(genreId, cursor.getLong(cursor.getColumnIndex(Genres._ID))); in testGetContentUriForAudioId()
DMediaStore_DownloadsTest.java169 cursor.getString(cursor.getColumnIndex(Images.Media.MIME_TYPE))); in testMediaInDownloadsDir()
210 cursor.getString(cursor.getColumnIndex(Downloads.MIME_TYPE))); in testInsertDownload()
212 cursor.getString(cursor.getColumnIndex(Downloads.DISPLAY_NAME))); in testInsertDownload()
214 cursor.getString(cursor.getColumnIndex(Downloads.DOWNLOAD_URI))); in testInsertDownload()
216 cursor.getString(cursor.getColumnIndex(Downloads.REFERER_URI))); in testInsertDownload()
260 cursor.getString(cursor.getColumnIndex(Downloads.MIME_TYPE))); in testUpdateDownload()
262 cursor.getString(cursor.getColumnIndex(Downloads.DOWNLOAD_URI))); in testUpdateDownload()
/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()
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/
DContactsContract_TestDataBuilder.java194 mId = mCursor.getLong(getColumnIndex(BaseColumns._ID)); in loadUsingValues()
199 return mCursor.isNull(mCursor.getColumnIndex(columnName)); in isNull()
203 return mCursor.getLong(mCursor.getColumnIndex(columnName)); in getLong()
207 return mCursor.getString(mCursor.getColumnIndex(columnName)); in getString()
211 assertEquals(value, mCursor.getLong(getColumnIndex(columnName))); in assertColumn()
215 assertEquals(value, mCursor.getString(getColumnIndex(columnName))); in assertColumn()
219 assertEquals(value, mCursor.getBlob(getColumnIndex(columnName))); in assertColumn()
223 assertNotNull(mCursor.getBlob(getColumnIndex(columnName))); in assertBlobColumnNotNull()
227 assertNull(mCursor.getBlob(getColumnIndex(columnName))); in assertBlobColumnNull()
242 private int getColumnIndex(String columnName) { in getColumnIndex() method in ContactsContract_TestDataBuilder.Builder
[all …]
DContactsContract_DirectoryTest.java70 return c.getString(c.getColumnIndex(column)); in getString()
95 return c.getLong(c.getColumnIndex(Directory._ID)); in waitForDirectorySetup()
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/tests/tests/telephonyprovider/src/android/telephonyprovider/cts/
DSmsTestHelper.java68 assertThat(cursor.getString(cursor.getColumnIndex(columnName))).isEqualTo(expectedValue); in assertSmsColumnEquals()
78 assertThat(cursor.getString(cursor.getColumnIndex(Telephony.Sms.BODY))) in assertBulkSmsContentEqual()
82 assertThat(cursor.getString(cursor.getColumnIndex(Telephony.Sms.BODY))) in assertBulkSmsContentEqual()
97 int statusResult = cursorStatus.getInt(cursorStatus.getColumnIndex(Telephony.Sms.STATUS)); in assertUpdateSmsStatus()
112 int typeResult = cursorStatus.getInt(cursorStatus.getColumnIndex(Telephony.Sms.TYPE)); in assertUpdateSmsType()
DSmsTest.java82 String actualSmsBody = cursor.getString(cursor.getColumnIndex(Telephony.Sms.BODY)); in testSmsInsert()
226 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.READ))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
229 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.STATUS))).isEqualTo(-1); in testDefaultValuesAreInsertedInSmsTable()
232 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.DATE_SENT))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
235 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.LOCKED))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
238 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.SUBSCRIPTION_ID))).isEqualTo(-1); in testDefaultValuesAreInsertedInSmsTable()
241 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.ERROR_CODE))).isEqualTo(-1); in testDefaultValuesAreInsertedInSmsTable()
244 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.SEEN))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
266 int thread_id = cursor.getInt(cursor.getColumnIndex(Telephony.Sms.THREAD_ID)); in testDeleteSms_ifLastSmsDeletedThenThreadIsDeleted()
DMmsTest.java88 String actualSubject = cursor.getString(cursor.getColumnIndex(Telephony.Mms.SUBJECT)); in testMmsInsert_insertSendReqSucceeds()
143 assertThat(partCursor.getLong(partCursor.getColumnIndex(Telephony.Mms.Part.MSG_ID))) in testMmsInsert_canInsertTextMms()
146 assertThat(partCursor.getInt(partCursor.getColumnIndex(Telephony.Mms.Part.SEQ))).isEqualTo( in testMmsInsert_canInsertTextMms()
148 assertThat(partCursor.getString(partCursor.getColumnIndex(Telephony.Mms.Part.CONTENT_TYPE))) in testMmsInsert_canInsertTextMms()
151 assertThat(partCursor.getString(partCursor.getColumnIndex(Telephony.Mms.Part.TEXT))) in testMmsInsert_canInsertTextMms()
262 assertThat(cursor.getString(cursor.getColumnIndex(Telephony.Mms.SUBJECT))) in assertThatMmsCursorValues()
264 assertThat(cursor.getInt(cursor.getColumnIndex(Telephony.Mms.MESSAGE_TYPE))) in assertThatMmsCursorValues()
319 assertThat(cursor.getString(cursor.getColumnIndex(Telephony.Mms.SUBJECT))) in testMmsUpdate()
334 cursorAfterUpdate.getColumnIndex(Telephony.Mms.SUBJECT))) in testMmsUpdate()
361 cursorAfterReadUpdate.getColumnIndex(Telephony.Mms.READ))) in testMmsUpdate_canUpdateReadAndSeenStatus()
[all …]
DLockedMessageTest.java87 assertThat(cursor.getInt(cursor.getColumnIndex(Telephony.BaseMmsColumns._ID))) in testLockedMessage_atMostOneLockedMessage()
89 assertThat(cursor.getInt(cursor.getColumnIndex(Telephony.BaseMmsColumns._ID))) in testLockedMessage_atMostOneLockedMessage()
134 cursorAfterReadUpdate.getColumnIndex(Telephony.Mms.LOCKED))) in insertMmsWithLockedMessage()
160 cursorAfterReadUpdate.getColumnIndex(Telephony.Sms.LOCKED))) in insertSmsWithLockedMessage()
DServiceStateTest.java122 int voiceRegState = cursor.getInt(cursor.getColumnIndex(VOICE_REG_STATE)); in testGetVoiceRegState_query()
175 int dataNetworkType = cursor.getInt(cursor.getColumnIndex(DATA_NETWORK_TYPE)); in testGetDataNetworkType_query()
242 int duplexMode = cursor.getInt(cursor.getColumnIndex(DUPLEX_MODE)); in testGetDuplexMode_query()
282 int dataRegState = cursor.getInt(cursor.getColumnIndex(DATA_REG_STATE)); in testGetDataRegState_query()
336 assertThat(cursor.getColumnIndex("network_id")).isEqualTo(-1); in testLocationProtectedFields_noPermission()
337 assertThat(cursor.getColumnIndex("system_id")).isEqualTo(-1); in testLocationProtectedFields_noPermission()
DSmsConversationTest.java87 conversationCursor.getString(conversationCursor.getColumnIndex(Conversations.SNIPPET))) in testQueryConversation_snippetEqualsMostRecentMessageBody()
112 .getInt(conversationCursor.getColumnIndex(Conversations.MESSAGE_COUNT))) in testQueryConversation_returnsCorrectMessageCount()
/cts/tests/tests/telecom/src/android/telecom/cts/
DThirdPartyCallScreeningServiceTest.java436 int numberIndex = callsCursor.getColumnIndex(CallLog.Calls.NUMBER); in addIncomingAndVerifyAllowed()
437 int callTypeIndex = callsCursor.getColumnIndex(CallLog.Calls.TYPE); in addIncomingAndVerifyAllowed()
438 int blockReasonIndex = callsCursor.getColumnIndex(CallLog.Calls.BLOCK_REASON); in addIncomingAndVerifyAllowed()
461 int numberIndex = callsCursor.getColumnIndex(CallLog.Calls.NUMBER); in addIncomingAndVerifyBlocked()
462 int callTypeIndex = callsCursor.getColumnIndex(CallLog.Calls.TYPE); in addIncomingAndVerifyBlocked()
463 int blockReasonIndex = callsCursor.getColumnIndex(CallLog.Calls.BLOCK_REASON); in addIncomingAndVerifyBlocked()
464 int callScreeningAppNameIndex = callsCursor.getColumnIndex( in addIncomingAndVerifyBlocked()
466 int callScreeningCmpNameIndex = callsCursor.getColumnIndex( in addIncomingAndVerifyBlocked()
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DCallLogTest.java142 cursor.getColumnIndex(CallLog.Calls.LOCATION)); in testLocationStorageAndRetrieval()
152 locationCursor.getColumnIndex(CallLog.Locations.LATITUDE)); in testLocationStorageAndRetrieval()
154 locationCursor.getColumnIndex(CallLog.Locations.LONGITUDE)); in testLocationStorageAndRetrieval()
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/
DExternalStorageTest.java199 cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))); in assertSuccessfulDownload()
201 cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI))); in assertSuccessfulDownload()

123