Home
last modified time | relevance | path

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

12345678910>>...22

/cts/tests/tests/provider/src/android/provider/cts/
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.java132 Cursor c = mContentResolver.query(uri, null, null, null, null); in insertAudioItem() local
133 c.moveToFirst(); in insertAudioItem()
134 long id = c.getLong(c.getColumnIndex(Media._ID)); in insertAudioItem()
135 c.close(); in insertAudioItem()
182 Cursor c = mContentResolver.query(playlistMembersUri, in verifyPlaylist() local
190 members.length, c.getCount()); in verifyPlaylist()
198 ordering.length, c.getCount()); in verifyPlaylist()
200 while (c.moveToNext()) { in verifyPlaylist()
201 int pos = c.getPosition(); in verifyPlaylist()
204 members[pos], c.getInt(c.getColumnIndex(Members.AUDIO_ID))); in verifyPlaylist()
[all …]
DMediaStore_Audio_MediaTest.java76 Cursor c = null; in testGetContentUri() local
77 assertNotNull(c = mContentResolver.query( in testGetContentUri()
80 c.close(); in testGetContentUri()
85 Cursor c = null; in testGetContentUriForPath() local
87 … assertNotNull(c = mContentResolver.query(Media.getContentUriForPath(externalPath), null, null, in testGetContentUriForPath()
89 c.close(); in testGetContentUriForPath()
92 … assertNotNull(c = mContentResolver.query(Media.getContentUriForPath(internalPath), null, null, in testGetContentUriForPath()
94 c.close(); in testGetContentUriForPath()
111 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioMedia() local
112 assertEquals(1, c.getCount()); in testStoreAudioMedia()
[all …]
DMediaStore_Images_MediaTest.java103 Cursor c = Media.query(mContentResolver, mExternalImages, null, null, in testInsertImageWithImagePath() local
105 int previousCount = c.getCount(); in testInsertImageWithImagePath()
106 c.close(); in testInsertImageWithImagePath()
141 c = Media.query(mContentResolver, Uri.parse(stringUrl), in testInsertImageWithImagePath()
143 assertEquals(1, c.getCount()); in testInsertImageWithImagePath()
144 c.moveToFirst(); in testInsertImageWithImagePath()
145 assertEquals(TEST_TITLE2, c.getString(c.getColumnIndex(Media.TITLE))); in testInsertImageWithImagePath()
146 assertEquals(MIME_TYPE_JPEG, c.getString(c.getColumnIndex(Media.MIME_TYPE))); in testInsertImageWithImagePath()
147 c.close(); in testInsertImageWithImagePath()
151 c = Media.query(mContentResolver, mExternalImages, in testInsertImageWithImagePath()
[all …]
DMediaStore_Audio_Artists_AlbumsTest.java73 Cursor c = null; in testGetContentUri() local
75 assertNotNull(c = mContentResolver.query(contentUri, null, null, null, null)); in testGetContentUri()
76 c.close(); in testGetContentUri()
84 Cursor c = mContentResolver.query(audioMediaUri, new String[] { Media.ARTIST_ID }, null, in testStoreAudioArtistsAlbums() local
86 c.moveToFirst(); in testStoreAudioArtistsAlbums()
87 Long artistId = c.getLong(c.getColumnIndex(Media.ARTIST_ID)); in testStoreAudioArtistsAlbums()
88 c.close(); in testStoreAudioArtistsAlbums()
100 c = mContentResolver.query(artistsAlbumsUri, null, null, null, null); in testStoreAudioArtistsAlbums()
101 assertEquals(1, c.getCount()); in testStoreAudioArtistsAlbums()
102 c.moveToFirst(); in testStoreAudioArtistsAlbums()
[all …]
DMediaStore_Video_MediaTest.java93 Cursor c = null; in testGetContentUri() local
94 assertNotNull(c = mContentResolver.query(Media.getContentUri("internal"), null, null, null, in testGetContentUri()
96 c.close(); in testGetContentUri()
97 assertNotNull(c = mContentResolver.query(Media.getContentUri(mVolumeName), null, null, null, in testGetContentUri()
99 c.close(); in testGetContentUri()
151 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreVideoMediaExternal() local
152 assertEquals(1, c.getCount()); in testStoreVideoMediaExternal()
153 c.moveToFirst(); in testStoreVideoMediaExternal()
154 long id = c.getLong(c.getColumnIndex(Media._ID)); in testStoreVideoMediaExternal()
156 assertEquals("cts", c.getString(c.getColumnIndex(Media.ALBUM))); in testStoreVideoMediaExternal()
[all …]
DMediaStore_Audio_AlbumsTest.java80 Cursor c = null; in testGetContentUri() local
81 assertNotNull(c = mContentResolver.query( in testGetContentUri()
84 c.close(); in testGetContentUri()
106 Cursor c = mContentResolver.query(audioAlbumsUri, null, selection, selectionArgs, in testStoreAudioAlbums() local
108 assertEquals(1, c.getCount()); in testStoreAudioAlbums()
109 c.moveToFirst(); in testStoreAudioAlbums()
110 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()
[all …]
DMediaStore_Audio_ArtistsTest.java70 Cursor c = null; in testGetContentUri() local
71 assertNotNull(c = mContentResolver.query( in testGetContentUri()
74 c.close(); in testGetContentUri()
94 Cursor c = mContentResolver.query(artistsUri, null, selection, selectionArgs, null); in testStoreAudioArtists() local
95 assertEquals(1, c.getCount()); in testStoreAudioArtists()
96 c.moveToFirst(); in testStoreAudioArtists()
98 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()
[all …]
DMediaStore_Images_ThumbnailsTest.java142 Cursor c = Thumbnails.queryMiniThumbnails(mContentResolver, in testQueryExternalThumbnails() local
144 int previousMicroKindCount = c.getCount(); in testQueryExternalThumbnails()
145 c.close(); in testQueryExternalThumbnails()
162 c = Thumbnails.queryMiniThumbnails(mContentResolver, uri, Thumbnails.MINI_KIND, null); in testQueryExternalThumbnails()
163 c.moveToFirst(); in testQueryExternalThumbnails()
164 assertEquals(1, c.getCount()); in testQueryExternalThumbnails()
165 assertEquals(Thumbnails.MINI_KIND, c.getInt(c.getColumnIndex(Thumbnails.KIND))); in testQueryExternalThumbnails()
166 assertEquals(path, c.getString(c.getColumnIndex(Thumbnails.DATA))); in testQueryExternalThumbnails()
169 c = Thumbnails.queryMiniThumbnails(mContentResolver, Thumbnails.EXTERNAL_CONTENT_URI, in testQueryExternalThumbnails()
171 assertEquals(previousMicroKindCount, c.getCount()); in testQueryExternalThumbnails()
[all …]
DSettings_NameValueTableTest.java65 Cursor c = cr.query(uri, null, null, null, null); in testPutString() local
67 assertNotNull(c); in testPutString()
68 c.close(); in testPutString()
71 c = cr.query(uri, null, null, null, null); in testPutString()
72 assertNotNull(c); in testPutString()
73 c.close(); in testPutString()
77 c = cr.query(uri, null, selection, null, null); in testPutString()
78 assertNotNull(c); in testPutString()
79 assertEquals(1, c.getCount()); in testPutString()
80 c.moveToFirst(); in testPutString()
[all …]
DMediaStore_Audio_PlaylistsTest.java71 Cursor c = null; in testGetContentUri() local
72 assertNotNull(c = mContentResolver.query( in testGetContentUri()
75 c.close(); in testGetContentUri()
94 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioPlaylistsExternal() local
95 assertEquals(1, c.getCount()); in testStoreAudioPlaylistsExternal()
96 c.moveToFirst(); in testStoreAudioPlaylistsExternal()
97 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()
[all …]
/cts/tests/tests/media/libmediandkjni/
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.java41 final ColorStateList c = new ColorStateList(state, colors); in testConstructor() local
42 assertTrue(c.isStateful()); in testConstructor()
43 assertEquals(Color.RED, c.getDefaultColor()); in testConstructor()
51 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId)); in testCreateFromXml() local
52 assertEquals(colorInXml, c.getDefaultColor()); in testCreateFromXml()
53 assertEquals(0, c.describeContents()); in testCreateFromXml()
54 assertFalse(c.isStateful()); in testCreateFromXml()
55 assertNotNull(c.toString()); in testCreateFromXml()
56 assertEquals(colorInXml, c.getColorForState(new int[]{0}, 0)); in testCreateFromXml()
66 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId), theme); in testCreateFromXmlThemed() local
[all …]
/cts/tests/tests/database/src/android/database/sqlite/cts/
DDatabaseStatementTest.java86 Cursor c = mDatabase.query("test", null, null, null, null, null, null); in testExecuteStatement() local
87 assertEquals(0, c.getCount()); in testExecuteStatement()
88 c.deactivate(); in testExecuteStatement()
140 Cursor c = mDatabase.query("test", null, null, null, null, null, null); in testStatementLongBinding() local
141 int numCol = c.getColumnIndexOrThrow("num"); in testStatementLongBinding()
142 c.moveToFirst(); in testStatementLongBinding()
144 long num = c.getLong(numCol); in testStatementLongBinding()
146 c.moveToNext(); in testStatementLongBinding()
148 c.close(); in testStatementLongBinding()
162 Cursor c = mDatabase.query("test", null, null, null, null, null, null); in testStatementStringBinding() local
[all …]
/cts/tests/accessibility/src/android/view/accessibility/cts/
DAccessibilityNodeInfo_CollectionInfoTest.java32 CollectionInfo c; in testObtain() local
34 c = CollectionInfo.obtain(0, 1, true); in testObtain()
35 assertNotNull(c); in testObtain()
36 assertEquals(0, c.getRowCount()); in testObtain()
37 assertEquals(1, c.getColumnCount()); in testObtain()
38 assertTrue(c.isHierarchical()); in testObtain()
39 assertEquals(CollectionInfo.SELECTION_MODE_NONE, c.getSelectionMode()); in testObtain()
41 c = CollectionInfo.obtain(1, 2, true, CollectionInfo.SELECTION_MODE_MULTIPLE); in testObtain()
42 assertNotNull(c); in testObtain()
43 assertEquals(1, c.getRowCount()); in testObtain()
[all …]
/cts/libs/json/src/com/android/json/stream/
DJsonReader.java663 int c = nextNonWhitespace(); in nextValue() local
664 switch (c) { in nextValue()
676 value = nextString((char) c); in nextValue()
711 int c = buffer[pos++]; in nextNonWhitespace() local
712 switch (c) { in nextNonWhitespace()
721 return c; in nextNonWhitespace()
743 return c; in nextNonWhitespace()
757 return c; in nextNonWhitespace()
777 char c = buffer[pos++]; in skipToEndOfLine() local
778 if (c == '\r' || c == '\n') { in skipToEndOfLine()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContract_DirectoryTest.java65 private static String getString(Cursor c, String column) { in getString() argument
66 return c.getString(c.getColumnIndex(column)); in getString()
76 try (Cursor c = getContext().getContentResolver().query(Directory.CONTENT_URI, in waitForDirectorySetup() argument
80 if (c.getCount() == 0) { in waitForDirectorySetup()
84 assertTrue(c.moveToPosition(0)); in waitForDirectorySetup()
85 assertEquals(getContext().getPackageName(), getString(c, Directory.PACKAGE_NAME)); in waitForDirectorySetup()
87 getString(c, Directory.DIRECTORY_AUTHORITY)); in waitForDirectorySetup()
88 assertEquals(DummyGalProvider.DISPLAY_NAME, getString(c, Directory.DISPLAY_NAME)); in waitForDirectorySetup()
89 assertEquals(DummyGalProvider.ACCOUNT_NAME, getString(c, Directory.ACCOUNT_NAME)); in waitForDirectorySetup()
90 assertEquals(DummyGalProvider.ACCOUNT_TYPE, getString(c, Directory.ACCOUNT_TYPE)); in waitForDirectorySetup()
[all …]
/cts/tests/tests/carrierapi/src/android/carrierapi/cts/
DIccUtils.java82 public static int hexCharToInt(char c) { in hexCharToInt() argument
83 if (c >= '0' && c <= '9') return (c - '0'); in hexCharToInt()
84 if (c >= 'A' && c <= 'F') return (c - 'A' + 10); in hexCharToInt()
85 if (c >= 'a' && c <= 'f') return (c - 'a' + 10); in hexCharToInt()
87 throw new RuntimeException ("invalid hex char '" + c + "'"); in hexCharToInt()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerLauncherCallbackTest.java134 final MyCallback c = new MyCallback(); in testRegisterAndUnRegister() local
136 getLauncherApps().registerCallback(c, handler); in testRegisterAndUnRegister()
137 getLauncherApps().unregisterCallback(c); in testRegisterAndUnRegister()
141 final MyCallback c = new MyCallback(mPackageContext1.getPackageName()); in testCallbacks() local
152 getLauncherApps().unregisterCallback(c); in testCallbacks()
155 c.reset(); in testCallbacks()
156 getLauncherApps().registerCallback(c, handler); in testCallbacks()
170 retryUntil(() -> c.isCalled(), "callback not called."); in testCallbacks()
171 c.assertCalled(mPackageContext1) in testCallbacks()
183 retryUntil(() -> c.isCalled(), "callback not called."); in testCallbacks()
[all …]
/cts/tests/tests/keystore/src/android/keystore/cts/
DHexEncoding.java82 private static int getHexadecimalDigitValue(char c) { in getHexadecimalDigitValue() argument
83 if ((c >= 'a') && (c <= 'f')) { in getHexadecimalDigitValue()
84 return (c - 'a') + 0x0a; in getHexadecimalDigitValue()
85 } else if ((c >= 'A') && (c <= 'F')) { in getHexadecimalDigitValue()
86 return (c - 'A') + 0x0a; in getHexadecimalDigitValue()
87 } else if ((c >= '0') && (c <= '9')) { in getHexadecimalDigitValue()
88 return c - '0'; in getHexadecimalDigitValue()
91 "Invalid hexadecimal digit at position : '" + c + "' (0x" + Integer.toHexString(c) + ")"); in getHexadecimalDigitValue()
/cts/tests/tests/telecom/src/android/telecom/cts/
DMockConference.java55 for (Connection c : getConnections()) { in onDisconnect()
56 c.setDisconnected(new DisconnectCause(DisconnectCause.REMOTE)); in onDisconnect()
57 c.destroy(); in onDisconnect()
80 for (Connection c : getConnections()) { in onMerge()
81 c.setCallerDisplayName( in onMerge()
93 for (Connection c : getConnections()) { in onSwap()
94 c.setCallerDisplayName( in onSwap()
105 for (Connection c : getConnections()) { in onHold()
106 c.setOnHold(); in onHold()
117 for (Connection c : getConnections()) { in onUnhold()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DPhoneNumberUtilsTest.java263 for (char c = '0'; c <= '9'; c++) { in testJudgeMethods()
264 assertTrue(PhoneNumberUtils.is12Key(c)); in testJudgeMethods()
265 assertTrue(PhoneNumberUtils.isDialable(c)); in testJudgeMethods()
266 assertTrue(PhoneNumberUtils.isISODigit(c)); in testJudgeMethods()
267 assertTrue(PhoneNumberUtils.isNonSeparator(c)); in testJudgeMethods()
268 assertTrue(PhoneNumberUtils.isReallyDialable(c)); in testJudgeMethods()
270 char c = '*'; in testJudgeMethods() local
271 assertTrue(PhoneNumberUtils.is12Key(c)); in testJudgeMethods()
272 assertTrue(PhoneNumberUtils.isDialable(c)); in testJudgeMethods()
273 assertTrue(PhoneNumberUtils.isNonSeparator(c)); in testJudgeMethods()
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/
DExtendedCameraCharacteristicsTest.java151 CameraCharacteristics c = mAllStaticInfo.get(id).getCharacteristics(); in testAvailableStreamConfigs() local
153 c.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); in testAvailableStreamConfigs()
158 int[] actualCapabilities = c.get(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES); in testAvailableStreamConfigs()
201 c, CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE); in testAvailableStreamConfigs()
203 c, CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE); in testAvailableStreamConfigs()
208 Integer lensFacing = c.get(CameraCharacteristics.LENS_FACING); in testAvailableStreamConfigs()
228 Integer hwLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); in testAvailableStreamConfigs()
385 private void verifyCommonRecommendedConfiguration(String id, CameraCharacteristics c, in verifyCommonRecommendedConfiguration() argument
389 StreamConfigurationMap fullConfig = c.get( in verifyCommonRecommendedConfiguration()
494 private void verifyRecommendedPreviewConfiguration(String cameraId, CameraCharacteristics c, in verifyRecommendedPreviewConfiguration() argument
[all …]
/cts/tests/tests/util/src/android/util/cts/
DTimeUtilsTest.java52 Calendar c = Calendar.getInstance(tz); in testUnitedStates() local
55 c.set(2016, Calendar.OCTOBER, 20, 12, 0, 0); in testUnitedStates()
56 guess = guessTimeZone(c, "us"); in testUnitedStates()
59 c.set(2017, Calendar.JANUARY, 20, 12, 0, 0); in testUnitedStates()
60 guess = guessTimeZone(c, "us"); in testUnitedStates()
74 Calendar c = Calendar.getInstance(tz); in testWeirdUnitedStates() local
77 c.set(2016, Calendar.OCTOBER, 20, 12, 0, 0); in testWeirdUnitedStates()
78 guess = guessTimeZone(c, "us"); in testWeirdUnitedStates()
91 Calendar c = Calendar.getInstance(tz); in testOld() local
94 c.set(2005, Calendar.OCTOBER, 20, 12, 0, 0); in testOld()
[all …]
/cts/tests/tests/graphics/src/android/graphics/text/cts/
DLineBreakerTest.java107 ParagraphConstraints c = new ParagraphConstraints(); in testSetGetWidth() local
108 assertEquals(0, c.getWidth(), 0.0f); // 0 by default in testSetGetWidth()
109 c.setWidth(100); in testSetGetWidth()
110 assertEquals(100, c.getWidth(), 0.0f); in testSetGetWidth()
111 c.setWidth(200); in testSetGetWidth()
112 assertEquals(200, c.getWidth(), 0.0f); in testSetGetWidth()
117 ParagraphConstraints c = new ParagraphConstraints(); in testSetGetIndent() local
118 assertEquals(0.0f, c.getFirstWidth(), 0.0f); // 0 by default in testSetGetIndent()
119 assertEquals(0, c.getFirstWidthLineCount()); // 0 by default in testSetGetIndent()
120 c.setIndent(100.0f, 1); in testSetGetIndent()
[all …]

12345678910>>...22