/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/keystore/java/android/security/keystore/ |
D | AttestationUtils.java | 133 Build.getSerial().getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 141 imei.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 150 meid.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 158 Build.BRAND.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 160 Build.DEVICE.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 162 Build.PRODUCT.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 164 Build.MANUFACTURER.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds() 166 Build.MODEL.getBytes(StandardCharsets.UTF_8)); in attestDeviceIds()
|
/frameworks/base/wifi/tests/src/android/net/wifi/hotspot2/ |
D | ConfigParserTest.java | 127 "application/x-wifi-config", configStr.getBytes()); in parseConfigFile() 140 "application/wifi-config", configStr.getBytes())); in parseConfigFileWithInvalidMimeType() 152 "application/x-wifi-config", configStr.getBytes())); in parseConfigFileWithUnencodedData() 164 "application/x-wifi-config", configStr.getBytes())); in parseConfigFileWithInvalidPart() 176 "application/x-wifi-config", configStr.getBytes())); in parseConfigFileWithMissingBoundary() 189 "application/x-wifi-config", configStr.getBytes())); in parseConfigFileWithInvalidContentType() 201 "application/x-wifi-config", configStr.getBytes())); in parseConfigFileWithoutPasspointProfile()
|
/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/base/wifi/java/android/net/wifi/hotspot2/pps/ |
D | UpdateParameter.java | 297 if (mServerUri.getBytes(StandardCharsets.UTF_8).length > MAX_URI_BYTES) { in validate() 299 + mServerUri.getBytes(StandardCharsets.UTF_8).length); in validate() 307 if (mUsername.getBytes(StandardCharsets.UTF_8).length > MAX_USERNAME_BYTES) { in validate() 309 + mUsername.getBytes(StandardCharsets.UTF_8).length); in validate() 317 if (mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length > MAX_PASSWORD_BYTES) { in validate() 319 + mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length); in validate() 333 if (mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length > MAX_URL_BYTES) { in validate() 335 + mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length); in validate()
|
/frameworks/base/services/core/java/com/android/server/ |
D | SyntheticPasswordManager.java | 92 …private static final byte[] PERSONALISATION_SECDISCARDABLE = "secdiscardable-transform".getBytes(); 93 private static final byte[] PERSONALIZATION_KEY_STORE_PASSWORD = "keystore-password".getBytes(); 94 private static final byte[] PERSONALIZATION_USER_GK_AUTH = "user-gk-authentication".getBytes(); 95 private static final byte[] PERSONALIZATION_SP_GK_AUTH = "sp-gk-authentication".getBytes(); 96 private static final byte[] PERSONALIZATION_FBE_KEY = "fbe-key".getBytes(); 97 private static final byte[] PERSONALIZATION_SP_SPLIT = "sp-split".getBytes(); 98 private static final byte[] PERSONALIZATION_E0 = "e0-encryption".getBytes(); 118 PERSONALIZATION_KEY_STORE_PASSWORD, syntheticPassword.getBytes())); in deriveKeyStorePassword() 123 syntheticPassword.getBytes()); in deriveGkPassword() 128 syntheticPassword.getBytes()); in deriveDiskEncryptionKey() [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/aware/ |
D | WifiAwareStateManagerTest.java | 1050 .setServiceSpecificInfo(ssi.getBytes()) in testMatchAndMessages() 1085 mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(), in testMatchAndMessages() 1086 peerMatchFilter.getBytes()); in testMatchAndMessages() 1088 inOrder.verify(mockSessionCallback).onMatch(requestorId, peerSsi.getBytes(), in testMatchAndMessages() 1089 peerMatchFilter.getBytes()); in testMatchAndMessages() 1092 mDut.onMessageReceivedNotification(subscribeId, requestorId, peerMac, peerMsg.getBytes()); in testMatchAndMessages() 1094 inOrder.verify(mockSessionCallback).onMessageReceived(requestorId, peerMsg.getBytes()); in testMatchAndMessages() 1097 mDut.sendMessage(clientId, sessionId.getValue(), requestorId, ssi.getBytes(), messageId, 0); in testMatchAndMessages() 1100 eq(requestorId), eq(peerMac), eq(ssi.getBytes()), eq(messageId)); in testMatchAndMessages() 1106 mDut.sendMessage(clientId, sessionId.getValue(), requestorId, ssi.getBytes(), messageId2, in testMatchAndMessages() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | SyntheticPasswordTests.java | 248 long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID); in testTokenBasedResetPassword() 254 …hToken(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PATTERN, handle, TOKEN.getBytes(), PRIMARY_USER_I… in testTokenBasedResetPassword() 268 long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID); in testTokenBasedClearPassword() 274 …ithToken(null, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, handle, TOKEN.getBytes(), PRIMARY_USER_I… in testTokenBasedClearPassword() 275 …Token(PATTERN, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, handle, TOKEN.getBytes(), PRIMARY_USER_I… in testTokenBasedClearPassword() 290 long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID); in testTokenBasedResetPasswordAfterCredentialChanges() 298 …n(NEWPASSWORD, LockPatternUtils.CREDENTIAL_TYPE_PASSWORD, handle, TOKEN.getBytes(), PRIMARY_USER_I… in testTokenBasedResetPasswordAfterCredentialChanges() 308 long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID); in testEscrowTokenActivatedImmediatelyIfNoUserPasswordNeedsMigration() 317 long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID); in testEscrowTokenActivatedImmediatelyIfNoUserPasswordNoMigration() 332 long handle = mService.addEscrowToken(TOKEN.getBytes(), PRIMARY_USER_ID); in testEscrowTokenActivatedLaterWithUserPasswordNeedsMigration()
|
/frameworks/base/wifi/tests/src/android/net/wifi/aware/ |
D | WifiAwareManagerTest.java | 294 publishSession.getValue().sendMessage(peerHandle, messageId, string1.getBytes()); in testPublishFlow() 295 sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter); in testPublishFlow() 296 sessionProxyCallback.getValue().onMessageReceived(peerHandle.peerId, string1.getBytes()); in testPublishFlow() 302 eq(peerHandle.peerId), eq(string1.getBytes()), eq(messageId), eq(0)); in testPublishFlow() 304 eq(string1.getBytes()), in testPublishFlow() 318 eq(string1.getBytes())); in testPublishFlow() 442 subscribeSession.getValue().sendMessage(peerHandle, messageId, string1.getBytes()); in testSubscribeFlow() 443 sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter); in testSubscribeFlow() 444 sessionProxyCallback.getValue().onMessageReceived(peerHandle.peerId, string1.getBytes()); in testSubscribeFlow() 450 eq(peerHandle.peerId), eq(string1.getBytes()), eq(messageId), eq(0)); in testSubscribeFlow() [all …]
|
/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/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 | 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/base/core/java/android/content/pm/ |
D | InstantAppResolveInfo.java | 170 final byte[] hostBytes = hostName.getBytes(); in generateDigest() 177 digests.add(digest.digest(hostName.getBytes())); in generateDigest() 180 hostName.substring(prevDot + 1, hostName.length()).getBytes(); in generateDigest() 186 hostName.substring(prevDot + 1, hostName.length()).getBytes(); in generateDigest()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiConfigStoreTest.java | 188 assertTrue(Arrays.equals(EMPTY_FILE_CONTENT.getBytes(StandardCharsets.UTF_8), in testWriteWithEmptyData() 190 assertTrue(Arrays.equals(EMPTY_FILE_CONTENT.getBytes(StandardCharsets.UTF_8), in testWriteWithEmptyData() 387 byte[] xmlBytes = xmlString.getBytes(StandardCharsets.UTF_8); in testReadWifiConfigStoreData() 431 byte[] xmlBytes = xmlString.getBytes(StandardCharsets.UTF_8); in testWriteWifiConfigStoreData() 454 mUserStore.storeRawDataToWrite(storeFileData.getBytes(StandardCharsets.UTF_8)); in testReadUserStoreContainedUnknownData() 473 mSharedStore.storeRawDataToWrite(storeFileData.getBytes(StandardCharsets.UTF_8)); in testReadShareStoreContainedUnknownData()
|
D | NetworkListStoreDataTest.java | 253 return (openNetworkXml + eapNetworkXml).getBytes(StandardCharsets.UTF_8); in getTestNetworksXmlBytes() 405 openNetwork.shared, openNetwork.creatorUid).getBytes(StandardCharsets.UTF_8); in parseNetworkWithUnknownTag() 421 openNetwork.shared, openNetwork.creatorUid).getBytes(StandardCharsets.UTF_8); in parseNetworkWithMismatchConfigKey() 442 deserializeData(xmlString.getBytes(StandardCharsets.UTF_8), true /* shared */); in parseNetworkListWithOneNetworkIllegalArgException()
|
/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 | 49 byte[] arr = value.getBytes(PreloadHolder.UTF8_CHARSET); in marshal() 57 byte[] arr = value.getBytes(PreloadHolder.UTF8_CHARSET); in calculateMarshalSize()
|