Home
last modified time | relevance | path

Searched refs:c (Results 1 – 25 of 609) sorted by relevance

12345678910>>...25

/cts/tests/mediaprovider/modern/src/android/provider/cts/media/modern/
DMediaStore_Audio_Artists_AlbumsTest.java79 Cursor c = null; in testGetContentUri() local
81 assertNotNull(c = mContentResolver.query(contentUri, null, null, null, null)); in testGetContentUri()
82 c.close(); in testGetContentUri()
91 Cursor c = mContentResolver.query(audioMediaUri, new String[] { Media.ARTIST_ID }, null, in testStoreAudioArtistsAlbums() local
93 c.moveToFirst(); in testStoreAudioArtistsAlbums()
94 Long artistId = c.getLong(c.getColumnIndex(Media.ARTIST_ID)); in testStoreAudioArtistsAlbums()
95 c.close(); in testStoreAudioArtistsAlbums()
107 c = mContentResolver.query(artistsAlbumsUri, null, null, null, null); in testStoreAudioArtistsAlbums()
108 assertEquals(1, c.getCount()); in testStoreAudioArtistsAlbums()
109 c.moveToFirst(); in testStoreAudioArtistsAlbums()
[all …]
DMediaStore_Audio_Genres_MembersTest.java79 Cursor c = mContentResolver.query(uri, null, null, null, null); in setUp() local
80 c.moveToFirst(); in setUp()
81 mAudioIdOfJam = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
82 c.close(); in setUp()
85 c = mContentResolver.query(uri, null, null, null, null); in setUp()
86 c.moveToFirst(); in setUp()
87 mAudioIdOfJamLive = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
88 c.close(); in setUp()
104 Cursor c = null; in testGetContentUri() local
105 assertNotNull(c = mContentResolver.query( in testGetContentUri()
[all …]
DMediaStore_Audio_Playlists_MembersTest.java134 Cursor c = mContentResolver.query(uri, null, null, null, null); in insertAudioItem() local
135 c.moveToFirst(); in insertAudioItem()
136 long id = c.getLong(c.getColumnIndex(Media._ID)); in insertAudioItem()
137 c.close(); in insertAudioItem()
185 Cursor c = mContentResolver.query(playlistMembersUri, in verifyPlaylist() local
193 members.length, c.getCount()); in verifyPlaylist()
201 ordering.length, c.getCount()); in verifyPlaylist()
203 while (c.moveToNext()) { in verifyPlaylist()
204 int pos = c.getPosition(); in verifyPlaylist()
207 members[pos], c.getInt(c.getColumnIndex(Members.AUDIO_ID))); in verifyPlaylist()
[all …]
DMediaStore_Audio_MediaTest.java92 Cursor c = null; in testGetContentUri() local
93 assertNotNull(c = mContentResolver.query( in testGetContentUri()
96 c.close(); in testGetContentUri()
104 Cursor c = null; in testGetContentUriForPath() local
107 c = mContentResolver.query(Media.getContentUriForPath(externalPath), null, null, in testGetContentUriForPath()
109 c.close(); in testGetContentUriForPath()
113 c = mContentResolver.query(Media.getContentUriForPath(internalPath), null, null, in testGetContentUriForPath()
115 c.close(); in testGetContentUriForPath()
137 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioMedia() local
138 assertEquals(1, c.getCount()); in testStoreAudioMedia()
[all …]
DMediaStore_Video_MediaTest.java104 Cursor c = null; in testGetContentUri() local
105 assertNotNull(c = mContentResolver.query(Media.getContentUri("internal"), null, null, null, in testGetContentUri()
107 c.close(); in testGetContentUri()
108 assertNotNull(c = mContentResolver.query(Media.getContentUri(mVolumeName), null, null, null, in testGetContentUri()
110 c.close(); in testGetContentUri()
158 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreVideoMediaExternal() local
159 assertEquals(1, c.getCount()); in testStoreVideoMediaExternal()
160 c.moveToFirst(); in testStoreVideoMediaExternal()
161 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreVideoMediaExternal()
163 assertEquals("cts", c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreVideoMediaExternal()
[all …]
DMediaStore_Images_MediaTest.java130 Cursor c = Media.query(mContentResolver, mExternalImages, null, null, in testInsertImageWithImagePath() local
132 int previousCount = c.getCount(); in testInsertImageWithImagePath()
133 c.close(); in testInsertImageWithImagePath()
160 c = Media.query(mContentResolver, Uri.parse(stringUrl), in testInsertImageWithImagePath()
162 assertEquals(1, c.getCount()); in testInsertImageWithImagePath()
163 c.moveToFirst(); in testInsertImageWithImagePath()
164 assertEquals(testTitle2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
165 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
166 c.close(); in testInsertImageWithImagePath()
170 c = Media.query(mContentResolver, mExternalImages, in testInsertImageWithImagePath()
[all …]
DMediaStore_Audio_ArtistsTest.java72 Cursor c = null; in testGetContentUri() local
73 assertNotNull(c = mContentResolver.query( in testGetContentUri()
76 c.close(); in testGetContentUri()
97 Cursor c = mContentResolver.query(artistsUri, null, selection, selectionArgs, null); in testStoreAudioArtists() local
98 assertEquals(1, c.getCount()); in testStoreAudioArtists()
99 c.moveToFirst(); in testStoreAudioArtists()
101 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Artists.ARTIST))); in testStoreAudioArtists()
102 long id = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
104 assertNotNull(c.getString(c.getColumnIndex(Artists.ARTIST_KEY))); in testStoreAudioArtists()
105 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_ALBUMS))); in testStoreAudioArtists()
[all …]
DMediaStore_Audio_AlbumsTest.java82 Cursor c = null; in testGetContentUri() local
83 assertNotNull(c = mContentResolver.query( in testGetContentUri()
86 c.close(); in testGetContentUri()
109 Cursor c = mContentResolver.query(audioAlbumsUri, null, selection, selectionArgs, in testStoreAudioAlbums() local
111 assertEquals(1, c.getCount()); in testStoreAudioAlbums()
112 c.moveToFirst(); in testStoreAudioAlbums()
113 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()
[all …]
DMediaStore_Audio_PlaylistsTest.java71 Cursor c = null; in testGetContentUri() local
72 assertNotNull(c = mContentResolver.query( in testGetContentUri()
75 c.close(); in testGetContentUri()
91 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioPlaylistsExternal() local
92 assertEquals(1, c.getCount()); in testStoreAudioPlaylistsExternal()
93 c.moveToFirst(); in testStoreAudioPlaylistsExternal()
95 c.getString(c.getColumnIndex(Playlists.NAME))); in testStoreAudioPlaylistsExternal()
97 long realDateAdded = c.getLong(c.getColumnIndex(Playlists.DATE_ADDED)); in testStoreAudioPlaylistsExternal()
98 long realDateModified = c.getLong(c.getColumnIndex(Playlists.DATE_MODIFIED)); in testStoreAudioPlaylistsExternal()
104 assertTrue(c.getLong(c.getColumnIndex(Playlists._ID)) > 0); in testStoreAudioPlaylistsExternal()
[all …]
/cts/tests/mediaprovider/src/android/provider/cts/media/
DMediaStore_Audio_Artists_AlbumsTest.java78 Cursor c = null; in testGetContentUri() local
80 assertNotNull(c = mContentResolver.query(contentUri, null, null, null, null)); in testGetContentUri()
81 c.close(); in testGetContentUri()
89 Cursor c = mContentResolver.query(audioMediaUri, new String[] { Media.ARTIST_ID }, null, in testStoreAudioArtistsAlbums() local
91 c.moveToFirst(); in testStoreAudioArtistsAlbums()
92 Long artistId = c.getLong(c.getColumnIndex(Media.ARTIST_ID)); in testStoreAudioArtistsAlbums()
93 c.close(); in testStoreAudioArtistsAlbums()
105 c = mContentResolver.query(artistsAlbumsUri, null, null, null, null); in testStoreAudioArtistsAlbums()
106 assertEquals(1, c.getCount()); in testStoreAudioArtistsAlbums()
107 c.moveToFirst(); in testStoreAudioArtistsAlbums()
[all …]
DMediaStore_Audio_Genres_MembersTest.java79 Cursor c = mContentResolver.query(uri, null, null, null, null); in setUp() local
80 c.moveToFirst(); in setUp()
81 mAudioIdOfJam = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
82 c.close(); in setUp()
85 c = mContentResolver.query(uri, null, null, null, null); in setUp()
86 c.moveToFirst(); in setUp()
87 mAudioIdOfJamLive = c.getLong(c.getColumnIndex(Media._ID)); in setUp()
88 c.close(); in setUp()
103 Cursor c = null; in testGetContentUri() local
104 assertNotNull(c = mContentResolver.query( in testGetContentUri()
[all …]
DMediaStore_Audio_Playlists_MembersTest.java133 Cursor c = mContentResolver.query(uri, null, null, null, null); in insertAudioItem() local
134 c.moveToFirst(); in insertAudioItem()
135 long id = c.getLong(c.getColumnIndex(Media._ID)); in insertAudioItem()
136 c.close(); in insertAudioItem()
183 Cursor c = mContentResolver.query(playlistMembersUri, in verifyPlaylist() local
191 members.length, c.getCount()); in verifyPlaylist()
199 ordering.length, c.getCount()); in verifyPlaylist()
201 while (c.moveToNext()) { in verifyPlaylist()
202 int pos = c.getPosition(); in verifyPlaylist()
205 members[pos], c.getInt(c.getColumnIndex(Members.AUDIO_ID))); in verifyPlaylist()
[all …]
DMediaStore_Audio_MediaTest.java91 Cursor c = null; in testGetContentUri() local
92 assertNotNull(c = mContentResolver.query( in testGetContentUri()
95 c.close(); in testGetContentUri()
103 Cursor c = null; in testGetContentUriForPath() local
106 c = mContentResolver.query(Media.getContentUriForPath(externalPath), null, null, in testGetContentUriForPath()
108 c.close(); in testGetContentUriForPath()
112 c = mContentResolver.query(Media.getContentUriForPath(internalPath), null, null, in testGetContentUriForPath()
114 c.close(); in testGetContentUriForPath()
135 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioMedia() local
136 assertEquals(1, c.getCount()); in testStoreAudioMedia()
[all …]
DMediaStore_Video_MediaTest.java103 Cursor c = null; in testGetContentUri() local
104 assertNotNull(c = mContentResolver.query(Media.getContentUri("internal"), null, null, null, in testGetContentUri()
106 c.close(); in testGetContentUri()
107 assertNotNull(c = mContentResolver.query(Media.getContentUri(mVolumeName), null, null, null, in testGetContentUri()
109 c.close(); in testGetContentUri()
156 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreVideoMediaExternal() local
157 assertEquals(1, c.getCount()); in testStoreVideoMediaExternal()
158 c.moveToFirst(); in testStoreVideoMediaExternal()
159 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreVideoMediaExternal()
161 assertEquals("cts", c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreVideoMediaExternal()
[all …]
DMediaStore_Images_MediaTest.java128 Cursor c = Media.query(mContentResolver, mExternalImages, null, null, in testInsertImageWithImagePath() local
130 int previousCount = c.getCount(); in testInsertImageWithImagePath()
131 c.close(); in testInsertImageWithImagePath()
158 c = Media.query(mContentResolver, Uri.parse(stringUrl), in testInsertImageWithImagePath()
160 assertEquals(1, c.getCount()); in testInsertImageWithImagePath()
161 c.moveToFirst(); in testInsertImageWithImagePath()
162 assertEquals(testTitle2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
163 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
164 c.close(); in testInsertImageWithImagePath()
168 c = Media.query(mContentResolver, mExternalImages, in testInsertImageWithImagePath()
[all …]
DMediaStore_Audio_ArtistsTest.java71 Cursor c = null; in testGetContentUri() local
72 assertNotNull(c = mContentResolver.query( in testGetContentUri()
75 c.close(); in testGetContentUri()
95 Cursor c = mContentResolver.query(artistsUri, null, selection, selectionArgs, null); in testStoreAudioArtists() local
96 assertEquals(1, c.getCount()); in testStoreAudioArtists()
97 c.moveToFirst(); in testStoreAudioArtists()
99 assertEquals(Audio1.ARTIST, c.getString(c.getColumnIndex(Artists.ARTIST))); in testStoreAudioArtists()
100 long id = c.getLong(c.getColumnIndex(Artists._ID)); in testStoreAudioArtists()
102 assertNotNull(c.getString(c.getColumnIndex(Artists.ARTIST_KEY))); in testStoreAudioArtists()
103 assertEquals(1, c.getInt(c.getColumnIndex(Artists.NUMBER_OF_ALBUMS))); in testStoreAudioArtists()
[all …]
DMediaStore_Audio_AlbumsTest.java81 Cursor c = null; in testGetContentUri() local
82 assertNotNull(c = mContentResolver.query( in testGetContentUri()
85 c.close(); in testGetContentUri()
107 Cursor c = mContentResolver.query(audioAlbumsUri, null, selection, selectionArgs, in testStoreAudioAlbums() local
109 assertEquals(1, c.getCount()); in testStoreAudioAlbums()
110 c.moveToFirst(); in testStoreAudioAlbums()
111 long id = c.getLong(c.getColumnIndex(Albums._ID)); in testStoreAudioAlbums()
113 assertFalse(c.isNull(c.getColumnIndex(Albums.ALBUM_ID))); in testStoreAudioAlbums()
114 assertEquals(Audio1.ALBUM, c.getString(c.getColumnIndex(Albums.ALBUM))); in testStoreAudioAlbums()
115 assertNull(c.getString(c.getColumnIndex(Albums.ALBUM_ART))); in testStoreAudioAlbums()
[all …]
DMediaStore_Audio_PlaylistsTest.java71 Cursor c = null; in testGetContentUri() local
72 assertNotNull(c = mContentResolver.query( in testGetContentUri()
75 c.close(); in testGetContentUri()
91 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioPlaylistsExternal() local
92 assertEquals(1, c.getCount()); in testStoreAudioPlaylistsExternal()
93 c.moveToFirst(); in testStoreAudioPlaylistsExternal()
95 c.getString(c.getColumnIndex(Playlists.NAME))); in testStoreAudioPlaylistsExternal()
97 long realDateAdded = c.getLong(c.getColumnIndex(Playlists.DATE_ADDED)); in testStoreAudioPlaylistsExternal()
98 long realDateModified = c.getLong(c.getColumnIndex(Playlists.DATE_MODIFIED)); in testStoreAudioPlaylistsExternal()
104 assertTrue(c.getLong(c.getColumnIndex(Playlists._ID)) > 0); in testStoreAudioPlaylistsExternal()
[all …]
/cts/tests/tests/media/common/jni/
Dmd5_utils.cpp160 /*register*/ UWORD32 a, b, c, d; in MD5Transform() local
164 c = buf[2]; in MD5Transform()
167 MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); in MD5Transform()
168 MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); in MD5Transform()
169 MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); in MD5Transform()
170 MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); in MD5Transform()
171 MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); in MD5Transform()
172 MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); in MD5Transform()
173 MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); in MD5Transform()
174 MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); in MD5Transform()
[all …]
/cts/tests/tests/content/src/android/content/res/cts/
DColorStateListTest.java54 final ColorStateList c = new ColorStateList(state, colors); in testConstructor() local
55 assertTrue(c.isStateful()); in testConstructor()
56 assertEquals(Color.RED, c.getDefaultColor()); in testConstructor()
65 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId)); in testCreateFromXml() local
66 assertEquals(colorInXml, c.getDefaultColor()); in testCreateFromXml()
67 assertEquals(0, c.describeContents()); in testCreateFromXml()
68 assertFalse(c.isStateful()); in testCreateFromXml()
69 assertNotNull(c.toString()); in testCreateFromXml()
70 assertEquals(colorInXml, c.getColorForState(new int[]{0}, 0)); in testCreateFromXml()
81 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId), theme); in testCreateFromXmlThemed() local
[all …]
/cts/tests/tests/database/src/android/database/sqlite/cts/
DDatabaseStatementTest.java87 Cursor c = mDatabase.query("test", null, null, null, null, null, null); in testExecuteStatement() local
88 assertEquals(0, c.getCount()); in testExecuteStatement()
89 c.deactivate(); in testExecuteStatement()
100 try (Cursor c = mDatabase.rawQuery("PRAGMA busy_timeout;", null)) { in testExecutePragmaStatement() argument
101 assertTrue(c.moveToNext()); in testExecutePragmaStatement()
102 assertEquals(c.getInt(0), 12000); in testExecutePragmaStatement()
154 Cursor c = mDatabase.query("test", null, null, null, null, null, null); in testStatementLongBinding() local
155 int numCol = c.getColumnIndexOrThrow("num"); in testStatementLongBinding()
156 c.moveToFirst(); in testStatementLongBinding()
158 long num = c.getLong(numCol); in testStatementLongBinding()
[all …]
/cts/tests/tests/time/src/android/app/time/cts/
DHexEncoding.java55 private static int getHexadecimalDigitValue(char c) { in getHexadecimalDigitValue() argument
56 if ((c >= 'a') && (c <= 'f')) { in getHexadecimalDigitValue()
57 return (c - 'a') + 0x0a; in getHexadecimalDigitValue()
58 } else if ((c >= 'A') && (c <= 'F')) { in getHexadecimalDigitValue()
59 return (c - 'A') + 0x0a; in getHexadecimalDigitValue()
60 } else if ((c >= '0') && (c <= '9')) { in getHexadecimalDigitValue()
61 return c - '0'; in getHexadecimalDigitValue()
64 "Invalid hexadecimal digit at position : '" + c + "' (0x" + Integer.toHexString( in getHexadecimalDigitValue()
65 c) + ")"); in getHexadecimalDigitValue()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DCarrierPrivilegeUtils.java86 Context c, in CarrierPrivilegeChangeMonitor() argument
91 mContext = c; in CarrierPrivilegeChangeMonitor()
181 private static TelephonyManager getTelephonyManager(Context c, int subId) { in getTelephonyManager() argument
182 return c.getSystemService(TelephonyManager.class).createForSubscriptionId(subId); in getTelephonyManager()
185 private static boolean hasCarrierPrivileges(Context c, int subId) { in hasCarrierPrivileges() argument
188 return getTelephonyManager(c, subId).hasCarrierPrivileges(); in hasCarrierPrivileges()
191 private static boolean isCarrierServicePackage(Context c, int subId, boolean isShell) { in isCarrierServicePackage() argument
196 getTelephonyManager(c, subId) in isCarrierServicePackage()
201 return getTelephonyManager(c, subId) in isCarrierServicePackage()
207 return Objects.equals(c.getOpPackageName(), carrierServicePackageName); in isCarrierServicePackage()
[all …]
/cts/tests/tests/carrierapi/src/android/carrierapi/cts/
DIccUtils.java78 public static int hexCharToInt(char c) { in hexCharToInt() argument
79 if (c >= '0' && c <= '9') return (c - '0'); in hexCharToInt()
80 if (c >= 'A' && c <= 'F') return (c - 'A' + 10); in hexCharToInt()
81 if (c >= 'a' && c <= 'f') return (c - 'a' + 10); in hexCharToInt()
83 throw new RuntimeException("invalid hex char '" + c + "'"); in hexCharToInt()
/cts/tests/tests/keystore/src/android/keystore/cts/
DHexEncoding.java86 private static int getHexadecimalDigitValue(char c) { in getHexadecimalDigitValue() argument
87 if ((c >= 'a') && (c <= 'f')) { in getHexadecimalDigitValue()
88 return (c - 'a') + 0x0a; in getHexadecimalDigitValue()
89 } else if ((c >= 'A') && (c <= 'F')) { in getHexadecimalDigitValue()
90 return (c - 'A') + 0x0a; in getHexadecimalDigitValue()
91 } else if ((c >= '0') && (c <= '9')) { in getHexadecimalDigitValue()
92 return c - '0'; in getHexadecimalDigitValue()
94 throw new IllegalArgumentException("Invalid hexadecimal digit at position : '" + c in getHexadecimalDigitValue()
95 + "' (0x" + Integer.toHexString(c) + ")"); in getHexadecimalDigitValue()

12345678910>>...25