Lines Matching refs:payload
107 byte[] payload = new byte[4];
108 payload[0] = (byte) (activating ? CARRIER_POWER_STATE_ACTIVATING :
110 payload[1] = 1; // length of carrier data reference
111 payload[2] = 'b'; // carrier data reference: ID for Bluetooth OOB data record
112 payload[3] = 0; // Auxiliary data reference count
114 payload);
118 byte[] payload = new byte[8];
123 payload[0] = (byte) (payload.length & 0xFF);
124 payload[1] = (byte) ((payload.length >> 8) & 0xFF);
132 System.arraycopy(addressBytes, 0, payload, 2, 6);
135 return new NdefRecord(NdefRecord.TNF_MIME_MEDIA, TYPE_BT_OOB, new byte[]{'b'}, payload);
165 ByteBuffer payload = ByteBuffer.allocate(nestedPayload.length + 1);
166 payload.put((byte)0x12); // connection handover v1.2
167 payload.put(nestedPayload);
169 byte[] payloadBytes = new byte[payload.position()];
170 payload.position(0);
171 payload.get(payloadBytes);
185 ByteBuffer payload = ByteBuffer.allocate(nestedPayload.length + 1);
186 payload.put((byte) 0x12); // connection handover v1.2
187 payload.put(nestedMessage.toByteArray());
189 byte[] payloadBytes = new byte[payload.position()];
190 payload.position(0);
191 payload.get(payloadBytes);
261 byte[] payload = handoverRec.getPayload();
262 if (payload == null || payload.length <= 1) return false;
264 byte[] payloadNdef = new byte[payload.length - 1];
265 System.arraycopy(payload, 1, payloadNdef, 0, payload.length - 1);
296 // the carrier state inside the 'hs' payload.
345 BluetoothHandoverData parseNokia(ByteBuffer payload) {
350 payload.position(1);
352 payload.get(address);
355 payload.position(14);
356 int nameLength = payload.get();
358 payload.get(nameBytes);
363 Log.i(TAG, "nokia: payload shorter than expected");
369 BluetoothHandoverData parseBtOob(ByteBuffer payload) {
374 payload.position(2); // length
375 byte[] address = parseMacFromBluetoothRecord(payload);
379 while (payload.remaining() > 0) {
381 int len = payload.get();
382 int type = payload.get();
386 payload.get(nameBytes);
392 payload.get(nameBytes);
396 payload.position(payload.position() + len - 1);
403 Log.i(TAG, "BT OOB: payload shorter than expected");
409 BluetoothHandoverData parseBleOob(ByteBuffer payload) {
416 while (payload.remaining() > 0) {
417 int len = payload.get();
418 payload.get();
421 byte[] address = parseMacFromBluetoothRecord(payload);
422 payload.position(payload.position() + 1); // advance over random byte
427 byte role = payload.get();
436 payload.get(nameBytes);
447 payload.get(securityManagerTK);
453 payload.position(payload.position() + len - 1);
460 Log.i(TAG, "BT OOB: payload shorter than expected");
466 private byte[] parseMacFromBluetoothRecord(ByteBuffer payload) {
468 payload.get(address);