/cts/tests/mediaprovider/src/android/provider/cts/media/ |
D | MediaStore_Audio_Artists_AlbumsTest.java | 78 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 …]
|
D | MediaStore_Audio_Genres_MembersTest.java | 79 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 …]
|
D | MediaStore_Audio_Playlists_MembersTest.java | 133 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 …]
|
D | MediaStore_Audio_MediaTest.java | 90 Cursor c = null; in testGetContentUri() local 91 assertNotNull(c = mContentResolver.query( in testGetContentUri() 94 c.close(); in testGetContentUri() 102 Cursor c = null; in testGetContentUriForPath() local 105 c = mContentResolver.query(Media.getContentUriForPath(externalPath), null, null, in testGetContentUriForPath() 107 c.close(); in testGetContentUriForPath() 111 c = mContentResolver.query(Media.getContentUriForPath(internalPath), null, null, in testGetContentUriForPath() 113 c.close(); in testGetContentUriForPath() 134 Cursor c = mContentResolver.query(uri, null, null, null, null); in testStoreAudioMedia() local 135 assertEquals(1, c.getCount()); in testStoreAudioMedia() [all …]
|
D | MediaStore_Video_MediaTest.java | 103 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 …]
|
D | MediaStore_Images_MediaTest.java | 128 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 …]
|
D | MediaStore_Audio_ArtistsTest.java | 71 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 …]
|
D | MediaStore_Audio_AlbumsTest.java | 81 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 …]
|
D | MediaStore_Audio_PlaylistsTest.java | 71 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 …]
|
D | MediaStore_Images_ThumbnailsTest.java | 142 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 …]
|
/cts/tests/tests/media/common/jni/ |
D | md5_utils.cpp | 160 /*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/ |
D | ColorStateListTest.java | 54 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/ |
D | DatabaseStatementTest.java | 87 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/ |
D | HexEncoding.java | 55 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/ |
D | CarrierPrivilegeUtils.java | 86 Context c, in CarrierPrivilegeChangeMonitor() argument 91 mContext = c; in CarrierPrivilegeChangeMonitor() 180 private static TelephonyManager getTelephonyManager(Context c, int subId) { in getTelephonyManager() argument 181 return c.getSystemService(TelephonyManager.class).createForSubscriptionId(subId); in getTelephonyManager() 184 private static boolean hasCarrierPrivileges(Context c, int subId) { in hasCarrierPrivileges() argument 187 return getTelephonyManager(c, subId).hasCarrierPrivileges(); in hasCarrierPrivileges() 190 private static boolean isCarrierServicePackage(Context c, int subId, boolean isShell) { in isCarrierServicePackage() argument 195 getTelephonyManager(c, subId) in isCarrierServicePackage() 200 return getTelephonyManager(c, subId) in isCarrierServicePackage() 206 return Objects.equals(c.getOpPackageName(), carrierServicePackageName); in isCarrierServicePackage() [all …]
|
/cts/tests/tests/carrierapi/src/android/carrierapi/cts/ |
D | IccUtils.java | 78 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/ |
D | HexEncoding.java | 82 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/accessibility/src/android/view/accessibility/cts/ |
D | AccessibilityNodeInfo_CollectionInfoTest.java | 60 CollectionInfo c; in testObtain() local 62 c = CollectionInfo.obtain(0, 1, true); in testObtain() 63 assertNotNull(c); in testObtain() 64 verifyCollectionInfo(c, 0, 1, true, CollectionInfo.SELECTION_MODE_NONE); in testObtain() 66 c = CollectionInfo.obtain(1, 2, true, CollectionInfo.SELECTION_MODE_MULTIPLE); in testObtain() 67 assertNotNull(c); in testObtain() 68 verifyCollectionInfo(c, 1, 2, true, CollectionInfo.SELECTION_MODE_MULTIPLE); in testObtain() 74 CollectionInfo c; in testConstructor() local 76 c = new CollectionInfo(0, 1, true); in testConstructor() 77 verifyCollectionInfo(c, 0, 1, true, CollectionInfo.SELECTION_MODE_NONE); in testConstructor() [all …]
|
D | AccessibilityNodeInfo_CollectionItemInfoTest.java | 51 CollectionItemInfo c; in testObtain() local 53 c = CollectionItemInfo.obtain(0, 1, 2, 3, true); in testObtain() 54 assertNotNull(c); in testObtain() 55 verifyCollectionItemInfo(c, null, 0, 1, null, 2, 3, true, false); in testObtain() 57 c = CollectionItemInfo.obtain(4, 5, 6, 7, true, true); in testObtain() 58 assertNotNull(c); in testObtain() 59 verifyCollectionItemInfo(c, null, 4, 5, null, 6, 7, true, true); in testObtain() 65 CollectionItemInfo c; in testConstructor() local 67 c = new CollectionItemInfo(0, 1, 2, 3, true); in testConstructor() 68 verifyCollectionItemInfo(c, null, 0, 1, null, 2, 3, true, false); in testConstructor() [all …]
|
/cts/libs/json/src/com/android/json/stream/ |
D | JsonReader.java | 663 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/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ |
D | ShortcutManagerLauncherCallbackTest.java | 137 final MyCallback c = new MyCallback(); in testRegisterAndUnRegister() local 139 getLauncherApps().registerCallback(c, handler); in testRegisterAndUnRegister() 140 getLauncherApps().unregisterCallback(c); in testRegisterAndUnRegister() 146 final MyCallback c = new MyCallback(mPackageContext1.getPackageName()); in testCallbacks() local 157 getLauncherApps().unregisterCallback(c); in testCallbacks() 160 c.reset(); in testCallbacks() 161 getLauncherApps().registerCallback(c, handler); in testCallbacks() 175 retryUntil(() -> c.isCalled(), "callback not called."); in testCallbacks() 176 c.assertCalled(mPackageContext1) in testCallbacks() 188 retryUntil(() -> c.isCalled(), "callback not called."); in testCallbacks() [all …]
|
/cts/hostsidetests/appcompat/compatchanges/src/com/android/cts/appcompat/ |
D | CompatChangesValidConfigTest.java | 129 for (Change c : getOnDeviceCompatConfig()) { in testNoOverrides() 130 if (!OVERRIDES_ALLOWLIST.contains(c.changeName) && !c.overridable) { in testNoOverrides() 131 assertWithMessage("Change should not have overrides: " + c) in testNoOverrides() 132 .that(c.hasOverrides).isFalse(); in testNoOverrides() 141 for (Change c : getOnDeviceCompatConfig()) { in testOnlyAllowedlistedChangesAreOverridable() 143 if (c.overridable && getDevice().checkApiLevelAgainstNextRelease(c.sinceSdk)) { in testOnlyAllowedlistedChangesAreOverridable() 145 .that(OVERRIDABLE_CHANGES).contains(c.changeName); in testOnlyAllowedlistedChangesAreOverridable() 189 changes.removeIf(c -> c.changeId == SPLIT_AS_STREAM_RETURNS_SINGLE_EMPTY_STRING); in getExpectedCompatConfig() 193 changes.removeIf(c -> c.changeId == PRIORITY_QUEUE_OFFER_NON_COMPARABLE_ONE_ELEMENT); in getExpectedCompatConfig()
|
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/ |
D | ContactsContract_DirectoryTest.java | 73 private static String getString(Cursor c, String column) { in getString() argument 74 return c.getString(c.getColumnIndex(column)); in getString() 84 try (Cursor c = getContext().getContentResolver().query(Directory.CONTENT_URI, in waitForDirectorySetup() argument 88 if (c.getCount() == 0) { in waitForDirectorySetup() 92 assertTrue(c.moveToPosition(0)); in waitForDirectorySetup() 93 assertEquals(CtsGalProvider.GAL_PACKAGE_NAME, getString(c, Directory.PACKAGE_NAME)); in waitForDirectorySetup() 95 getString(c, Directory.DIRECTORY_AUTHORITY)); in waitForDirectorySetup() 96 assertEquals(CtsGalProvider.DISPLAY_NAME, getString(c, Directory.DISPLAY_NAME)); in waitForDirectorySetup() 97 assertEquals(CtsGalProvider.ACCOUNT_NAME, getString(c, Directory.ACCOUNT_NAME)); in waitForDirectorySetup() 98 assertEquals(CtsGalProvider.ACCOUNT_TYPE, getString(c, Directory.ACCOUNT_TYPE)); in waitForDirectorySetup() [all …]
|
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ |
D | StorageOtherAndOwnedFilesTest.java | 102 try (Cursor c = getResultForFilesQuery(sContentResolver, queryArgs)) { in test_latestSelectionOnly_noGrantsPresent() argument 103 assertThat(c).isNotNull(); in test_latestSelectionOnly_noGrantsPresent() 107 .that(c.getCount()).isEqualTo(0); in test_latestSelectionOnly_noGrantsPresent() 115 try (Cursor c = getResultForFilesQuery(sContentResolver, null)) { in test_latestSelectionOnly_withOwnedAndGrantedItems() argument 116 assertThat(c).isNotNull(); in test_latestSelectionOnly_withOwnedAndGrantedItems() 119 .that(c.getCount()).isEqualTo(TOTAL_OWNED_ITEMS); in test_latestSelectionOnly_withOwnedAndGrantedItems() 131 try (Cursor c = getResultForFilesQuery(sContentResolver, null)) { in test_latestSelectionOnly_withOwnedAndGrantedItems() argument 132 assertThat(c).isNotNull(); in test_latestSelectionOnly_withOwnedAndGrantedItems() 135 .that(c.getCount()).isEqualTo(TOTAL_OWNED_ITEMS + 1); in test_latestSelectionOnly_withOwnedAndGrantedItems() 141 try (Cursor c = getResultForFilesQuery(sContentResolver, null)) { in test_latestSelectionOnly_withOwnedAndGrantedItems() argument [all …]
|
/cts/tests/tests/telecom/src/android/telecom/cts/ |
D | MockConference.java | 70 for (Connection c : getConnections()) { in onDisconnect() 71 c.setDisconnected(new DisconnectCause(DisconnectCause.REMOTE)); in onDisconnect() 72 c.destroy(); in onDisconnect() 83 for (Connection c : getConnections()) { in onReject() 84 c.setDisconnected(new DisconnectCause(DisconnectCause.REJECTED)); in onReject() 85 c.destroy(); in onReject() 109 for (Connection c : getConnections()) { in onMerge() 110 c.setCallerDisplayName( in onMerge() 122 for (Connection c : getConnections()) { in onSwap() 123 c.setCallerDisplayName( in onSwap() [all …]
|