Home
last modified time | relevance | path

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

12345678910>>...26

/aosp12/frameworks/base/startop/iorap/tests/src/com/google/android/startop/iorap/
H A DAppLaunchEventTest.kt87 val valid = ActivityLaunched(/* sequenceId= */2L, "test".toByteArray(),
89 val copy = ActivityLaunched(/* sequenceId= */2L, "test".toByteArray(),
91 val noneCopy1 = ActivityLaunched(/* sequenceId= */1L, "test".toByteArray(),
93 val noneCopy2 = ActivityLaunched(/* sequenceId= */1L, "test".toByteArray(),
95 val noneCopy3 = ActivityLaunched(/* sequenceId= */1L, "test1".toByteArray(),
115 val valid = ActivityLaunchFinished(/* sequenceId= */2L, "test".toByteArray(),
117 val copy = ActivityLaunchFinished(/* sequenceId= */2L, "test".toByteArray(),
143 val copy = ActivityLaunchCancelled(/* sequenceId= */2L, "test".toByteArray())
164 val noneCopy1 = ReportFullyDrawn(/* sequenceId= */1L, "test".toByteArray(),
166 val noneCopy2 = ReportFullyDrawn(/* sequenceId= */1L, "test".toByteArray(),
[all …]
/aosp12/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
H A 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()
79 return toByteArray(array, Long.SIZE); in toByteArray()
88 return toByteArray(array, Float.SIZE); in toByteArray()
97 return toByteArray(array, Double.SIZE); in toByteArray()
[all …]
H A DCameraMetadataTest.java661 }, toByteArray( in testReadWriteRggbChannelVector()
682 toByteArray( in testReadWriteSizeF()
703 }, toByteArray( in testReadWriteRectangle()
725 toByteArray( in testReadWriteMeteringRectangle()
755 toByteArray( in testReadWriteHighSpeedVideoConfiguration()
771 toByteArray( in testReadWriteColorSpaceTransform()
782 toByteArray(1, 2)); in testReadWritePoint()
792 toByteArray( in testReadWritePoint()
816 toByteArray( in testReadWritePointF()
862 toByteArray( in testReadWriteStreamConfiguration()
[all …]
/aosp12/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
H A DCarNavigationManagerTest.java102 assertThat(Distance.parseFrom(distance.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
103 assertThat(Maneuver.parseFrom(maneuver.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
104 assertThat(Lane.parseFrom(lane.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
105 assertThat(LaneDirection.parseFrom(laneDirection.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
106 assertThat(Cue.parseFrom(cue.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
107 assertThat(CueElement.parseFrom(cueElement.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
108 assertThat(Step.parseFrom(step.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
109 assertThat(LatLng.parseFrom(latLng.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
110 assertThat(Destination.parseFrom(destination.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
111 assertThat(Road.parseFrom(road.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
[all …]
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DWap230WspContentTypeTest.java259 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()
411 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormLengthQuoteWellKnownLongInteger()
[all …]
/aosp12/packages/apps/RemoteProvisioner/tests/unittests/src/com/android/remoteprovisioner/unittest/
H A DCborUtilsTest.java68 byte[] encoded = mBaos.toByteArray(); in encodeDataItem()
110 byte[] encodedBytes = mBaos.toByteArray(); in testParseSignedCertificatesFakeData()
124 assertNull(CborUtils.parseSignedCertificates(mBaos.toByteArray())); in testParseSignedCertificatesWrongSize()
284 assertNull(CborUtils.parseGeekResponse(mBaos.toByteArray())); in testParseGeekResponseFailsOnWrongType()
298 assertNull(CborUtils.parseGeekResponse(mBaos.toByteArray())); in testParseGeekResponseFailsOnWrongType()
312 assertNull(CborUtils.parseGeekResponse(mBaos.toByteArray())); in testParseGeekResponseFailsOnWrongType()
326 assertNull(CborUtils.parseGeekResponse(mBaos.toByteArray())); in testParseGeekResponseFailsOnWrongType()
339 assertNull(CborUtils.parseGeekResponse(mBaos.toByteArray())); in testParseGeekResponseWrongSize()
352 byte[] deviceInfo = mBaos.toByteArray(); in testCreateCertificateRequest()
363 byte[] protectedDataPayload = mBaos.toByteArray(); in testCreateCertificateRequest()
[all …]
/aosp12/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/
H A DCarTelemetryServiceTest.java117 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testAddMetricsConfig_newMetricsConfig_shouldSucceed()
126 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testAddMetricsConfig_duplicateMetricsConfig_shouldFail()
131 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testAddMetricsConfig_duplicateMetricsConfig_shouldFail()
149 mService.addMetricsConfig(KEY_V2, METRICS_CONFIG_V2.toByteArray()); in testAddMetricsConfig_olderMetricsConfig_shouldFail()
154 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testAddMetricsConfig_olderMetricsConfig_shouldFail()
164 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testAddMetricsConfig_newerMetricsConfig_shouldReplaceAndDeleteOldResult()
167 mService.addMetricsConfig(KEY_V2, METRICS_CONFIG_V2.toByteArray()); in testAddMetricsConfig_newerMetricsConfig_shouldReplaceAndDeleteOldResult()
179 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testRemoveMetricsConfig_shouldDeleteConfigAndResult()
194 mService.addMetricsConfig(key, config.toByteArray()); in testRemoveAllMetricsConfigs_shouldRemoveConfigsAndResults()
195 mService.addMetricsConfig(KEY_V1, METRICS_CONFIG_V1.toByteArray()); in testRemoveAllMetricsConfigs_shouldRemoveConfigsAndResults()
[all …]
/aosp12/frameworks/libs/net/common/framework/com/android/net/module/util/
H A 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());
51 return (longAddrFromByteAddr(address.toByteArray()) & MULTICAST_MASK) != 0; in isMulticastAddress()
84 addr = (longAddrFromByteAddr(base.toByteArray()) & OUI_MASK) in createRandomUnicastAddress()
/aosp12/packages/modules/GeoTZ/s2storage/src/test/java/com/android/timezone/location/storage/table/packed/
H A DIntValuePackedTableTest.java51 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeTooBig()
74 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_unsigned()
97 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_signed()
118 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in addEntry_outOfOrder()
135 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getSharedData()
150 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_unsignedValue()
169 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntryByIndex()
192 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_signedValue()
208 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_emptyTable()
223 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_badKey()
[all …]
H A DPackedTableReaderWriterTest.java88 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in headerFields()
111 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in entryGetValue_int()
136 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in entryGetValue_long()
162 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_unsigned()
186 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_signed()
207 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in addEntry_outOfOrder()
223 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getSharedData()
238 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_unsignedValue()
257 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_signedValue()
273 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_emptyTable()
[all …]
/aosp12/frameworks/base/core/java/android/hardware/hdmi/
H A 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()
H A 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()
/aosp12/packages/apps/Nfc/src/com/android/nfc/snep/
H A DSnepMessage.java71 return new SnepMessage(VERSION, REQUEST_GET, 4 + ndef.toByteArray().length, in getGetRequest()
76 return new SnepMessage(VERSION, REQUEST_PUT, ndef.toByteArray().length, 0, ndef); in getPutRequest()
87 return new SnepMessage(VERSION, RESPONSE_SUCCESS, ndef.toByteArray().length, 0, ndef); in getSuccessResponse()
174 public byte[] toByteArray() { in toByteArray() method in SnepMessage
179 bytes = mNdefMessage.toByteArray(); in toByteArray()
188 bytes = mNdefMessage.toByteArray(); in toByteArray()
216 return buffer.toByteArray(); in toByteArray()
H A DSnepMessenger.java48 byte[] buffer = msg.toByteArray(); in sendMessage()
157 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
168 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
171 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
237 mSocket.send(SnepMessage.getMessage(fieldContinue).toByteArray()); in getMessage()
249 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
263 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
273 return SnepMessage.fromByteArray(buffer.toByteArray()); in getMessage()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/avrcp/helpers/
H A DCoverArt.java80 private byte[] toByteArray(Bitmap bitmap) { in toByteArray() method in CoverArt
85 return buffer.toByteArray(); in toByteArray()
92 byte[] image = toByteArray(mImage); in getImageHash()
121 bytes = outputStream.toByteArray(); in getImage()
140 bytes = outputStream.toByteArray(); in getImage()
169 bytes = outputStream.toByteArray(); in getThumbnail()
/aosp12/packages/modules/Wifi/framework/java/android/net/wifi/
H A DWifiSsid.java191 byte[] ssidBytes = octets.toByteArray(); in toString()
220 return Arrays.equals(octets.toByteArray(), that.octets.toByteArray()); in equals()
225 return Arrays.hashCode(octets.toByteArray()); in hashCode()
237 return isArrayAllZeroes(octets.toByteArray()); in isHidden()
243 return octets.toByteArray(); in getOctets()
266 dest.writeByteArray(octets.toByteArray()); in writeToParcel()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/gatt/
H A DAdvertiseHelper.java124 ret.write(serviceUuids16.toByteArray(), 0, serviceUuids16.size()); in advertiseDataToBytes()
130 ret.write(serviceUuids32.toByteArray(), 0, serviceUuids32.size()); in advertiseDataToBytes()
136 ret.write(serviceUuids128.toByteArray(), 0, serviceUuids128.size()); in advertiseDataToBytes()
193 ret.write(serviceUuids16.toByteArray(), 0, serviceUuids16.size()); in advertiseDataToBytes()
199 ret.write(serviceUuids32.toByteArray(), 0, serviceUuids32.size()); in advertiseDataToBytes()
205 ret.write(serviceUuids128.toByteArray(), 0, serviceUuids128.size()); in advertiseDataToBytes()
208 return ret.toByteArray(); in advertiseDataToBytes()
/aosp12/packages/apps/Launcher3/src/com/android/launcher3/util/
H A DIOUtils.java41 public static byte[] toByteArray(File file) throws IOException { in toByteArray() method in IOUtils
43 return toByteArray(in); in toByteArray()
47 public static byte[] toByteArray(InputStream in) throws IOException { in toByteArray() method in IOUtils
50 return out.toByteArray(); in toByteArray()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/serializer/
H A DRuleBinarySerializerTest.java134 assertThat(ruleOutputStream.toByteArray()) in testBinaryString_emptyRules()
135 .isEqualTo(expectedRuleOutputStream.toByteArray()); in testBinaryString_emptyRules()
149 assertThat(indexingOutputStream.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()
248 byte[] expectedRules = byteArrayOutputStream.toByteArray(); in testBinaryString_serializeValidCompoundFormula_notConnector()
298 byte[] expectedRules = byteArrayOutputStream.toByteArray(); in testBinaryString_serializeValidCompoundFormula_andConnector()
348 byte[] expectedRules = byteArrayOutputStream.toByteArray(); in testBinaryString_serializeValidCompoundFormula_orConnector()
615 assertThat(ruleOutputStream.toByteArray()) in testBinaryString_verifyManyRulesAreIndexedCorrectly()
[all …]
/aosp12/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
H A 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()
/aosp12/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/
H A DOsuProviderInfoTestUtil.java69 return out.toByteArray(); in getTestData()
87 return out.toByteArray(); in getTestDataWithInvalidLength()
129 return out.toByteArray(); in getTestPayload()
139 return out.toByteArray(); in getI18NameListData()
154 return out.toByteArray(); in getI18NameData()
H A DANQPParserTest.java58 return stream.toByteArray(); in getVenueNamePayload()
75 return stream.toByteArray(); in getDomainNamePayload()
96 return stream.toByteArray(); in getRoamingConsortiumPayload()
114 return stream.toByteArray(); in getNAIRealmPayload()
132 return stream.toByteArray(); in getThreeGPPNetworkPayload()
155 return stream.toByteArray(); in getVendorSpecificPayload()
219 return stream.toByteArray(); in getHSConnectionCapabilityPayload()
235 return out.toByteArray(); in getHSOsuProvidersPayload()
261 return stream.toByteArray(); in getI18NameListPayload()
/aosp12/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/storage/
H A DBubbleXmlHelperTest.kt121 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
136 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
163 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
188 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
211 val actual = readXml(ByteArrayInputStream(src.toByteArray(Charsets.UTF_8)))
/aosp12/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/
H A DSmsHeaderTest.java90 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArray()
104 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArray16bits()
118 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArrayLanguageTable()
125 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testHashCode()
/aosp12/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
H A 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()

12345678910>>...26