Home
last modified time | relevance | path

Searched refs:toByteArray (Results 1 – 25 of 312) sorted by relevance

12345678910>>...13

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DByteArrayHelpers.java40 public static byte[] toByteArray(byte[] array) { in toByteArray() method in ByteArrayHelpers
50 public static byte[] toByteArray(short[] array) { in toByteArray() method in ByteArrayHelpers
51 return toByteArray(array, Short.SIZE); in toByteArray()
60 public static byte[] toByteArray(char[] array) { in toByteArray() method in ByteArrayHelpers
61 return toByteArray(array, Character.SIZE); in toByteArray()
69 public static byte[] toByteArray(int[] array) { in toByteArray() method in ByteArrayHelpers
70 return toByteArray(array, Integer.SIZE); in toByteArray()
78 public static byte[] toByteArray(long[] array) { in toByteArray() method in ByteArrayHelpers
79 return toByteArray(array, Long.SIZE); in toByteArray()
87 public static byte[] toByteArray(float[] array) { in toByteArray() method in ByteArrayHelpers
[all …]
DCameraMetadataTest.java653 toByteArray(1.0f, 2.1f, 3.2f, 4.5f)); in testReadWriteRggbChannelVector()
661 }, toByteArray( in testReadWriteRggbChannelVector()
673 toByteArray(123f, 456f)); in testReadWriteSizeF()
682 toByteArray( in testReadWriteSizeF()
696 toByteArray(10, 11, 1280 - 10, 1024 - 11)); in testReadWriteRectangle()
703 }, toByteArray( in testReadWriteRectangle()
716 toByteArray(1, 2, 1 + 100, 2 + 200, 5)); in testReadWriteMeteringRectangle()
725 toByteArray( in testReadWriteMeteringRectangle()
740 toByteArray(1000, 255, 30, 200, 8)); in testReadWriteHighSpeedVideoConfiguration()
755 toByteArray( in testReadWriteHighSpeedVideoConfiguration()
[all …]
/frameworks/libs/net/common/framework/com/android/net/module/util/
DMacAddressUtils.java36 MacAddress.fromString("2:0:0:0:0:0").toByteArray());
38 MacAddress.fromString("1:0:0:0:0:0").toByteArray());
40 MacAddress.fromString("ff:ff:ff:0:0:0").toByteArray());
42 MacAddress.fromString("0:0:0:ff:ff:ff").toByteArray());
52 return (longAddrFromByteAddr(address.toByteArray()) & MULTICAST_MASK) != 0; in isMulticastAddress()
85 addr = (longAddrFromByteAddr(base.toByteArray()) & OUI_MASK) in createRandomUnicastAddress()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DWap230WspContentTypeTest.java226 HexDump.toByteArray((byte) (value | WSP_SHORT_INTEGER_MASK))); in testWellKnownShortIntegerMimeTypeValues()
259 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testDecodeReturnsFalse_WhenOnlyAZeroBytePresent()
270 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testConstrainedMediaExtensionMedia()
286 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthExtensionMedia()
301 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownShortInteger()
317 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownShortIntegerWithUnknownValue()
336 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownLongInteger()
355 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownLongIntegerWithUnknownValue()
374 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormLengthQuoteWellKnownShortInteger()
392 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormLengthQuoteWellKnownShortIntegerWithUnknownValue()
[all …]
/frameworks/base/core/java/android/hardware/hdmi/
DHdmiTimerRecordSources.java199 /* package */ int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiTimerRecordSources.TimeUnit
345 int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiTimerRecordSources.TimerInfo
353 index += mStartTime.toByteArray(data, index); in toByteArray()
354 index += mDuration.toByteArray(data, index); in toByteArray()
393 int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiTimerRecordSources.TimerRecordSource
396 index += mTimerInfo.toByteArray(data, index); in toByteArray()
398 mRecordSource.toByteArray(false, data, index); in toByteArray()
427 mRecordSource.toByteArray(false, data, index + 1); in extraParamToByteArray()
DHdmiRecordSources.java76 /* package */ final int toByteArray(boolean includeType, byte[] data, int index) { in toByteArray() method in HdmiRecordSources.RecordSource
166 int toByteArray(byte[] data, int index); in toByteArray() method
198 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.AribData
227 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.AtscData
261 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.DvbData
290 private int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.ChannelIdentifier
331 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.DigitalChannelData
332 mChannelIdentifier.toByteArray(data, index); in toByteArray()
530 mIdentification.toByteArray(data, index + 1); in extraParamToByteArray()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/storage/
DBubbleXmlHelperTest.kt101 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8))) in testReadXml()
116 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8))) in testUpgradeFromV0DropsPreviousData()
143 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8))) in testReadXMLWithoutTaskId()
167 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8))) in testXMLWithoutLocusToLocus()
190 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8))) in testUpgradeToV2SavesPreviousData()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DBitwiseStreamsTest.java40 byte[] outBuf = outStream.toByteArray(); in testOne()
55 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testTwo()
69 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testThree()
86 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testFour()
108 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testFive()
127 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testSix()
152 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testExpandArray()
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/serializer/
DRuleBinarySerializerTest.java134 assertThat(ruleOutputStream.toByteArray()) in testBinaryString_emptyRules()
135 .isEqualTo(expectedRuleOutputStream.toByteArray()); in testBinaryString_emptyRules()
149 assertThat(indexingOutputStream.toByteArray()) in testBinaryString_emptyRules()
150 .isEqualTo(expectedIndexingOutputStream.toByteArray()); in testBinaryString_emptyRules()
192 assertThat(ruleOutputStream.toByteArray()) in testBinaryStream_serializeValidCompoundFormula()
193 .isEqualTo(expectedRuleOutputStream.toByteArray()); in testBinaryStream_serializeValidCompoundFormula()
214 assertThat(indexingOutputStream.toByteArray()) in testBinaryStream_serializeValidCompoundFormula()
215 .isEqualTo(expectedIndexingOutputStream.toByteArray()); in testBinaryStream_serializeValidCompoundFormula()
248 byte[] expectedRules = byteArrayOutputStream.toByteArray(); in testBinaryString_serializeValidCompoundFormula_notConnector()
298 byte[] expectedRules = byteArrayOutputStream.toByteArray(); in testBinaryString_serializeValidCompoundFormula_andConnector()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/timezone/
DCheckTokenTest.java33 public void toByteArray() throws Exception { in toByteArray() method in CheckTokenTest
37 assertEquals(originalToken, CheckToken.fromByteArray(originalToken.toByteArray())); in toByteArray()
45 byte[] validTokenBytes = token.toByteArray(); in fromByteArray()
/frameworks/base/services/tests/servicestests/src/com/android/server/locales/
DLocaleManagerBackupRestoreTest.java219 mBackupHelper.stageAndApplyRestoredPayload(/* payload= */ out.toByteArray(), in testRestore_zeroLengthPayload_nothingRestoredAndNoStageData()
234 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_allAppsInstalled_noStageDataCreated()
250 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_noAppsInstalled_everythingStaged()
274 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_someAppsInstalled_partiallyStaged()
292 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_appLocalesAlreadySet_nothingRestoredAndNoStageData()
324 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_appLocalesSetForSomeApps_restoresOnlyForAppsHavingNoLocalesSet()
348 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_restoreInvokedAgain_creationTimeChanged()
355 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_restoreInvokedAgain_creationTimeChanged()
379 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_appInstalledAfterSUW_restoresFromStage()
411 mBackupHelper.stageAndApplyRestoredPayload(out.toByteArray(), DEFAULT_USER_ID); in testRestore_appInstalledAfterSUWAndLocalesAlreadySet_restoresNothing()
[all …]
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/testing/
DTestFileUtils.java26 public static byte[] toByteArray(File file) throws IOException { in toByteArray() method in TestFileUtils
28 return ByteStreams.toByteArray(fis); in toByteArray()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsBackupAgentTest.java239 return os.toByteArray(); in generateUncorruptedHeader()
251 os.write(SettingsBackupAgent.toByteArray(version)); in generateCorruptedHeader()
257 os.write(SettingsBackupAgent.toByteArray(manufacturer)); in generateCorruptedHeader()
263 os.write(SettingsBackupAgent.toByteArray(product)); in generateCorruptedHeader()
265 return os.toByteArray(); in generateCorruptedHeader()
271 os.write(SettingsBackupAgent.toByteArray(key)); in generateSingleKeyTestBackupData()
272 os.write(SettingsBackupAgent.toByteArray(value)); in generateSingleKeyTestBackupData()
273 return os.toByteArray(); in generateSingleKeyTestBackupData()
/frameworks/libs/net/common/device/com/android/net/module/util/
DHexDump.java107 return toHexString(toByteArray(b)); in toHexString()
168 return toHexString(toByteArray(i)); in toHexString()
176 public static byte[] toByteArray(byte b) { in toByteArray() method in HexDump
187 public static byte[] toByteArray(int i) { in toByteArray() method in HexDump
/frameworks/base/core/java/com/android/internal/util/
DHexDump.java101 return toHexString(toByteArray(b)); in toHexString()
141 return toHexString(toByteArray(i)); in toHexString()
144 public static byte[] toByteArray(byte b) in toByteArray() method in HexDump
151 public static byte[] toByteArray(int i) in toByteArray() method in HexDump
/frameworks/base/core/tests/coretests/src/android/util/
DBinaryXmlTest.java67 final ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray()); in testLargeInterned_Binary()
103 final PersistableBundle actual = doPersistableBundleRead(secondIn, os.toByteArray()); in doTranscode()
141 data = os.toByteArray(); in testResolve_Memory()
158 data = os.toByteArray(); in testResolve_Memory()
/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/
DHexDumpTest.java55 HexDump.toByteArray((int) 0xff000004)); in testIntegerToByteArray()
60 assertArrayEquals(new byte[]{(byte) 0x7f}, HexDump.toByteArray((byte) 0x7f)); in testByteToByteArray()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/
DInlineLengthsEncryptedChunkEncoder.java42 writer.writeBytes(toByteArray(length)); in writeChunkToWriter()
64 static byte[] toByteArray(int value) { in toByteArray() method in InlineLengthsEncryptedChunkEncoder
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationHistoryProtoHelperTest.java98 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadWriteNotifications()
124 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadWriteNotifications_stringFieldsPersistedEvenIfNoPool()
166 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadNotificationsWithPkgFilter()
208 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadNotificationsWithNumberFilter()
260 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadNotificationsWithNumberFilter_preExistingNotifs()
308 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadMergeIntoExistingHistory()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/kv/
DDecryptedChunkKvOutputTest.java54 private static final byte[] TEST_PAIR_1 = toByteArray(createPair(TEST_KEY_1, TEST_VALUE_1));
55 private static final byte[] TEST_PAIR_2 = toByteArray(createPair(TEST_KEY_2, TEST_VALUE_2));
157 private static byte[] toByteArray(KeyValuePairProto.KeyValuePair nano) { in toByteArray() method in DecryptedChunkKvOutputTest
158 return KeyValuePairProto.KeyValuePair.toByteArray(nano); in toByteArray()
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/model/
DByteTrackedOutputStreamTest.java48 assertThat(outputStream.toByteArray().length).isEqualTo(outputContent.length); in testSuccessfulWriteAndValidateWrittenBytesCount_directFromByteArray()
68 assertThat(outputStream.toByteArray().length).isEqualTo(3); in testSuccessfulWriteAndValidateWrittenBytesCount_fromBitStream()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/
DNotificationPanelLoggerImpl.java42 /* byte[] notifications*/ MessageNano.toByteArray(proto)); in logPanelShown()
52 /* byte[] notifications*/ MessageNano.toByteArray(proto)); in logNotificationDrag()
/frameworks/base/identity/java/android/security/identity/
DUtil.java79 byte[] xBytes = stripLeadingZeroes(x.toByteArray()); in publicKeyEncodeUncompressedForm()
88 byte[] yBytes = stripLeadingZeroes(y.toByteArray()); in publicKeyEncodeUncompressedForm()
96 return baos.toByteArray(); in publicKeyEncodeUncompressedForm()
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DBackupEligibilityRulesTest.java629 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_equalSignatures_returnsTrue()
630 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_equalSignatures_returnsTrue()
631 Signature signature3Copy = new Signature(SIGNATURE_3.toByteArray()); in signaturesMatch_equalSignatures_returnsTrue()
651 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_extraSignatureInTarget_returnsTrue()
652 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_extraSignatureInTarget_returnsTrue()
672 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_extraSignatureInStored_returnsFalse()
673 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_extraSignatureInStored_returnsFalse()
693 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_oneNonMatchingSignature_returnsFalse()
694 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_oneNonMatchingSignature_returnsFalse()
715 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_singleStoredSignatureNoRotation_returnsTrue()
[all …]
/frameworks/base/services/core/java/com/android/server/timezone/
DCheckToken.java45 byte[] toByteArray() { in toByteArray() method in CheckToken
54 return baos.toByteArray(); in toByteArray()

12345678910>>...13