Home
last modified time | relevance | path

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

123

/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_Audio_Playlists_MembersTest.java134 long id = c.getLong(c.getColumnIndex(Media._ID)); in insertAudioItem()
204 members[pos], c.getInt(c.getColumnIndex(Members.AUDIO_ID))); in verifyPlaylist()
208 ordering[pos], c.getInt(c.getColumnIndex(Members.PLAY_ORDER))); in verifyPlaylist()
231 long playlistId = c.getLong(c.getColumnIndex(Playlists._ID)); in testStoreAudioPlaylistsMembersExternal()
250 long memberId = c.getLong(c.getColumnIndex(Members._ID)); in testStoreAudioPlaylistsMembersExternal()
254 assertEquals(expected1, c.getString(c.getColumnIndex(Members.DATA))); in testStoreAudioPlaylistsMembersExternal()
255 assertTrue(c.getLong(c.getColumnIndex(Members.DATE_ADDED)) > 0); in testStoreAudioPlaylistsMembersExternal()
256 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Members.DATE_MODIFIED))); in testStoreAudioPlaylistsMembersExternal()
257 assertEquals(Audio1.DISPLAY_NAME, c.getString(c.getColumnIndex(Members.DISPLAY_NAME))); in testStoreAudioPlaylistsMembersExternal()
258 assertEquals(Audio1.MIME_TYPE, c.getString(c.getColumnIndex(Members.MIME_TYPE))); in testStoreAudioPlaylistsMembersExternal()
[all …]
DMediaStore_Audio_Genres_MembersTest.java81 mAudioIdOfJam = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
87 mAudioIdOfJamLive = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
118 long genreId = c.getLong(c.getColumnIndex(Genres._ID)); in testStoreAudioGenresMembersExternal()
139 assertEquals(mAudioIdOfJam, c.getLong(c.getColumnIndex(Members.AUDIO_ID))); in testStoreAudioGenresMembersExternal()
140 assertEquals(genreId, c.getLong(c.getColumnIndex(Members.GENRE_ID))); in testStoreAudioGenresMembersExternal()
141 assertEquals(mAudioIdOfJam, c.getLong(c.getColumnIndex(Members._ID))); in testStoreAudioGenresMembersExternal()
144 assertEquals(expected1, c.getString(c.getColumnIndex(Members.DATA))); in testStoreAudioGenresMembersExternal()
145 assertTrue(c.getLong(c.getColumnIndex(Members.DATE_ADDED)) > 0); in testStoreAudioGenresMembersExternal()
146 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Members.DATE_MODIFIED))); in testStoreAudioGenresMembersExternal()
147 assertEquals(Audio1.DISPLAY_NAME, c.getString(c.getColumnIndex(Members.DISPLAY_NAME))); in testStoreAudioGenresMembersExternal()
[all …]
DMediaStore_Audio_MediaTest.java114 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreAudioMedia()
117 assertEquals(expected, c.getString(c.getColumnIndex(Media.DATA))); in testStoreAudioMedia()
118 assertTrue(c.getLong(c.getColumnIndex(Media.DATE_ADDED)) > 0); in testStoreAudioMedia()
119 assertEquals(Audio1.DATE_MODIFIED, c.getLong(c.getColumnIndex(Media.DATE_MODIFIED))); in testStoreAudioMedia()
120 assertEquals(Audio1.DISPLAY_NAME, c.getString(c.getColumnIndex(Media.DISPLAY_NAME))); in testStoreAudioMedia()
121 assertEquals(Audio1.MIME_TYPE, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testStoreAudioMedia()
122 assertEquals(Audio1.SIZE, c.getInt(c.getColumnIndex(Media.SIZE))); in testStoreAudioMedia()
123 assertEquals(Audio1.TITLE, c.getString(c.getColumnIndex(Media.TITLE))); in testStoreAudioMedia()
124 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreAudioMedia()
125 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_Images_MediaTest.java148 assertEquals(TEST_TITLE2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
149 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
159 assertEquals(TEST_TITLE2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
160 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
162 assertEquals(TEST_TITLE1, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
163 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
172 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
198 Uri.fromFile(new File(c.getString(c.getColumnIndex(Media.DATA))))); in testInsertImageWithBitmap()
261 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreImagesMediaExternal()
263 assertEquals(0, c.getInt(c.getColumnIndex(Media.ORIENTATION))); in testStoreImagesMediaExternal()
[all …]
DMediaStore_Audio_Artists_AlbumsTest.java87 Long artistId = c.getLong(c.getColumnIndex(Media.ARTIST_ID)); in testStoreAudioArtistsAlbums()
104 assertFalse(c.isNull(c.getColumnIndex(Albums.ALBUM_ID))); in testStoreAudioArtistsAlbums()
105 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioArtistsAlbums()
106 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioArtistsAlbums()
107 assertNotNull(c.getString(c.getColumnIndex(Albums.ALBUM_KEY))); in testStoreAudioArtistsAlbums()
108 assertFalse(c.isNull(c.getColumnIndex(Albums.ARTIST_ID))); in testStoreAudioArtistsAlbums()
109 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Albums.ARTIST))); in testStoreAudioArtistsAlbums()
110 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.FIRST_YEAR))); in testStoreAudioArtistsAlbums()
111 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.LAST_YEAR))); in testStoreAudioArtistsAlbums()
112 assertEquals(1, c.getInt(c.getColumnIndex(Albums.NUMBER_OF_SONGS))); in testStoreAudioArtistsAlbums()
[all …]
DMediaStore_Audio_AlbumsTest.java110 long id = c.getLong(c.getColumnIndex(Albums._ID)); in testStoreAudioAlbums()
112 assertFalse(c.isNull(c.getColumnIndex(Albums.ALBUM_ID))); in testStoreAudioAlbums()
113 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioAlbums()
114 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioAlbums()
115 assertNotNull(c.getString(c.getColumnIndex(Albums.ALBUM_KEY))); in testStoreAudioAlbums()
116 assertFalse(c.isNull(c.getColumnIndex(Albums.ARTIST_ID))); in testStoreAudioAlbums()
117 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Albums.ARTIST))); in testStoreAudioAlbums()
118 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.FIRST_YEAR))); in testStoreAudioAlbums()
119 assertEquals(Audio1.YEAR, c.getInt(c.getColumnIndex(Albums.LAST_YEAR))); in testStoreAudioAlbums()
120 assertEquals(1, c.getInt(c.getColumnIndex(Albums.NUMBER_OF_SONGS))); in testStoreAudioAlbums()
[all …]
DMediaStore_Audio_ArtistsTest.java98 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Artists.ARTIST))); in testStoreAudioArtists()
99 long id = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
101 assertNotNull(c.getString(c.getColumnIndex(Artists.ARTIST_KEY))); in testStoreAudioArtists()
102 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_ALBUMS))); in testStoreAudioArtists()
103 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_TRACKS))); in testStoreAudioArtists()
130 long fid = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
DMediaStore_Audio_PlaylistsTest.java97 assertEquals("My favourites", c.getString(c.getColumnIndex(Playlists.NAME))); in testStoreAudioPlaylistsExternal()
99 c.getString(c.getColumnIndex(Playlists.DATA))); in testStoreAudioPlaylistsExternal()
101 long realDateAdded = c.getLong(c.getColumnIndex(Playlists.DATE_ADDED)); in testStoreAudioPlaylistsExternal()
103 assertEquals(dateModified, c.getLong(c.getColumnIndex(Playlists.DATE_MODIFIED))); in testStoreAudioPlaylistsExternal()
104 assertTrue(c.getLong(c.getColumnIndex(Playlists._ID)) > 0); in testStoreAudioPlaylistsExternal()
DMediaStore_Images_ThumbnailsTest.java164 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryExternalThumbnails()
165 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryExternalThumbnails()
177 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryExternalThumbnails()
178 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryExternalThumbnails()
206 long imageId = c.getLong(c.getColumnIndex(Media._ID)); in testQueryExternalMiniThumbnails()
207 String imagePath = c.getString(c.getColumnIndex(Media.DATA)); in testQueryExternalMiniThumbnails()
231 imageId = c.getLong(c.getColumnIndex(Media._ID)); in testQueryExternalMiniThumbnails()
232 imagePath = c.getString(c.getColumnIndex(Media.DATA)); in testQueryExternalMiniThumbnails()
275 long id = c.getLong(c.getColumnIndex(Thumbnails._ID)); in testStoreImagesMediaExternal()
277 assertEquals(Thumbnails.FULL_SCREEN_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testStoreImagesMediaExternal()
[all …]
DMediaStore_DownloadsTest.java160 cursor.getString(cursor.getColumnIndex(Images.Media.MIME_TYPE))); in testMediaInDownloadsDir()
201 cursor.getString(cursor.getColumnIndex(Downloads.MIME_TYPE))); in testInsertDownload()
203 cursor.getString(cursor.getColumnIndex(Downloads.DISPLAY_NAME))); in testInsertDownload()
205 cursor.getString(cursor.getColumnIndex(Downloads.DOWNLOAD_URI))); in testInsertDownload()
207 cursor.getString(cursor.getColumnIndex(Downloads.REFERER_URI))); in testInsertDownload()
251 cursor.getString(cursor.getColumnIndex(Downloads.MIME_TYPE))); in testUpdateDownload()
253 cursor.getString(cursor.getColumnIndex(Downloads.DOWNLOAD_URI))); in testUpdateDownload()
DMediaStore_Audio_GenresTest.java94 assertEquals("POP", c.getString(c.getColumnIndex(Genres.NAME))); in testStoreAudioGenresExternal()
95 assertTrue(c.getLong(c.getColumnIndex(Genres._ID)) > 0); in testStoreAudioGenresExternal()
134 assertEquals(genreId, cursor.getLong(cursor.getColumnIndex(Genres._ID))); in testGetContentUriForAudioId()
/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/provider/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.java66 return c.getString(c.getColumnIndex(column)); in getString()
91 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/
DSmsTest.java80 String actualSmsBody = cursor.getString(cursor.getColumnIndex(Telephony.Sms.BODY)); in testSmsInsert()
224 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.READ))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
227 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.STATUS))).isEqualTo(-1); in testDefaultValuesAreInsertedInSmsTable()
230 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.DATE_SENT))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
233 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.LOCKED))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
236 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.SUBSCRIPTION_ID))).isEqualTo(-1); in testDefaultValuesAreInsertedInSmsTable()
239 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.ERROR_CODE))).isEqualTo(-1); in testDefaultValuesAreInsertedInSmsTable()
242 cursor.getInt(cursor.getColumnIndex(Telephony.Sms.SEEN))).isEqualTo(0); in testDefaultValuesAreInsertedInSmsTable()
264 int thread_id = cursor.getInt(cursor.getColumnIndex(Telephony.Sms.THREAD_ID)); in testDeleteSms_ifLastSmsDeletedThenThreadIsDeleted()
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()
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()
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.java433 int numberIndex = callsCursor.getColumnIndex(CallLog.Calls.NUMBER); in addIncomingAndVerifyAllowed()
434 int callTypeIndex = callsCursor.getColumnIndex(CallLog.Calls.TYPE); in addIncomingAndVerifyAllowed()
435 int blockReasonIndex = callsCursor.getColumnIndex(CallLog.Calls.BLOCK_REASON); in addIncomingAndVerifyAllowed()
458 int numberIndex = callsCursor.getColumnIndex(CallLog.Calls.NUMBER); in addIncomingAndVerifyBlocked()
459 int callTypeIndex = callsCursor.getColumnIndex(CallLog.Calls.TYPE); in addIncomingAndVerifyBlocked()
460 int blockReasonIndex = callsCursor.getColumnIndex(CallLog.Calls.BLOCK_REASON); in addIncomingAndVerifyBlocked()
461 int callScreeningAppNameIndex = callsCursor.getColumnIndex( in addIncomingAndVerifyBlocked()
463 int callScreeningCmpNameIndex = callsCursor.getColumnIndex( in addIncomingAndVerifyBlocked()
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/
DExternalStorageTest.java195 cursor.getColumnIndex(DownloadManager.COLUMN_STATUS))); in assertSuccessfulDownload()
197 cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI))); in assertSuccessfulDownload()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DSmsCbMessageTest.java298 doReturn(-1).when(cursor).getColumnIndex(eq( in testCreateFromCursor()
301 doReturn(-1).when(cursor).getColumnIndex(eq( in testCreateFromCursor()
304 doReturn(9).when(cursor).getColumnIndex(eq( in testCreateFromCursor()

123