Home
last modified time | relevance | path

Searched refs:payload (Results 1 – 25 of 98) sorted by relevance

1234

/packages/apps/Nfc/src/com/android/nfc/handover/
DHandoverDataParser.java126 byte[] payload = new byte[4]; in createBluetoothAlternateCarrierRecord()
127 payload[0] = (byte) (activating ? CARRIER_POWER_STATE_ACTIVATING : in createBluetoothAlternateCarrierRecord()
129 payload[1] = 1; // length of carrier data reference in createBluetoothAlternateCarrierRecord()
130 payload[2] = 'b'; // carrier data reference: ID for Bluetooth OOB data record in createBluetoothAlternateCarrierRecord()
131 payload[3] = 0; // Auxiliary data reference count in createBluetoothAlternateCarrierRecord()
133 payload); in createBluetoothAlternateCarrierRecord()
137 byte[] payload = new byte[8]; in createBluetoothOobDataRecord()
142 payload[0] = (byte) (payload.length & 0xFF); in createBluetoothOobDataRecord()
143 payload[1] = (byte) ((payload.length >> 8) & 0xFF); in createBluetoothOobDataRecord()
152 System.arraycopy(addressBytes, 0, payload, 2, 6); in createBluetoothOobDataRecord()
[all …]
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeIdPayloadTest.java108 IkeIdPayload payload = new IkeIdPayload(false, inputPacket, false); in testDecodeIpv4AddrIdPayload() local
110 assertEquals(IkePayload.PAYLOAD_TYPE_ID_RESPONDER, payload.payloadType); in testDecodeIpv4AddrIdPayload()
111 assertEquals(IkeIdentification.ID_TYPE_IPV4_ADDR, payload.ikeId.idType); in testDecodeIpv4AddrIdPayload()
112 IkeIpv4AddrIdentification ikeId = (IkeIpv4AddrIdentification) payload.ikeId; in testDecodeIpv4AddrIdPayload()
121 IkeIdPayload payload = new IkeIdPayload(false, inputPacket, false); in testDecodeIpv6AddrIdPayload() local
123 assertEquals(IkePayload.PAYLOAD_TYPE_ID_RESPONDER, payload.payloadType); in testDecodeIpv6AddrIdPayload()
124 assertEquals(IkeIdentification.ID_TYPE_IPV6_ADDR, payload.ikeId.idType); in testDecodeIpv6AddrIdPayload()
125 IkeIpv6AddrIdentification ikeId = (IkeIpv6AddrIdentification) payload.ikeId; in testDecodeIpv6AddrIdPayload()
133 IkeIdPayload payload = in testDecodeFqdnIdPayload() local
136 assertEquals(IkePayload.PAYLOAD_TYPE_ID_RESPONDER, payload.payloadType); in testDecodeFqdnIdPayload()
[all …]
DIkeNotifyPayloadTest.java67 IkeNotifyPayload payload = new IkeNotifyPayload(false, inputPacket); in testDecodeNotifyPayloadSpiUnset() local
68 assertEquals(IkePayload.PROTOCOL_ID_UNSET, payload.protocolId); in testDecodeNotifyPayloadSpiUnset()
69 assertEquals(IkePayload.SPI_LEN_NOT_INCLUDED, payload.spiSize); in testDecodeNotifyPayloadSpiUnset()
70 assertEquals(IkeNotifyPayload.NOTIFY_TYPE_NAT_DETECTION_SOURCE_IP, payload.notifyType); in testDecodeNotifyPayloadSpiUnset()
71 assertEquals(IkePayload.SPI_NOT_INCLUDED, payload.spi); in testDecodeNotifyPayloadSpiUnset()
72 assertArrayEquals(notifyData, payload.notifyData); in testDecodeNotifyPayloadSpiUnset()
79 IkeNotifyPayload payload = new IkeNotifyPayload(false, inputPacket); in testDecodeNotifyPayloadSpiSet() local
80 assertEquals(IkePayload.PROTOCOL_ID_ESP, payload.protocolId); in testDecodeNotifyPayloadSpiSet()
81 assertEquals(IkePayload.SPI_LEN_IPSEC, payload.spiSize); in testDecodeNotifyPayloadSpiSet()
82 assertEquals(IkeNotifyPayload.NOTIFY_TYPE_REKEY_SA, payload.notifyType); in testDecodeNotifyPayloadSpiSet()
[all …]
DIkeKePayloadTest.java119 IkeKePayload payload = new IkeKePayload(CRITICAL_BIT, inputPacket); in testDecodeIkeKePayload() local
121 assertFalse(payload.isOutbound); in testDecodeIkeKePayload()
122 assertEquals(EXPECTED_DH_GROUP, payload.dhGroup); in testDecodeIkeKePayload()
125 assertEquals(keyExchangeData.length, payload.keyExchangeData.length); in testDecodeIkeKePayload()
127 assertEquals(keyExchangeData[i], payload.keyExchangeData[i]); in testDecodeIkeKePayload()
139 IkeKePayload payload = new IkeKePayload(CRITICAL_BIT, inputPacket); in testDecodeIkeKePayloadWithInvalidKeData() local
148 IkeKePayload payload = new IkeKePayload(CRITICAL_BIT, inputPacket); in testEncodeIkeKePayload() local
150 ByteBuffer byteBuffer = ByteBuffer.allocate(payload.getPayloadLength()); in testEncodeIkeKePayload()
151 payload.encodeToByteBuffer(NEXT_PAYLOAD_TYPE, byteBuffer); in testEncodeIkeKePayload()
160 IkeKePayload payload = in testGetIkeKePayload() local
[all …]
DIkeSkfPayloadTest.java110 IkeSkfPayload payload = in decodeAndDecryptFragMsg() local
120 return payload; in decodeAndDecryptFragMsg()
127 IkeSkfPayload payload = decodeAndDecryptFragMsg(message); in testDecode() local
129 assertEquals(IkePayload.PAYLOAD_TYPE_SKF, payload.payloadType); in testDecode()
130 assertEquals(FRAGMENT_NUM, payload.fragmentNum); in testDecode()
131 assertEquals(TOTAL_FRAGMENTS, payload.totalFragments); in testDecode()
132 assertArrayEquals(mDecryptedData, payload.getUnencryptedData()); in testDecode()
189 IkeSkfPayload payload = decodeAndDecryptFragMsg(message); in testEncode() local
191 int payloadLength = payload.getPayloadLength(); in testEncode()
193 payload.encodeToByteBuffer(IkePayload.PAYLOAD_TYPE_NO_NEXT, buffer); in testEncode()
DIkeAuthDigitalSignPayloadTest.java99 IkeAuthPayload payload = IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testDecodeGenericDigitalSignPayload() local
101 assertTrue(payload instanceof IkeAuthDigitalSignPayload); in testDecodeGenericDigitalSignPayload()
102 IkeAuthDigitalSignPayload dsPayload = (IkeAuthDigitalSignPayload) payload; in testDecodeGenericDigitalSignPayload()
134 IkeAuthDigitalSignPayload payload = in testVerifyInboundSignature() local
139 payload.verifyInboundSignature( in testVerifyInboundSignature()
152 IkeAuthDigitalSignPayload payload = in testVerifyInboundSignatureFail() local
155 assertArrayEquals(payload.signature, TestUtils.hexStringToByteArray(SIGNATURE)); in testVerifyInboundSignatureFail()
159 payload.verifyInboundSignature( in testVerifyInboundSignatureFail()
DIkeAuthPayloadTest.java98 IkeAuthPayload payload = IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testDecodeIkeAuthPayload() local
100 assertEquals(IkeAuthPayload.AUTH_METHOD_PRE_SHARED_KEY, payload.authMethod); in testDecodeIkeAuthPayload()
101 assertTrue(payload instanceof IkeAuthPskPayload); in testDecodeIkeAuthPayload()
105 assertArrayEquals(expectedSignature, ((IkeAuthPskPayload) payload).signature); in testDecodeIkeAuthPayload()
113 IkeAuthPayload payload = IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testDecodeIkeAuthPayloadWithUnsupportedMethod() local
DIkeAuthPskPayloadTest.java89 IkeAuthPskPayload payload = in testBuildOutboundIkeAuthPskPayload() local
93 assertEquals(IkeAuthPayload.AUTH_METHOD_PRE_SHARED_KEY, payload.authMethod); in testBuildOutboundIkeAuthPskPayload()
94 assertArrayEquals(SIGNATURE, payload.signature); in testBuildOutboundIkeAuthPskPayload()
97 int payloadLength = payload.getPayloadLength(); in testBuildOutboundIkeAuthPskPayload()
103 payload.encodeToByteBuffer(IkePayload.PAYLOAD_TYPE_SA, byteBuffer); in testBuildOutboundIkeAuthPskPayload()
/packages/apps/Nfc/src/com/android/nfc/
DNfcWifiProtectedSetup.java103 ByteBuffer payload = ByteBuffer.wrap(record.getPayload()); in parse() local
104 while (payload.hasRemaining()) { in parse()
105 short fieldId = payload.getShort(); in parse()
106 int fieldSize = payload.getShort() & 0xFFFF; in parse()
108 return parseCredential(payload, fieldSize); in parse()
110 payload.position(payload.position() + fieldSize); in parse()
117 private static WifiConfiguration parseCredential(ByteBuffer payload, int size) { in parseCredential() argument
118 int startPosition = payload.position(); in parseCredential()
120 while (payload.position() < startPosition + size) { in parseCredential()
121 short fieldId = payload.getShort(); in parseCredential()
[all …]
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DBearerData.java240 bData.userData.payload = inStream.readByteArray(dataBits); in decodeUserData()
363 int udhLen = userData.payload[0] & 0x00FF; in decodeUserDataPayload()
366 System.arraycopy(userData.payload, 1, headerData, 0, udhLen); in decodeUserDataPayload()
380 byte[] payload = new byte[userData.numFields]; in decodeUserDataPayload()
381 int copyLen = userData.numFields < userData.payload.length in decodeUserDataPayload()
382 ? userData.numFields : userData.payload.length; in decodeUserDataPayload()
384 System.arraycopy(userData.payload, 0, payload, 0, copyLen); in decodeUserDataPayload()
385 userData.payload = payload; in decodeUserDataPayload()
391 userData.payloadStr = decodeLatin(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
393 userData.payloadStr = decodeUtf8(userData.payload, offset, userData.numFields); in decodeUserDataPayload()
[all …]
/packages/apps/Car/CompanionDeviceSupport/proto/
Dtrusted_device_message.proto30 // The different message types that indicate the content of the payload.
32 // The contents of the payload are unknown.
36 // process. The payload is empty for this type.
39 // This message payload contains the escrow token.
42 // This message payload contains the unlock handle.
45 // The payload of this message contains all the necessary information to
49 // An acknowledgment for a previous message. The payload will be empty
53 // An error has occurred on the sender of this message. The payload will be
63 bytes payload = 3; field
66 // An error message. Should only be sent as `TrustedDeviceMessage.payload` when
[all …]
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ble/
DBlePacketFactoryTest.java125 byte[] payload = makePayload(/* length= */ 100); in testMakePackets_correctlyChunksPayload()
129 BlePacketFactory.makeBlePackets(payload, /* mesageId= */ 1, maxSize); in testMakePackets_correctlyChunksPayload()
140 assertThat(reconstructedPayload.toByteArray()).isEqualTo(payload); in testMakePackets_correctlyChunksPayload()
146 byte[] payload = makePayload(/* length= */ 10000); in testMakePackets_correctlyChunksSplitPayload()
150 BlePacketFactory.makeBlePackets(payload, /* mesageId= */ 1, maxSize); in testMakePackets_correctlyChunksSplitPayload()
161 assertThat(reconstructedPayload.toByteArray()).isEqualTo(payload); in testMakePackets_correctlyChunksSplitPayload()
166 byte[] payload = new byte[length]; in makePayload()
167 new Random().nextBytes(payload); in makePayload()
168 return payload; in makePayload()
/packages/apps/Nfc/src/com/android/nfc/snep/
DSnepMessage.java110 byte[] payload = new byte[1 + langLength + textLength]; in getLargeNdef()
111 payload[0] = (byte) langLength; in getLargeNdef()
113 System.arraycopy(langBytes, 0, payload, 1, langLength); in getLargeNdef()
114 System.arraycopy(textBytes, 0, payload, 1 + langLength, textLength); in getLargeNdef()
116 …ecord data2 = new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], payload); in getLargeNdef()
128 byte[] payload = new byte[1 + langLength + textLength]; in getSmallNdef()
129 payload[0] = (byte) langLength; in getSmallNdef()
131 System.arraycopy(langBytes, 0, payload, 1, langLength); in getSmallNdef()
132 System.arraycopy(textBytes, 0, payload, 1 + langLength, textLength); in getSmallNdef()
134 …ecord data1 = new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], payload); in getSmallNdef()
/packages/apps/Tag/src/com/android/apps/tag/record/
DTextRecord.java85 byte[] payload = record.getPayload(); in parse()
86 Preconditions.checkArgument(payload.length > 0); in parse()
102 String textEncoding = ((payload[0] & 0200) == 0) ? "UTF-8" : "UTF-16"; in parse()
103 int languageCodeLength = payload[0] & 0077; in parse()
104 Preconditions.checkArgument(payload.length - languageCodeLength - 1 >= 0); in parse()
106 String languageCode = new String(payload, 1, languageCodeLength, "US-ASCII"); in parse()
107 String text = new String(payload, in parse()
109 payload.length - languageCodeLength - 1, in parse()
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/exceptions/
DIkeProtocolExceptionTest.java44 IkeNotifyPayload payload = exception.buildNotifyPayload(); in buildNotifyPayloadWithData() local
45 assertEquals(ERROR_TYPE_UNSUPPORTED_CRITICAL_PAYLOAD, payload.notifyType); in buildNotifyPayloadWithData()
46 assertArrayEquals(new byte[] {(byte) 0x37}, payload.notifyData); in buildNotifyPayloadWithData()
54 IkeNotifyPayload payload = exception.buildNotifyPayload(); in buildNotifyPayloadWithoutData() local
55 assertEquals(ERROR_TYPE_NO_PROPOSAL_CHOSEN, payload.notifyType); in buildNotifyPayloadWithoutData()
56 assertArrayEquals(new byte[0], payload.notifyData); in buildNotifyPayloadWithoutData()
/packages/services/Car/service/src/com/android/car/trust/
DBLEMessageV1Factory.java116 private static BLEMessage makeBLEMessage(byte[] payload, OperationType operation, in makeBLEMessage() argument
124 .setPayload(ByteString.copyFrom(payload)) in makeBLEMessage()
137 public static List<BLEMessage> makeBLEMessages(byte[] payload, OperationType operation, in makeBLEMessages() argument
140 int payloadSize = payload.length; in makeBLEMessages()
144 bleMessages.add(makeBLEMessage(payload, operation, isPayloadEncrypted)); in makeBLEMessages()
157 .setPayload(ByteString.copyFrom(Arrays.copyOfRange(payload, start, end))) in makeBLEMessages()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DIkeSessionStateMachine.java2404 for (IkePayload payload : ikeMessage.ikePayloadList) { in handleResponseIkeMessage()
2405 switch (payload.payloadType) { in handleResponseIkeMessage()
2411 handledPayloads.add(payload); in handleResponseIkeMessage()
2446 for (IkePayload payload : ikeMessage.ikePayloadList) { in handleInboundDeleteChildRequest()
2447 switch (payload.payloadType) { in handleInboundDeleteChildRequest()
2455 + ((IkeNotifyPayload) payload).notifyType); in handleInboundDeleteChildRequest()
2458 IkeDeletePayload delPayload = (IkeDeletePayload) payload; in handleInboundDeleteChildRequest()
2484 logw("Unexpected payload types found: " + payload.payloadType); in handleInboundDeleteChildRequest()
2518 for (IkePayload payload : ikeMessage.ikePayloadList) { in handleInboundRekeyChildRequest()
2519 switch (payload.payloadType) { in handleInboundRekeyChildRequest()
[all …]
/packages/services/Car/service/proto/
Doperation_type.proto8 // The different message types that indicate the content of the payload.
13 // The contents of the payload are unknown.
19 // The payload contains handshake messages needed to set up encryption.
23 // payload for this type should be empty.
26 // The payload contains a client-specific message.
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/
DSearchResult.java80 public final ResultPayload payload; field in SearchResult
99 payload = builder.mResultPayload; in SearchResult()
100 viewType = payload.getType(); in SearchResult()
163 public Builder setPayload(ResultPayload payload) { in setPayload() argument
164 mResultPayload = payload; in setPayload()
/packages/services/Car/car-lib/src/android/car/content/pm/
DCarAppBlockingPolicy.java63 byte[] payload = in.readBlob(); in CarAppBlockingPolicy()
65 payloadParcel.unmarshall(payload, 0, payload.length); in CarAppBlockingPolicy()
83 byte[] payload = payloadParcel.marshall(); in writeToParcel()
84 dest.writeBlob(payload); in writeToParcel()
/packages/apps/Car/libs/connected-device-lib/proto/
Doperation_type.proto24 // The different message types that indicate the content of the payload.
29 // The contents of the payload are unknown.
35 // The payload contains handshake messages needed to set up encryption.
39 // payload for this type should be empty.
42 // The payload contains a client-specific message.
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/
DIkePayload.java156 IkePayload(int payload, boolean critical) { in IkePayload() argument
157 payloadType = payload; in IkePayload()
180 for (IkePayload payload : searchList) { in getPayloadListForTypeInProvidedList()
181 if (payloadType == payload.payloadType) { in getPayloadListForTypeInProvidedList()
182 payloadList.add(payloadClass.cast(payload)); in getPayloadListForTypeInProvidedList()
DIkeMessage.java167 IkePayload payload = pair.first; in decodePayloadList() local
168 logPayloadsSb.append(payload.getTypeString()).append(" "); in decodePayloadList()
170 if (!(payload instanceof IkeUnsupportedPayload)) { in decodePayloadList()
171 int type = payload.payloadType; in decodePayloadList()
178 supportedPayloadList.add(payload); in decodePayloadList()
179 } else if (payload.isCritical) { in decodePayloadList()
180 unsupportedCriticalPayloadList.add(payload.payloadType); in decodePayloadList()
246 for (IkePayload payload : ikePayloadList) { in encodePayloads()
247 payloadLengthSum += payload.getPayloadLength(); in encodePayloads()
248 logPayloadsSb.append(payload.getTypeString()).append(" "); in encodePayloads()
/packages/apps/Camera2/src/com/android/camera/one/v2/imagesaver/
DJpegImageBackendImageSaver.java120 TaskImageContainer.CompressedPayload payload) { in onResultCompressed() argument
128 final Bitmap bitmap = BitmapFactory.decodeByteArray(payload.data, 0, in onResultCompressed()
129 payload.data.length, options); in onResultCompressed()
134 int rotation = Exif.getOrientation(payload.data); in onResultCompressed()
137 mPictureSaverCallback.onRemoteThumbnailAvailable(payload.data); in onResultCompressed()
144 TaskImageContainer.UncompressedPayload payload) { in onResultUncompressed() argument
/packages/apps/DeskClock/src/com/android/deskclock/
DItemAdapter.java56 public void onItemChanged(ItemHolder<?> itemHolder, Object payload) {
58 mOnItemChangedListener.onItemChanged(itemHolder, payload);
62 notifyItemChanged(position, payload);
368 public final void notifyItemChanged(Object payload) { in notifyItemChanged() argument
370 listener.onItemChanged(this, payload); in notifyItemChanged()
529 void onItemChanged(ItemAdapter.ItemHolder<?> itemHolder, Object payload); in onItemChanged() argument

1234