Home
last modified time | relevance | path

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

123456789

/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarNavigationManagerTest.java99 assertThat(ImageReference.parseFrom(imageReference.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
100 assertThat(Distance.parseFrom(distance.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
101 assertThat(Maneuver.parseFrom(maneuver.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
102 assertThat(Lane.parseFrom(lane.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
103 assertThat(LaneDirection.parseFrom(laneDirection.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
104 assertThat(Cue.parseFrom(cue.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
105 assertThat(CueElement.parseFrom(cueElement.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
106 assertThat(Step.parseFrom(step.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
107 assertThat(LatLng.parseFrom(latLng.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
108 assertThat(Destination.parseFrom(destination.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
[all …]
/packages/apps/Nfc/tests/src/com/android/nfc/snep/
DSnepValidationClientTests.java61 byte[] responseBytes = client.get(msg).getNdefMessage().toByteArray(); in testNonFragmented()
63 byte[] msgBytes = msg.toByteArray(); in testNonFragmented()
82 Log.d(TAG, "Putting ndef message of size " + msg.toByteArray().length + "..."); in testFragmented()
86 byte[] responseBytes = client.get(msg).getNdefMessage().toByteArray(); in testFragmented()
88 byte[] msgBytes = msg.toByteArray(); in testFragmented()
119 responseBytes = client.get(msgA).getNdefMessage().toByteArray(); in testMultipleNdef()
121 msgBytes = msgA.toByteArray(); in testMultipleNdef()
128 responseBytes = client.get(msgB).getNdefMessage().toByteArray(); in testMultipleNdef()
130 msgBytes = msgB.toByteArray(); in testMultipleNdef()
168 Log.d(TAG, "Putting ndef message of size " + msg.toByteArray().length + "..."); in testUndeliverable()
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/util/
DScanDataAnalyzerTest.java45 ScanDataAnalyzer.containsUuidsInOverflow(CORRECT_DATA.toByteArray(), CORRECT_MASK)) in containsUuidsInOverflow_correctBitFlipped_shouldReturnTrue()
53 CORRECT_DATA.negate().toByteArray(), CORRECT_MASK)) in containsUuidsInOverflow_bitNotFlipped_shouldReturnFalse()
60 ScanDataAnalyzer.containsUuidsInOverflow(CORRECT_DATA.toByteArray(), in containsUuidsInOverflow_maskWithMultipleBitsIncompleteMatch_shouldReturnTrue()
73 .toByteArray(); in containsUuidsInOverflow_incorrectLengthByte_shouldReturnFalse()
86 .toByteArray(); in containsUuidsInOverflow_incorrectAdTypeByte_shouldReturnFalse()
98 .toByteArray(); in containsUuidsInOverflow_incorrectCustomId_shouldReturnFalse()
105 .toByteArray(); in containsUuidsInOverflow_incorrectContentLength_shouldReturnFalse()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/trust/
DBleMessageStreamV1Test.java107 verify(mWriteCharacteristicMock).setValue(expectedMessage.toByteArray()); in writeMessage_noChunkingRequired_sendsCorrectMessage()
137 BLEMessageV1Factory.makeAcknowledgementMessage().toByteArray()); in writeMessage_chunkingRequired_sendsCorrectMessage()
162 reassembledMessageStream.write(bleMessage.getPayload().toByteArray()); in writeMessage_chunkingRequired_sendsCorrectMessage()
166 assertThat(reassembledMessageStream.toByteArray()).isEqualTo(message); in writeMessage_chunkingRequired_sendsCorrectMessage()
207 writtenPayloads.add(bleMessage.getPayload().toByteArray()); in writeMessage_chunkingRequired_retriesSamePayloadIfNoAckReceived()
256 clientMessage.toByteArray()); in processClientMessage_noChunking_notifiesCallbackForCompleteMessage()
280 message.toByteArray()); in processClientMessage_chunkingRequired_notifiesCallbackForCompleteMessage()
305 message.toByteArray()); in processClientMessage_chunkingRequired_sendsACKForEachMessagePart()
317 byte[] ackMessageBytes = BLEMessageV1Factory.makeAcknowledgementMessage().toByteArray(); in processClientMessage_chunkingRequired_sendsACKForEachMessagePart()
DBLEMessagePayloadStreamTest.java60 assertThat(mBLEMessagePayloadStream.toByteArray()).isNotEmpty(); in testReset_getEmptyValue()
64 assertThat(mBLEMessagePayloadStream.toByteArray()).isEmpty(); in testReset_getEmptyValue()
77 assertThat(mBLEMessagePayloadStream.toByteArray()).isEqualTo(TEST_MESSAGE_PAYLOAD); in testMessageContent_withOneMessage_shouldBeConsistent()
91 assertThat(mBLEMessagePayloadStream.toByteArray()).isEqualTo( in testMessageContent_withMultipleMessages_shouldBeConsistent()
/packages/apps/Nfc/src/com/android/nfc/snep/
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()
236 mSocket.send(SnepMessage.getMessage(fieldContinue).toByteArray()); in getMessage()
248 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
262 mSocket.send(SnepMessage.getMessage(fieldReject).toByteArray()); in getMessage()
272 return SnepMessage.fromByteArray(buffer.toByteArray()); in getMessage()
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()
/packages/apps/Bluetooth/src/com/android/bluetooth/sap/
DSapMessage.java869 RIL_SIM_SAP_STATUS_IND.parseFrom(msg.getPayload().toByteArray()); in createUnsolicited()
891 RIL_SIM_SAP_DISCONNECT_IND.parseFrom(msg.getPayload().toByteArray()); in createUnsolicited()
945 RIL_SIM_SAP_CONNECT_RSP.parseFrom(msg.getPayload().toByteArray()); in createSolicited()
984 RIL_SIM_SAP_APDU_RSP.parseFrom(msg.getPayload().toByteArray()); in createSolicited()
991 mApduResp = resMsg.getApduResponse().toByteArray(); in createSolicited()
1015 msg.getPayload().toByteArray()); in createSolicited()
1041 RIL_SIM_SAP_TRANSFER_ATR_RSP.parseFrom(msg.getPayload().toByteArray()); in createSolicited()
1044 mAtr = resMsg.getAtr().toByteArray(); in createSolicited()
1073 RIL_SIM_SAP_POWER_RSP.parseFrom(msg.getPayload().toByteArray()); in createSolicited()
1099 RIL_SIM_SAP_POWER_RSP.parseFrom(msg.getPayload().toByteArray()); in createSolicited()
[all …]
/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/ble/
DBleDeviceMessageStream.java149 byte[] rawBytes = bleDeviceMessage.toByteArray(); in writeMessage()
177 mWriteCharacteristic.setValue(packet.toByteArray()); in writeNextMessageInQueue()
264 mWriteCharacteristic.setValue(headunitVersion.toByteArray()); in processVersionExchange()
300 byte[] payload = packet.getPayload().toByteArray(); in processPacket()
318 byte[] messageBytes = currentPayloadStream.toByteArray(); in processPacket()
339 ByteUtils.bytesToUUID(message.getRecipient().toByteArray()), in processPacket()
340 message.getIsPayloadEncrypted(), message.getPayload().toByteArray()); in processPacket()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DIOUtils.java42 public static byte[] toByteArray(File file) throws IOException { in toByteArray() method in IOUtils
44 return toByteArray(in); in toByteArray()
48 public static byte[] toByteArray(InputStream in) throws IOException { in toByteArray() method in IOUtils
51 return out.toByteArray(); in toByteArray()
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ble/
DBlePacketFactoryTest.java137 reconstructedPayload.write(packet.getPayload().toByteArray()); in testMakePackets_correctlyChunksPayload()
140 assertThat(reconstructedPayload.toByteArray()).isEqualTo(payload); in testMakePackets_correctlyChunksPayload()
158 reconstructedPayload.write(packet.getPayload().toByteArray()); in testMakePackets_correctlyChunksSplitPayload()
161 assertThat(reconstructedPayload.toByteArray()).isEqualTo(payload); in testMakePackets_correctlyChunksSplitPayload()
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/
DDataStallDetectionStats.java81 mDns = MessageNano.toByteArray(dns); in DataStallDetectionStats()
105 return MessageNano.toByteArray(data); in emptyCellDataIfNull()
123 return MessageNano.toByteArray(data); in emptyWifiInfoIfNull()
256 mWifiInfo = MessageNano.toByteArray(data); in setWiFiData()
293 mCellularInfo = MessageNano.toByteArray(data); in setCellData()
/packages/services/Car/service/src/com/android/car/trust/
DBLEMessagePayloadStream.java48 mPendingData.write(message.getPayload().toByteArray()); in write()
63 public byte[] toByteArray() { in toByteArray() method in BLEMessagePayloadStream
64 return mPendingData.toByteArray(); in toByteArray()
DBleMessageStreamV1.java212 callback.onMessageReceived(mPayloadStream.toByteArray(), characteristic.getUuid()); in onCharacteristicWrite()
232 writeValueAndNotify(mMessageQueue.remove().toByteArray()); in writeNextMessageInQueue()
258 writeValueAndNotify(BLEMessageV1Factory.makeAcknowledgementMessage().toByteArray()); in sendAcknowledgmentMessage()
287 writeValueAndNotify(mMessageQueue.peek().toByteArray());
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/feature/trust/
DTrustedDeviceManager.java192 mTrustAgentDelegate.unlockUserWithToken(credentials.getEscrowToken().toByteArray(), in unlockUser()
193 ByteUtils.bytesToLong(credentials.getHandle().toByteArray()), in unlockUser()
418 byte[] message = payload.toByteArray(); in processEnrollmentMessage()
433 byte[] message = payload.toByteArray(); in processUnlockMessage()
484 trustedDeviceError = TrustedDeviceError.parseFrom(payload.toByteArray()); in processErrorMessage()
552 .toByteArray(); in createAcknowledgmentMessage()
561 .toByteArray(); in createHandleMessage()
569 .toByteArray(); in createStartEnrollmentMessage()
/packages/apps/Bluetooth/src/com/android/bluetooth/gatt/
DAdvertiseHelper.java121 ret.write(serviceUuids16.toByteArray(), 0, serviceUuids16.size()); in advertiseDataToBytes()
127 ret.write(serviceUuids32.toByteArray(), 0, serviceUuids32.size()); in advertiseDataToBytes()
133 ret.write(serviceUuids128.toByteArray(), 0, serviceUuids128.size()); in advertiseDataToBytes()
169 return ret.toByteArray(); in advertiseDataToBytes()
/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/
DSmsHeaderTest.java87 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArray()
101 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArray16bits()
115 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArrayLanguageTable()
DCdmaSmsMessageTest.java254 byte[] cmasUserData = cmasBos.toByteArray(); in createCmasSmsMessage()
266 return createMessageFromParcel(msg, bos.toByteArray()); in createCmasSmsMessage()
289 return createMessageFromParcel(msg, bos.toByteArray()); in createBroadcastSmsMessage()
683 SmsMessage msg = createMessageFromParcel(cdmaSmsMessage, bos.toByteArray()); in testRandomUserData()
749 SmsMessage msg = createMessageFromParcel(cdmaSmsMessage, bos.toByteArray()); in testServiceCategoryProgramDataAddCategory()
807 SmsMessage msg = createMessageFromParcel(cdmaSmsMessage, bos.toByteArray()); in testServiceCategoryProgramDataDeleteTwoCategories()
/packages/apps/Nfc/src/com/android/nfc/ndefpush/
DNdefPushProtocol.java148 public byte[] toByteArray() { in toByteArray() method in NdefPushProtocol
157 byte[] bytes = mMessages[i].toByteArray(); in toByteArray()
165 return buffer.toByteArray(); in toByteArray()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/
DUserIdTest.java119 new DataInputStream(new ByteArrayInputStream(output.toByteArray()))); in testRead_success()
133 UserId.read(new DataInputStream(new ByteArrayInputStream(output.toByteArray()))); in testRead_failWithInvalidVersion()
149 DataInputStream in = new DataInputStream(new ByteArrayInputStream(output.toByteArray())); in testWrite_writeDataOutputStream()
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/feature/notificationmsg/
DNotificationMsgService.java147 mNotificationMsgDelegate.dismiss(key).toByteArray()); in handleDismissNotificationIntent()
157 mNotificationMsgDelegate.markAsRead(key).toByteArray()); in handleMarkAsReadIntent()
169 mNotificationMsgDelegate.reply(key, message.toString()).toByteArray()); in handleReplyIntent()
/packages/apps/Car/tests/TestMediaApp/src/com/android/car/media/testmediaapp/loader/
DTmaLoaderUtils.java149 private static byte[] toByteArray(InputStream input) throws IOException { in toByteArray() method in TmaLoaderUtils
152 return output.toByteArray(); in toByteArray()
163 return new String(toByteArray(stream)); in stringFromAsset()
/packages/apps/TV/src/com/android/tv/data/
DInternalDataUtils.java85 return bos.toByteArray(); in serializeInternalProviderData()
130 return bos.toByteArray(); in serializeInternalProviderData()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/util/
DProtoTracer.java91 return MessageNano.toByteArray(encapsulatingProto); in serializeEncapsulatingProto()
96 return MessageNano.toByteArray(proto); in getProtoBytes()
/packages/apps/Nfc/src/com/android/nfc/handover/
DHandoverClient.java109 byte[] buffer = msg.toByteArray(); in sendHandoverRequest()
133 handoverSelectMsg = new NdefMessage(byteStream.toByteArray()); in sendHandoverRequest()

123456789