/frameworks/base/core/tests/coretests/src/android/net/ |
D | UriCodecTest.java | 31 StandardCharsets.UTF_8, in testDecode_emptyString_returnsEmptyString() 40 StandardCharsets.UTF_8, in testDecode_wrongHexDigit_fails() 53 StandardCharsets.UTF_8, in testDecode_secondHexDigitWrong_fails() 66 StandardCharsets.UTF_8, in testDecode_endsWithPercent_fails() 78 StandardCharsets.UTF_8, in testDecode_dontThrowException_appendsUnknownCharacter() 86 StandardCharsets.UTF_8, in testDecode_convertPlus() 95 StandardCharsets.UTF_8, in testDecode_lastCharacter() 105 StandardCharsets.UTF_8, in testDecode_secondRowOfEncoded()
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileBridgeTest.java | 90 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync() 92 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteNoSync() 97 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync() 100 assertContents("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSync() 105 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite() 107 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite() 109 assertContents("meowcake".getBytes(StandardCharsets.UTF_8)); in testWriteSyncWrite() 121 client.write("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose() 124 client.write("cake".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose() 128 assertContents("meow".getBytes(StandardCharsets.UTF_8)); in testWriteAfterClose()
|
/frameworks/base/tools/powermodel/test/com/android/powermodel/ |
D | CsvParserTest.java | 64 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEmpty() 76 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testOnlyNewline() 88 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testTwoLines() 103 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedEmpty() 116 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedText() 129 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedQuotes() 142 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedCommas() 155 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEscapedQuotesAndCommas() 168 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testNoNewline() 181 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testNoNewlineWithCommas() [all …]
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/cdc/ |
D | ContentDefinedChunkerTest.java | 25 import static java.nio.charset.StandardCharsets.UTF_8; 51 private static final byte[] CHUNK_BOUNDARY_BYTES = CHUNK_BOUNDARY.getBytes(UTF_8); 122 (CHUNK_1 + CHUNK_BOUNDARY + CHUNK_2 + CHUNK_BOUNDARY + CHUNK_3).getBytes(UTF_8); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries() 126 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries() 137 (SMALL_CHUNK + CHUNK_BOUNDARY + CHUNK_2 + CHUNK_BOUNDARY + CHUNK_3).getBytes(UTF_8); in chunkify_withSmallChunks_combinesChunksUntilMinSize() 141 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withSmallChunks_combinesChunksUntilMinSize() 153 Arrays.fill(largeInput, "a".getBytes(UTF_8)[0]); in chunkify_doesNotProduceChunksLargerThanMaxSize() 157 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_doesNotProduceChunksLargerThanMaxSize() 160 Arrays.fill(expectedChunkBytes, "a".getBytes(UTF_8)[0]); in chunkify_doesNotProduceChunksLargerThanMaxSize() 161 String expectedChunk = new String(expectedChunkBytes, UTF_8); in chunkify_doesNotProduceChunksLargerThanMaxSize() [all …]
|
D | RabinFingerprint64Test.java | 21 import static java.nio.charset.StandardCharsets.UTF_8; 104 return sb.toString().getBytes(UTF_8); in getBytes() 130 return computeFingerprintAtPosition(s.getBytes(UTF_8), WINDOW_SIZE - 1); in computeFingerprintOf()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | WindowTracingTest.java | 164 "TEST_WHERE".getBytes(StandardCharsets.UTF_8))); in tracing_endsUpInFile() 166 "TEST_WM_PROTO".getBytes(StandardCharsets.UTF_8))); in tracing_endsUpInFile() 188 byte[] haystack = "hello_world".getBytes(StandardCharsets.UTF_8); in test_containsBytes() 190 "hello".getBytes(StandardCharsets.UTF_8))); in test_containsBytes() 192 "world".getBytes(StandardCharsets.UTF_8))); in test_containsBytes() 194 "world".getBytes(StandardCharsets.UTF_8))); in test_containsBytes() 196 "world_".getBytes(StandardCharsets.UTF_8))); in test_containsBytes() 198 "absent".getBytes(StandardCharsets.UTF_8))); in test_containsBytes()
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | AttestationUtils.java | 179 Build.getSerial().getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 187 imei.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 196 meid.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 204 brand.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 206 Build.DEVICE.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 208 Build.PRODUCT.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 210 Build.MANUFACTURER.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments() 212 Build.MODEL.getBytes(StandardCharsets.UTF_8)); in prepareAttestationArguments()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/certificate/ |
D | CertUtilsTest.java | 31 import static java.nio.charset.StandardCharsets.UTF_8; 124 assertThat(CertUtils.decodeBase64("VEVTVA==")).isEqualTo("TEST".getBytes(UTF_8)); in decodeBase64_succeeds() 139 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlRootNode_succeeds() 150 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_singleLevel_succeeds() 157 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_multipleLevels_succeeds() 164 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistFalse_succeedsIfNotExist() 173 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistAtLeastOne_throwsIfNotExist() 186 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistExactlyOne_throwsIfNotExist() 199 Element root = CertUtils.getXmlRootNode(XML_STR.getBytes(UTF_8)); in getXmlNodeContents_mustExistExactlyOne_throwsIfMultipleExist() 214 SIGNED_STR.getBytes(UTF_8)); in verifyRsaSha256Signature_succeeds() [all …]
|
/frameworks/base/wifi/java/android/net/wifi/hotspot2/pps/ |
D | UpdateParameter.java | 327 if (mServerUri.getBytes(StandardCharsets.UTF_8).length > MAX_URI_BYTES) { in validate() 329 + mServerUri.getBytes(StandardCharsets.UTF_8).length); in validate() 337 if (mUsername.getBytes(StandardCharsets.UTF_8).length > MAX_USERNAME_BYTES) { in validate() 339 + mUsername.getBytes(StandardCharsets.UTF_8).length); in validate() 347 if (mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length > MAX_PASSWORD_BYTES) { in validate() 349 + mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length); in validate() 363 if (mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length > MAX_URL_BYTES) { in validate() 365 + mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length); in validate()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | KeySyncUtils.java | 54 "V1 THM_encrypted_recovery_key".getBytes(StandardCharsets.UTF_8); 56 "V1 locally_encrypted_recovery_key".getBytes(StandardCharsets.UTF_8); 58 "V1 encrypted_application_key".getBytes(StandardCharsets.UTF_8); 60 "V1 KF_claim".getBytes(StandardCharsets.UTF_8); 62 "V1 reencrypted_recovery_key".getBytes(StandardCharsets.UTF_8); 64 private static final byte[] THM_KF_HASH_PREFIX = "THM_KF_hash".getBytes(StandardCharsets.UTF_8);
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | ScanResultUtilTest.java | 49 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in convertScanResult() 65 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in convertScanResultWithAnqpLines() 80 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in convertScanResultWithoutWifiSsid() 132 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testPskSha256SaeTransitionModeCheck() 151 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testPskSaeTransitionModeCheck() 170 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testPskNotInTransitionModeCheck() 189 createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)) in testSaeNotInTransitionModeCheck()
|
D | XmlUtilTest.java | 471 deserializeWifiEnterpriseConfig(xmlString.getBytes(StandardCharsets.UTF_8)); in testWifiEnterpriseConfigSerializeDeserializeThrowsIllegalArgException() 502 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in testMacRandomizationSettingDefaultToRandomizationNone() 519 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiConfigurationForBackup() 531 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiConfigurationForConfigStore() 544 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeWifiConfiguration() 604 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeDeserializeIpConfiguration() 612 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in serializeDeserializeIpConfiguration() 624 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeNetworkSelectionStatus() 635 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeNetworkSelectionStatus() 655 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeWifiEnterpriseConfig() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | NetworkListStoreDataTest.java | 216 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeData() 232 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeData() 286 return (openNetworkXml + eapNetworkXml).getBytes(StandardCharsets.UTF_8); in getTestNetworksXmlBytes() 420 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithUnknownTag() 438 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithMismatchConfigKey() 459 deserializeData(xmlString.getBytes(StandardCharsets.UTF_8)); in parseNetworkListWithOneNetworkIllegalArgException() 483 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithInvalidCreatorUidResetsToSystem() 511 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithInvalidCreatorNameResetsToPackageNameForCreatorUid() 538 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithNullCreatorNameResetsToPackageNameForCreatorUid() 559 .getBytes(StandardCharsets.UTF_8); in parseNetworkWithValidCreatorUid()
|
D | SsidSetStoreDataTest.java | 64 TEST_SSID_SET_XML_STRING.getBytes(StandardCharsets.UTF_8); 84 out.setOutput(outputStream, StandardCharsets.UTF_8.name()); in serializeData() 99 in.setInput(inputStream, StandardCharsets.UTF_8.name()); in deserializeData() 184 deserializeData(ssidSet.getBytes(StandardCharsets.UTF_8)); in parseSetWithUnknownTag()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
D | RecoverableKeyStoreDbHelperTest.java | 39 import static java.nio.charset.StandardCharsets.UTF_8; 48 private static final byte[] TEST_NONCE = "test-nonce".getBytes(UTF_8); 49 private static final byte[] TEST_WRAPPED_KEY = "test-wrapped-key".getBytes(UTF_8); 57 private static final byte[] TEST_PUBLIC_KEY = "test-public-key".getBytes(UTF_8); 60 private static final byte[] TEST_SERVER_PARAMS = "test-server-params".getBytes(UTF_8); 62 private static final byte[] TEST_CERT_PATH = "test-cert-path".getBytes(UTF_8); 64 private static final byte[] TEST_KEY_METADATA = "test-key-metadata".getBytes(UTF_8);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | TestData.java | 166 return xml.getBytes(StandardCharsets.UTF_8); in getCertXmlWithSerial() 174 return THM_SIG_XML.getBytes(StandardCharsets.UTF_8); in getSigXml() 434 return str.getBytes(StandardCharsets.UTF_8); in getInsecureCertXmlBytesWithEndpoint1() 443 return str.getBytes(StandardCharsets.UTF_8); in getInsecureCertXmlBytesWithEndpoint2()
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/ |
D | ChunkEncryptorTest.java | 27 import static java.nio.charset.StandardCharsets.UTF_8; 60 private static final byte[] PLAINTEXT_BYTES = CHUNK_PLAINTEXT.getBytes(UTF_8); 61 private static final byte[] NONCE_1 = "0123456789abc".getBytes(UTF_8); 62 private static final byte[] NONCE_2 = "123456789abcd".getBytes(UTF_8);
|
/frameworks/multidex/library/test/src/androidx/multidex/ |
D | ZipEntryReader.java | 32 static final Charset UTF_8 = Charset.forName("UTF-8"); field in ZipEntryReader 83 String name = new String(nameBytes, 0, nameBytes.length, UTF_8); in readEntry() 98 entry.setComment(new String(commentBytes, 0, commentBytes.length, UTF_8)); in readEntry()
|
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/ |
D | SingleStreamDiffScriptWriter.java | 33 private static final Charset UTF_8 = Charset.forName("UTF-8"); field in SingleStreamDiffScriptWriter 91 mOutputStream.write(Integer.toString(mBufferSize).getBytes(UTF_8)); in writeByteBuffer() 106 .getBytes(UTF_8)); in writeReusableChunk()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | SliceFullAccessListTest.java | 89 out.setOutput(output, Encoding.UTF_8.name()); in testSerialization() 93 assertEquals(TEST_XML, output.toString(Encoding.UTF_8.name())); in testSerialization() 100 parser.setInput(input, Encoding.UTF_8.name()); in testDeSerialization()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | PersistentDataStoreTest.java | 76 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testLoadingBrightnessConfigurations() 109 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testBrightnessConfigWithInvalidCurveIsIgnored() 128 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testBrightnessConfigWithInvalidFloatsIsIgnored() 140 InputStream is = new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8)); in testEmptyBrightnessConfigurationsDoesntCrash()
|
/frameworks/base/wifi/tests/src/android/net/wifi/hotspot2/pps/ |
D | UpdateParameterTest.java | 182 updateParam.setUsername(new String(rawUsernameBytes, StandardCharsets.UTF_8)); in validateUpdateParameterWithUsernameExceedingMaxSize() 208 updateParam.setBase64EncodedPassword(new String(rawPasswordBytes, StandardCharsets.UTF_8)); in validateUpdateParameterWithPasswordExceedingMaxSize() 259 updateParam.setTrustRootCertUrl(new String(rawUrlBytes, StandardCharsets.UTF_8)); in validateUpdateParameterWithInvalidTrustRootCertUrl() 314 updateParam.setServerUri(new String(rawUriBytes, StandardCharsets.UTF_8)); in validatePolicyWithInvalidServerUri()
|
/frameworks/base/lowpan/java/android/net/lowpan/ |
D | LowpanIdentity.java | 78 mIdentity.mRawName = mIdentity.mName.getBytes(StandardCharsets.UTF_8); in setName() 82 setRawName(name.getBytes(StandardCharsets.UTF_8)); in setName() 90 mIdentity.mName = new String(name, StandardCharsets.UTF_8); in setRawName() 94 Arrays.equals(nameCheck.getBytes(StandardCharsets.UTF_8), name); in setRawName()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
D | OsuProviderInfoTestUtil.java | 109 writeByteArrayWithLength(out, TEST_SERVER_URI.getBytes(StandardCharsets.UTF_8)); in getTestPayload() 122 writeByteArrayWithLength(out, TEST_NAI.getBytes(StandardCharsets.UTF_8)); in getTestPayload() 153 out.write(value.getText().getBytes(StandardCharsets.UTF_8)); in getI18NameData()
|
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/google/ |
D | CloudPrintPlugin.java | 103 StandardCharsets.UTF_8)); in CloudPrintPlugin() 126 new String(type, StandardCharsets.UTF_8).toLowerCase())) { in CloudPrintPlugin() 136 new String(cs, StandardCharsets.UTF_8).toLowerCase())) { in CloudPrintPlugin()
|