/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/services/tests/servicestests/src/com/android/server/updates/ |
D | CertPinInstallReceiverTest.java | 129 byte[] encoded = content.getBytes(); in getCurrentHash() 140 byte[] derKey = Base64.decode(TEST_KEY.getBytes(), Base64.DEFAULT); in createKey() 147 byte[] derCert = Base64.decode(TEST_CERT.getBytes(), Base64.DEFAULT); in createCertificate() 155 fw.write(content.getBytes(), 0, content.length()); in makeTemporaryContentFile() 164 signer.update(content.trim().getBytes()); in createSignature() 165 signer.update(version.trim().getBytes()); in createSignature() 166 signer.update(requiredHash.getBytes()); in createSignature() 177 signer.update(content.trim().getBytes()); in verifySignature() 178 signer.update(version.trim().getBytes()); in verifySignature() 179 signer.update(requiredPrevious.trim().getBytes()); in verifySignature() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | ContainerEncryptionParamsTest.java | 31 private static final byte[] IV_BYTES = "FOOBAR".getBytes(); 35 private static final byte[] ENC_KEY_BYTES = "abcd1234wxyz7890".getBytes(); 41 private static final byte[] MAC_KEY_BYTES = "4wxyzabcd1237890".getBytes(); 45 private static final byte[] MAC_TAG = "faketag".getBytes(); 125 new String(ENC_ALGORITHM), new IvParameterSpec("BLAHBLAH".getBytes()), in testEquals_EncParams_Failure() 140 new SecretKeySpec("BLAHBLAH".getBytes(), "RAW"), new String(MAC_ALGORITHM), null, in testEquals_EncKey_Failure() 169 new SecretKeySpec("FAKE_MAC_KEY".getBytes(), "RAW"), MAC_TAG, AUTHENTICATED_START, in testEquals_MacKey_Failure() 183 new SecretKeySpec(MAC_KEY_BYTES.clone(), "RAW"), "broken".getBytes(), in testEquals_MacTag_Failure() 265 new String(ENC_ALGORITHM), new IvParameterSpec("BLAHBLAH".getBytes()), in testHashCode_EncParams_Failure() 280 new SecretKeySpec("BLAHBLAH".getBytes(), "RAW"), new String(MAC_ALGORITHM), null, in testHashCode_EncKey_Failure() [all …]
|
D | MacAuthenticatedInputStreamTest.java | 32 private static final SecretKey HMAC_KEY_1 = new SecretKeySpec("test_key_1".getBytes(), "HMAC"); 34 private static final byte[] TEST_STRING_1 = "Hello, World!".getBytes();
|
D | VerificationParamsTest.java | 36 private final static byte[] DIGEST_BYTES = "fake digest".getBytes(); 131 new ManifestDigest("a different digest".getBytes())); in testEquals_ManifestDigest_Failure() 209 new ManifestDigest("a different digest".getBytes())); in testHashCode_ManifestDigest_Failure() 221 new ManifestDigest("a different digest".getBytes())); in testHashCode_InstallerUid_Failure()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | Wap230WspContentTypeTest.java | 267 out.write(testType.getBytes("US-ASCII")); in testConstrainedMediaExtensionMedia() 283 out.write(testType.getBytes("US-ASCII")); in testGeneralFormShortLengthExtensionMedia() 451 out.write(testType.getBytes("US-ASCII")); in testGeneralFormLengthQuoteExtensionMedia() 476 out.write(testType.getBytes("US-ASCII")); in testGeneralFormLengthQuoteExtensionMediaWithNiceLongMimeType() 494 out.write(testType.getBytes("US-ASCII")); in testConstrainedMediaExtensionMediaWithSpace() 537 out.write("wdstechnology.com".getBytes("US-ASCII")); in testTypedParamWellKnownShortIntegerTokenText() 562 out.write("wdstechnology.com".getBytes("US-ASCII")); in testTypedParamWellKnownLongIntegerTokenText() 587 out.write("wdstechnology.com".getBytes("US-ASCII")); in testTypedParamWellKnownShortIntegerQuotedText() 655 out.write("imapc".getBytes("US-ASCII")); in testTypedParamWellKnownShortIntegerMultipleParameters() 676 out.write("MYPARAM".getBytes("US-ASCII")); in testUntypedParamIntegerValueShortInteger() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | LoggingPrintStreamTest.java | 136 out.write(expected.getBytes("UTF-8")); in testMultiByteCharactersSpanningBuffers() 143 for (byte b : expected.getBytes()) { in testWriteOneByteAtATimeMultibyteCharacters() 152 out.write(expected.getBytes()); in testWriteByteArrayAtATimeMultibyteCharacters() 159 byte[] bytes = expected.getBytes(); in testWriteWithOffsetsMultibyteCharacters() 175 out.write(toWrite.getBytes()); in testWriteFlushesOnNewlines()
|
/frameworks/base/core/tests/coretests/src/android/app/backup/ |
D | BackupDataTest.java | 85 writeEntity(bdo, KEY1, DATA1.getBytes()); in testSingle() 93 readAndVerifyEntity(bdi, KEY1, DATA1.getBytes()); in testSingle() 105 writeEntity(bdo, KEYS[i], DATA[i].getBytes()); in testMultiple() 114 readAndVerifyEntity(bdi, KEYS[count], DATA[count].getBytes()); in testMultiple() 149 writeEntity(bdo, KEYS[i], DATA[i].getBytes()); i++; in testMixed() 150 writeEntity(bdo, KEYS[i], DATA[i].getBytes()); i++; in testMixed() 161 readAndVerifyEntity(bdi, KEYS[out], DATA[out].getBytes()); out++; in testMixed() 163 readAndVerifyEntity(bdi, KEYS[out], DATA[out].getBytes()); out++; in testMixed()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | Base64Test.java | 42 String b64 = Base64.encodeToString(in.getBytes(), flags); in encodeToString() 249 assertEquals("YWJj".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal() 253 assertEquals("YWJj".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal() 265 assertEquals("YWFh".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal() 273 assertEquals("YWJh".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal() 277 assertEquals("YmFi".getBytes(), 4, encoder.output, encoder.op); in XXXtestEncodeInternal() 281 assertEquals("YQ".getBytes(), 2, encoder.output, encoder.op); in XXXtestEncodeInternal() 319 byte[] plain = (lipsum + lipsum + lipsum + lipsum + lipsum).getBytes(); in testInputStream() 413 new ByteArrayInputStream("/v8=".getBytes()), Base64.DEFAULT); in testSingleByteReads() 434 byte[] plain = (lipsum + lipsum).getBytes(); in testOutputStream()
|
/frameworks/opt/telephony/src/java/com/google/android/mms/pdu/ |
D | SendReq.java | 35 setContentType("application/vnd.wap.multipart.related".getBytes()); in SendReq() 36 setFrom(new EncodedStringValue(PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR.getBytes())); in SendReq() 47 return transactionId.getBytes(); in generateTransactionId()
|
D | PduComposer.java | 312 appendTextString(str.getBytes()); in appendTextString() 452 appendQuotedString(str.getBytes()); in appendQuotedString() 463 temp.appendTextString(STRING_PHONE_NUMBER_ADDRESS_TYPE.getBytes()); in appendAddressType() 466 temp.appendTextString(STRING_IPV4_ADDRESS_TYPE.getBytes()); in appendAddressType() 469 temp.appendTextString(STRING_IPV6_ADDRESS_TYPE.getBytes()); in appendAddressType() 605 PduHeaders.MESSAGE_CLASS_ADVERTISEMENT_STR.getBytes())) { in appendHeader() 608 PduHeaders.MESSAGE_CLASS_AUTO_STR.getBytes())) { in appendHeader() 611 PduHeaders.MESSAGE_CLASS_PERSONAL_STR.getBytes())) { in appendHeader() 614 PduHeaders.MESSAGE_CLASS_INFORMATIONAL_STR.getBytes())) { in appendHeader()
|
D | PduPart.java | 96 static final byte[] DISPOSITION_FROM_DATA = "from-data".getBytes(); 97 static final byte[] DISPOSITION_ATTACHMENT = "attachment".getBytes(); 98 static final byte[] DISPOSITION_INLINE = "inline".getBytes();
|
D | PduParser.java | 464 value.setTextString(str.getBytes()); in parseHeaders() 546 from.setTextString(str.getBytes()); in parseHeaders() 556 PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR.getBytes()); in parseHeaders() 592 PduHeaders.MESSAGE_CLASS_PERSONAL_STR.getBytes(), in parseHeaders() 596 PduHeaders.MESSAGE_CLASS_ADVERTISEMENT_STR.getBytes(), in parseHeaders() 600 PduHeaders.MESSAGE_CLASS_INFORMATIONAL_STR.getBytes(), in parseHeaders() 604 PduHeaders.MESSAGE_CLASS_AUTO_STR.getBytes(), in parseHeaders() 855 part.setContentType((PduContentTypes.contentTypes[0]).getBytes()); //"*/*" in parseParts() 891 System.currentTimeMillis()).getBytes()); in parseParts() 1391 byte[] type = (PduContentTypes.contentTypes[index]).getBytes(); in parseContentTypeParams() [all …]
|
D | EncodedStringValue.java | 75 mData = data.getBytes(CharacterSets.DEFAULT_CHARSET_NAME); in EncodedStringValue() 218 temp[i].getBytes()); in split()
|
/frameworks/base/services/core/java/com/android/server/updates/ |
D | ConfigUpdateInstallReceiver.java | 123 byte[] derCert = Base64.decode(cert.getBytes(), Base64.DEFAULT); in getCert() 224 signer.update(Long.toString(version).getBytes()); in verifySignature() 225 signer.update(requiredPrevious.getBytes()); in verifySignature() 226 return signer.verify(Base64.decode(signature.getBytes(), Base64.DEFAULT)); in verifySignature() 263 writeUpdate(updateDir, updateVersion, Long.toString(version).getBytes()); in install()
|
/frameworks/base/core/java/android/nfc/ |
D | NdefRecord.java | 224 public static final byte[] RTD_ANDROID_APP = "android.com:pkg".getBytes(); 316 packageName.getBytes(StandardCharsets.UTF_8)); in createApplicationRecord() 355 byte[] uriBytes = uriString.getBytes(StandardCharsets.UTF_8); in createUri() 427 byte[] typeBytes = mimeType.getBytes(StandardCharsets.US_ASCII); in createMime() 467 byte[] byteDomain = domain.getBytes(StandardCharsets.UTF_8); in createExternal() 468 byte[] byteType = type.getBytes(StandardCharsets.UTF_8); in createExternal() 493 byte[] textBytes = text.getBytes(StandardCharsets.UTF_8); in createTextRecord() 497 languageCodeBytes = languageCode.getBytes(StandardCharsets.US_ASCII); in createTextRecord() 500 getBytes(StandardCharsets.US_ASCII); in createTextRecord()
|
/frameworks/base/wifi/java/android/net/wifi/p2p/nsd/ |
D | WifiP2pDnsSdServiceInfo.java | 129 byte[] data = instanceName.getBytes(); in createPtrServiceQuery() 219 sb.append(WifiP2pServiceInfo.bin2HexStr(dnsName.getBytes())); in compressDnsName() 229 sb.append(WifiP2pServiceInfo.bin2HexStr(name.getBytes())); in compressDnsName()
|
D | WifiP2pUpnpServiceRequest.java | 79 sb.append(WifiP2pServiceInfo.bin2HexStr(st.getBytes())); in newInstance()
|
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/ |
D | MarshalQueryableString.java | 47 byte[] arr = value.getBytes(UTF8_CHARSET); in marshal() 55 byte[] arr = value.getBytes(UTF8_CHARSET); in calculateMarshalSize()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | PackageManagerSettingsTests.java | 99 + "</packages>").getBytes()); in writePackagesXml() 109 .getBytes()); in writeStoppedPackagesXml() 117 .getBytes()); in writePackagesList()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | DropBoxTest.java | 92 dropbox.addData("DropBoxTest", "TEST".getBytes(), 0); 124 gz1.write("FILE1".getBytes()); 125 os2.write("DATA2".getBytes()); 126 gz3.write("DATA3".getBytes()); 193 gz2.write("FUTURE2".getBytes()); in testAddEntriesInTheFuture() 528 dropbox.addData("DropBoxTest", "should be ignored".getBytes(), 0); in testCreateDropBoxManagerWithInvalidDirectory() 550 new DropBoxManager.Entry("bytes", 3000000, "Bytes Value".getBytes(), in testDropBoxEntrySerialization() 558 "Bad Bytes Value".getBytes(), in testDropBoxEntrySerialization() 574 os.write("File Value".getBytes()); in testDropBoxEntrySerialization() 608 gzout.write("Gzip File Value".getBytes()); in testDropBoxEntrySerialization() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/ |
D | SmsRawData.java | 50 public byte[] getBytes() { in getBytes() method in SmsRawData
|
/frameworks/base/services/tests/servicestests/src/com/android/server/content/ |
D | SyncStorageEngineTest.java | 443 + "</accounts>").getBytes(); in testComponentParsing() 519 + "</accounts>").getBytes(); in testAuthorityParsingV2() 553 + "</accounts>\n").getBytes(); in testAuthorityParsingV2() 582 + "</accounts>\n").getBytes(); in testAuthorityParsingV2() 634 + "</accounts>\n").getBytes(); in testAuthorityParsing() 667 + "</accounts>\n").getBytes(); in testAuthorityParsing() 696 + "</accounts>\n").getBytes(); in testAuthorityParsing() 726 + "</accounts>\n").getBytes(); in testListenForTicklesParsing() 772 + "</accounts>\n").getBytes(); in testAuthorityRenaming() 812 + "</accounts>\n").getBytes(); in testSyncableMigration()
|
/frameworks/testing/uiautomator/utils/SleepUtils/WakeLoopService/src/android/test/wakeuploop/ |
D | FileUtil.java | 45 fos.write(sDateFormat.format(new Date()).getBytes()); in writeDateToFile()
|
/frameworks/opt/bluetooth/src/android/bluetooth/client/map/ |
D | BluetoothMapBmessageParser.java | 308 byte[] data = remng.getBytes(); in parseBody() 388 p.parse(new ByteArrayInputStream(str.getBytes())); in parseVcard() 400 p.parse(new ByteArrayInputStream(str.getBytes())); in parseVcard()
|