/cts/tests/tests/wifi/src/android/net/wifi/cts/ |
D | WifiSsidTest.java | 34 TEST_SSID_UTF_8.getBytes(StandardCharsets.UTF_8); 38 "服務集識別碼".getBytes(Charset.forName("GBK")); 47 assertThat(wifiSsidUtf8.getBytes()).isEqualTo(TEST_SSID_UTF_8_BYTES); in testFromByteArray() 51 assertThat(wifiSsidNonUtf8.getBytes()).isEqualTo(TEST_SSID_NON_UTF_8_BYTES); in testFromByteArray() 55 assertThat(wifiSsidEmpty.getBytes()).isEmpty(); in testFromByteArray() 59 assertThat(wifiSsidNull.getBytes()).isEmpty(); in testFromByteArray()
|
/cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
D | DataTransferTest.java | 94 return getBytes("get-estimated-download-bytes"); in getEstimatedDownloadBytes() 98 return getBytes("get-estimated-upload-bytes"); in getEstimatedUploadBytes() 102 return getBytes("get-transferred-download-bytes"); in getTransferredDownloadBytes() 106 return getBytes("get-transferred-upload-bytes"); in getTransferredUploadBytes() 109 private long getBytes(String option) throws Exception { in getBytes() method in DataTransferTest
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | WifiSsidRestrictionTest.java | 66 Arrays.asList(WifiSsid.fromBytes("ssid1".getBytes(StandardCharsets.UTF_8)), in setWifiSsidPolicy_validAllowlist_works() 67 WifiSsid.fromBytes("ssid2".getBytes(StandardCharsets.UTF_8)), in setWifiSsidPolicy_validAllowlist_works() 68 WifiSsid.fromBytes("ssid3".getBytes(StandardCharsets.UTF_8)))); in setWifiSsidPolicy_validAllowlist_works() 88 Arrays.asList(WifiSsid.fromBytes("ssid1".getBytes(StandardCharsets.UTF_8)), in setWifiSsidPolicy_validDenylist_works() 89 WifiSsid.fromBytes("ssid2".getBytes(StandardCharsets.UTF_8)), in setWifiSsidPolicy_validDenylist_works() 90 WifiSsid.fromBytes("ssid3".getBytes(StandardCharsets.UTF_8)))); in setWifiSsidPolicy_validDenylist_works() 109 Arrays.asList(WifiSsid.fromBytes("ssid1".getBytes(StandardCharsets.UTF_8)))); in setWifiSsidPolicy_validRemoveRestriction_works() 140 Arrays.asList(WifiSsid.fromBytes("ssid1".getBytes(StandardCharsets.UTF_8)))); in setWifiSsidPolicy_invalidAdmin_fails()
|
D | EnrollmentSpecificIdTest.java | 144 final byte[] serialNumber = getPaddedHardwareIdentifier(Build.getSerial()).getBytes(); in calculateEsid() 145 final byte[] imei = getPaddedHardwareIdentifier(telephonyService.getImei(0)).getBytes(); in calculateEsid() 146 final byte[] meid = getPaddedHardwareIdentifier(telephonyService.getMeid(0)).getBytes(); in calculateEsid() 151 macAddress = "".getBytes(); in calculateEsid() 153 macAddress = macAddresses[0].getBytes(); in calculateEsid() 164 final byte[] dpcPackage = getPaddedProfileOwnerName(profileOwnerPackage).getBytes(); in calculateEsid() 165 final byte[] enterpriseId = getPaddedEnterpriseId(enterpriseIdString).getBytes(); in calculateEsid()
|
/cts/hostsidetests/appsecurity/test-apps/InstantCookieApp/src/test/instant/cookie/ |
D | CookieTest.java | 49 pm.updateInstantAppCookie("1".getBytes()); in testCookieUpdateAndRetrieval() 69 pm.updateInstantAppCookie("2".getBytes()); in testCookiePersistedAcrossInstantInstalls1() 88 pm.updateInstantAppCookie("3".getBytes()); in testCookiePersistedUpgradeFromInstant1() 107 pm.updateInstantAppCookie("4".getBytes()); in testCookieResetOnNonInstantReinstall1()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2022_20338.java | 51 parcel.writeByteArray((context.getString(R.string.cve_2022_20338_scheme)).getBytes()); in testPocCVE_2022_20338() 54 (context.getString(R.string.cve_2022_20338_authority)).getBytes()); in testPocCVE_2022_20338() 56 parcel.writeByteArray((context.getString(R.string.cve_2022_20338_path)).getBytes()); in testPocCVE_2022_20338()
|
/cts/tests/tests/ndef/src/android/ndef/cts/ |
D | NdefTest.java | 333 new NdefRecord(NdefRecord.TNF_MIME_MEDIA, "text/plain".getBytes(ASCII), null, in testCreateMime() 334 "foo".getBytes()), in testCreateMime() 335 NdefRecord.createMime("text/plain", "foo".getBytes())); in testCreateMime() 380 new NdefRecord(NdefRecord.TNF_EXTERNAL_TYPE, "a.b:c".getBytes(ASCII), null, null), in testCreateExternal() 385 new NdefRecord(NdefRecord.TNF_EXTERNAL_TYPE, "a.b:c!".getBytes(ASCII), null, null), in testCreateExternal() 430 assertEquals("android.com:pkg".getBytes(), r.getType()); in testCreateApplicationRecord() 432 assertEquals("com.foo.bar".getBytes(), r.getPayload()); in testCreateApplicationRecord() 440 assertEquals(s.getBytes(), textArray); in testCreateTextRecord() 522 "http://www.android.com".getBytes(), null, null).toUri()); in testToUri() 530 "http://www.android.com".getBytes(), null, null)).toByteArray()).toUri()); in testToUri() [all …]
|
/cts/tests/tests/proto/src/android/util/proto/cts/ |
D | ProtoOutputStreamStringTest.java | 61 final byte[] utf8 = string.getBytes("UTF-8"); in testWriteLongString() 73 Assert.assertArrayEquals(expected, po.getBytes()); in testWriteLongString() 97 final byte[] result = po.getBytes(); in testWrite() 137 final byte[] result = po.getBytes(); in testWriteCompat() 177 final byte[] result = po.getBytes(); in testRepeated() 237 final byte[] result = po.getBytes(); in testRepeatedCompat()
|
D | ProtoOutputStreamObjectTest.java | 91 }, po.getBytes()); in testObjectOneChar() 119 }, po.getBytes()); in testObjectOneLargeChar() 161 }, po.getBytes()); in testObjectAndTwoChars() 184 Assert.assertArrayEquals(new byte[0], po.getBytes()); in testEmptyObject() 212 Assert.assertArrayEquals(new byte[0], po.getBytes()); in testDeepEmptyObjects() 247 }, po.getBytes()); in testEmptyObjectAndTwoChars() 279 }, po.getBytes()); in testEmptyRepeatedObject() 334 }, po.getBytes()); in testComplexObject() 387 }, po.getBytes()); in testDeepObjects() 461 po.getBytes(); in testTrailingStartObjectWithData() [all …]
|
D | ProtoOutputStreamBoolTest.java | 54 final byte[] result = po.getBytes(); in testWrite() 84 final byte[] result = po.getBytes(); in testWriteCompat() 120 final byte[] result = po.getBytes(); in testRepeated() 161 final byte[] result = po.getBytes(); in testRepeatedCompat() 209 final byte[] result = po.getBytes(); in testPacked() 245 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamSInt32Test.java | 57 final byte[] result = po.getBytes(); in testWrite() 99 final byte[] result = po.getBytes(); in testWriteCompat() 141 final byte[] result = po.getBytes(); in testRepeated() 200 final byte[] result = po.getBytes(); in testRepeatedCompat() 250 final byte[] result = po.getBytes(); in testPacked() 301 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamEnumTest.java | 60 final byte[] result = po.getBytes(); in testWrite() 104 final byte[] result = po.getBytes(); in testWriteCompat() 149 final byte[] result = po.getBytes(); in testRepeated() 212 final byte[] result = po.getBytes(); in testRepeatedCompat() 266 final byte[] result = po.getBytes(); in testPacked() 330 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamInt32Test.java | 57 final byte[] result = po.getBytes(); in testWrite() 101 final byte[] result = po.getBytes(); in testWriteCompat() 143 final byte[] result = po.getBytes(); in testRepeated() 206 final byte[] result = po.getBytes(); in testRepeatedCompat() 257 final byte[] result = po.getBytes(); in testPacked() 317 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamSFixed32Test.java | 57 final byte[] result = po.getBytes(); in testWrite() 99 final byte[] result = po.getBytes(); in testWriteCompat() 141 final byte[] result = po.getBytes(); in testRepeated() 200 final byte[] result = po.getBytes(); in testRepeatedCompat() 251 final byte[] result = po.getBytes(); in testPacked() 302 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamUInt32Test.java | 57 final byte[] result = po.getBytes(); in testWrite() 99 final byte[] result = po.getBytes(); in testWriteCompat() 141 final byte[] result = po.getBytes(); in testRepeated() 200 final byte[] result = po.getBytes(); in testRepeatedCompat() 250 final byte[] result = po.getBytes(); in testPacked() 301 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamFixed32Test.java | 57 final byte[] result = po.getBytes(); in testWrite() 99 final byte[] result = po.getBytes(); in testWriteCompat() 141 final byte[] result = po.getBytes(); in testRepeated() 200 final byte[] result = po.getBytes(); in testRepeatedCompat() 250 final byte[] result = po.getBytes(); in testPacked() 301 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamBytesTest.java | 70 Assert.assertArrayEquals(expected, po.getBytes()); in testWrite() 99 final byte[] result = po.getBytes(); in testWriteCompat() 143 final byte[] result = po.getBytes(); in testRepeated() 205 final byte[] result = po.getBytes(); in testRepeatedCompat()
|
D | ProtoOutputStreamSwitchedWriteTest.java | 183 final byte[] switchedResult = switchedPo.getBytes(); in testAWrite() 184 final byte[] typedResult = typedPo.getBytes(); in testAWrite() 256 final byte[] typedResult = typedPo.getBytes(); in testWriteString() 257 final byte[] switchedResult = switchedPo.getBytes(); in testWriteString() 279 final byte[] typedResult = typedPo.getBytes(); in testWriteRepeatedString() 280 final byte[] switchedResult = switchedPo.getBytes(); in testWriteRepeatedString()
|
D | ProtoOutputStreamFixed64Test.java | 60 final byte[] result = po.getBytes(); in testWrite() 116 final byte[] result = po.getBytes(); in testWriteCompat() 162 final byte[] result = po.getBytes(); in testRepeated() 249 final byte[] result = po.getBytes(); in testRepeatedCompat() 302 final byte[] result = po.getBytes(); in testPacked() 378 final byte[] result = po.getBytes(); in testPackedCompat()
|
D | ProtoOutputStreamInt64Test.java | 59 final byte[] result = po.getBytes(); in testWrite() 113 final byte[] result = po.getBytes(); in testWriteCompat() 159 final byte[] result = po.getBytes(); in testRepeated() 239 final byte[] result = po.getBytes(); in testRepeatedCompat() 291 final byte[] result = po.getBytes(); in testPacked() 370 final byte[] result = po.getBytes(); in testPackedCompat()
|
/cts/hostsidetests/backup/ProfileFullBackupApp/src/android/cts/backup/profilefullbackupapp/ |
D | ProfileFullBackupRestoreTest.java | 62 Files.write(mFile1.toPath(), FILE_ONE_CONTENT.getBytes()); in writeFilesAndAssertSuccess() 65 Files.write(mFile2.toPath(), FILE_TWO_CONTENT.getBytes()); in writeFilesAndAssertSuccess() 86 assertThat(Files.readAllBytes(file.toPath())).isEqualTo(content.getBytes()); in assertFileContains()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | AttestKeyTest.java | 120 .setAttestationChallenge("challenge".getBytes()) in testAttestationWithNonAttestKey() 168 .setAttestationChallenge("challenge".getBytes()) in testStrongBoxCannotAttestToTeeKey() 191 .setAttestationChallenge("challenge".getBytes()) in testTeeCannotAttestToStrongBoxKey() 219 .setAttestationChallenge("challenge".getBytes()) in testEcAttestKey() 236 .setAttestationChallenge("challenge".getBytes()) in testRsaAttestKey() 249 .setAttestationChallenge("challenge".getBytes()) in testAttestKey() 265 .setAttestationChallenge("challenge".getBytes()) in testAttestKey()
|
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/ |
D | TestCertificates.java | 119 new Base64InputStream(new ByteArrayInputStream(cert.getBytes()), Base64.DEFAULT)); in userCertFromString() 127 final byte[] rawCert = TEST_CA.getBytes(); in caCertFromString()
|
/cts/tests/tests/car_builtin/src/android/car/cts/builtin/util/ |
D | AtomicFileHelperTest.java | 86 fos.write(TEST_FILE_CONTENT.getBytes()); in testAtomicFileWithNonExistedBaseFile() 118 fos.write(TEST_FILE_CONTENT.getBytes()); in testAtomicFileWithFailedWrite() 136 fos1.write(TEST_FILE_CONTENT.getBytes()); in testAtomicFileRewrite() 144 fos2.write(REWRITE_CONTENT.getBytes()); in testAtomicFileRewrite()
|
/cts/tests/security/src/android/keystore/cts/ |
D | EatAttestation.java | 84 rootOfTrustBuilder.setVerifiedBootKey(CborUtils.getBytes(extension, key)); in EatAttestation() 96 attestationChallenge = CborUtils.getBytes(extension, key); in EatAttestation() 100 Arrays.toString(CborUtils.getBytes(extension, key))); in EatAttestation() 101 uniqueId = CborUtils.getBytes(extension, key); in EatAttestation()
|