/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | LockSettingsStorageTests.java | 226 mStorage.writePasswordHash("thepassword".getBytes(), 0); in testPassword_Write() 228 assertArrayEquals("thepassword".getBytes(), mStorage.readPasswordHash(0).hash); in testPassword_Write() 230 assertArrayEquals("thepassword".getBytes(), mStorage.readPasswordHash(0).hash); in testPassword_Write() 234 mStorage.writePasswordHash("parentpasswordd".getBytes(), 1); in testPassword_WriteProfileWritesParent() 235 mStorage.writePasswordHash("profilepassword".getBytes(), 2); in testPassword_WriteProfileWritesParent() 237 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(1).hash); in testPassword_WriteProfileWritesParent() 238 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(2).hash); in testPassword_WriteProfileWritesParent() 240 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(1).hash); in testPassword_WriteProfileWritesParent() 241 assertArrayEquals("profilepassword".getBytes(), mStorage.readPasswordHash(2).hash); in testPassword_WriteProfileWritesParent() 245 mStorage.writePasswordHash("parentpassword".getBytes(), 10); in testLockType_WriteProfileWritesParent() [all …]
|
/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/pm/backup/ |
D | BackupUtilsTest.java | 37 sigs[i] = new Signature(signatures[i].getBytes()); in genSignatures() 53 "abc".getBytes())); in testSignaturesMatch() 55 "abc".getBytes(), "def".getBytes())); in testSignaturesMatch() 86 final byte[] sig1 = "abc".getBytes(); in testHashSignature() 87 final byte[] sig2 = "def".getBytes(); in testHashSignature() 104 "abc".getBytes(), "def".getBytes())); in testHashSignature() 107 new Signature("abc".getBytes()), new Signature("def".getBytes())}); in testHashSignature()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelWakelockReaderTest.java | 49 public byte[] getBytes() throws Exception { in getBytes() method in KernelWakelockReaderTest.ProcFileBuilder 51 byte[] data = mStringBuilder.toString().getBytes(Charset.forName("UTF-8")); in getBytes() 77 byte[] buffer = new ProcFileBuilder().getBytes(); in testOnlyHeader() 87 .getBytes(); in testOneWakelock() 103 .getBytes(); in testTwoWakelocks() 116 .getBytes(); in testDuplicateWakelocksAccumulate() 131 .getBytes(); in testWakelocksBecomeStale() 140 .getBytes(); in testWakelocksBecomeStale()
|
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/services/tests/servicestests/src/com/android/server/updates/ |
D | CertPinInstallReceiverTest.java | 131 byte[] encoded = content.getBytes(); in getCurrentHash() 142 byte[] derKey = Base64.decode(TEST_KEY.getBytes(), Base64.DEFAULT); in createKey() 149 byte[] derCert = Base64.decode(TEST_CERT.getBytes(), Base64.DEFAULT); in createCertificate() 157 fw.write(content.getBytes(), 0, content.length()); in makeTemporaryContentFile() 166 signer.update(content.trim().getBytes()); in createSignature() 167 signer.update(version.trim().getBytes()); in createSignature() 168 signer.update(requiredHash.getBytes()); in createSignature() 179 signer.update(content.trim().getBytes()); in verifySignature() 180 signer.update(version.trim().getBytes()); in verifySignature() 181 signer.update(requiredPrevious.trim().getBytes()); in verifySignature() [all …]
|
/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/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/nan/ |
D | WifiNanStateManagerTest.java | 523 mDut.onMatch(subscribeId, requestorId, peerMac, peerSsi.getBytes(), peerSsi.length(), in testMatchAndMessages() 524 peerMatchFilter.getBytes(), peerMatchFilter.length()); in testMatchAndMessages() 525 mDut.onMessageReceived(subscribeId, requestorId, peerMac, peerMsg.getBytes(), in testMatchAndMessages() 530 inOrder.verify(mockListener).onMatch(requestorId, peerSsi.getBytes(), peerSsi.length(), in testMatchAndMessages() 531 peerMatchFilter.getBytes(), peerMatchFilter.length()); in testMatchAndMessages() 532 inOrder.verify(mockListener).onMessageReceived(requestorId, peerMsg.getBytes(), in testMatchAndMessages() 535 mDut.sendMessage(uid, sessionId, requestorId, ssi.getBytes(), ssi.length(), messageId); in testMatchAndMessages() 539 eq(requestorId), eq(peerMac), eq(ssi.getBytes()), eq(ssi.length())); in testMatchAndMessages() 547 mDut.sendMessage(uid, sessionId, requestorId, ssi.getBytes(), ssi.length(), messageId); in testMatchAndMessages() 551 eq(requestorId), eq(peerMac), eq(ssi.getBytes()), eq(ssi.length())); in testMatchAndMessages() [all …]
|
D | WifiNanHalTest.java | 123 .putZeroLengthElement(0).putByteArray(0, serviceName.getBytes()); in testPublishUnsolicited() 144 .putZeroLengthElement(0).putByteArray(0, serviceName.getBytes()); in testPublishSolicited() 179 .putZeroLengthElement(0).putByteArray(0, serviceName.getBytes()); in testSubscribePassive() 200 .putZeroLengthElement(0).putByteArray(0, serviceName.getBytes()); in testSubscribeActive() 228 mDut.sendMessage(transactionId, pubSubId, reqInstanceId, peer, msg.getBytes(), in testSendMessage() 245 equalTo(msg.getBytes())); in testSendMessage() 522 args.putByteArray("service_specific_info", message.getBytes()); in testFollowup() 527 message.getBytes(), message.length()); in testFollowup() 543 args.putByteArray("service_specific_info", ssi.getBytes()); in testMatch() 545 args.putByteArray("sdf_match_filter", filter.getBytes()); in testMatch() [all …]
|
/frameworks/volley/src/test/java/com/android/volley/toolbox/ |
D | JsonRequestCharsetTest.java | 58 byte[] data = jsonObjectString().getBytes(Charset.forName("UTF-8")); in defaultCharsetJsonObject() 71 byte[] data = jsonArrayString().getBytes(Charset.forName("UTF-8")); in defaultCharsetJsonArray() 83 byte[] data = jsonObjectString().getBytes(Charset.forName("ISO-8859-1")); in specifiedCharsetJsonObject() 97 byte[] data = jsonArrayString().getBytes(Charset.forName("ISO-8859-2")); in specifiedCharsetJsonArray()
|
/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/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/core/java/android/content/pm/ |
D | EphemeralResolveInfo.java | 160 final byte[] hostBytes = host.getBytes(); in generateDigest() 167 digests.add(digest.digest(host.getBytes())); in generateDigest() 169 byte[] hostBytes = host.substring(prevDot + 1, host.length()).getBytes(); in generateDigest() 174 hostBytes = host.substring(prevDot + 1, host.length()).getBytes(); in generateDigest()
|
/frameworks/opt/telephony/src/java/com/google/android/mms/pdu/ |
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 | 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 | 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 | 468 value.setTextString(str.getBytes()); in parseHeaders() 550 from.setTextString(str.getBytes()); in parseHeaders() 560 PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR.getBytes()); in parseHeaders() 596 PduHeaders.MESSAGE_CLASS_PERSONAL_STR.getBytes(), in parseHeaders() 600 PduHeaders.MESSAGE_CLASS_ADVERTISEMENT_STR.getBytes(), in parseHeaders() 604 PduHeaders.MESSAGE_CLASS_INFORMATIONAL_STR.getBytes(), in parseHeaders() 608 PduHeaders.MESSAGE_CLASS_AUTO_STR.getBytes(), in parseHeaders() 859 part.setContentType((PduContentTypes.contentTypes[0]).getBytes()); //"*/*" in parseParts() 895 System.currentTimeMillis()).getBytes()); in parseParts() 1395 byte[] type = (PduContentTypes.contentTypes[index]).getBytes(); in parseContentTypeParams() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | ScanDetailUtilTest.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()
|
/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()
|
/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/core/tests/coretests/src/android/content/pm/ |
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();
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/omadm/ |
D | OMAConstants.java | 42 byte[] octets = s.getBytes(StandardCharsets.UTF_8); in serializeString() 43 byte[] prefix = String.format("%x:", octets.length).getBytes(StandardCharsets.UTF_8); in serializeString()
|
/frameworks/base/packages/DocumentsUI/tests/src/com/android/documentsui/services/ |
D | AbstractJobTest.java | 45 static final byte[] HAM_BYTES = "ham and cheese".getBytes(); 46 static final byte[] FRUITY_BYTES = "I love fruit cakes!".getBytes();
|
/frameworks/base/packages/Osu/src/com/android/hotspot2/utils/ |
D | HTTPRequest.java | 37 mBody = payload != null ? payload.getBytes(charset) : null; in HTTPRequest() 175 octets = ((String) object).getBytes(StandardCharsets.UTF_8); in hash() 196 return bytesToHex(octets).getBytes(StandardCharsets.ISO_8859_1); in bytesToHexBytes() 224 return header.toString().getBytes(HeaderCharset); in buildHeader()
|