Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 907) sorted by relevance

12345678910>>...37

/packages/providers/MediaProvider/src/com/android/providers/media/util/
DMemory.java27 public static int peekInt(byte[] src, int offset, ByteOrder order) { in peekInt() argument
29 return (((src[offset++] & 0xff) << 24) | in peekInt()
30 ((src[offset++] & 0xff) << 16) | in peekInt()
31 ((src[offset++] & 0xff) << 8) | in peekInt()
32 ((src[offset ] & 0xff) << 0)); in peekInt()
34 return (((src[offset++] & 0xff) << 0) | in peekInt()
35 ((src[offset++] & 0xff) << 8) | in peekInt()
36 ((src[offset++] & 0xff) << 16) | in peekInt()
37 ((src[offset ] & 0xff) << 24)); in peekInt()
41 public static void pokeInt(byte[] dst, int offset, int value, ByteOrder order) { in pokeInt() argument
[all …]
/packages/modules/Virtualization/libs/libfdt/src/
Dlib.rs95 fn from_offset(fdt: &Fdt, offset: PropOffset) -> Result<&Self> { in from_offset()
96 Ok(fdt.get_property_by_offset(offset)?.as_ref()) in from_offset()
116 offset: PropOffset, field
121 fn new(fdt: &'a Fdt, offset: PropOffset) -> Result<Self> { in new()
122 let property = FdtPropertyStruct::from_offset(fdt, offset)?; in new()
123 Ok(Self { fdt, offset, property }) in new()
137 if let Some(offset) = self.fdt.next_property_offset(self.offset)? { in next_property()
138 Ok(Some(Self::new(self.fdt, offset)?)) in next_property()
149 offset: NodeOffset, field
155 let offset = self.fdt.parent_offset(self.offset)?; in parent() localVariable
[all …]
/packages/modules/GeoTZ/s2storage/src/test/java/com/android/storage/block/read/
DBlockDataTest.java112 private static void assertSliceEmptyBehavior(BlockData blockData, int offset, int length) { in assertSliceEmptyBehavior() argument
113 TypedData slice = blockData.slice(offset, length); in assertSliceEmptyBehavior()
118 private static void assertSliceNonEmptyBehavior(BlockData blockData, int offset, int length) { in assertSliceNonEmptyBehavior() argument
119 TypedData slice = blockData.slice(offset, length); in assertSliceNonEmptyBehavior()
122 assertEquals(blockData.getByte(offset + i), slice.getByte(i)); in assertSliceNonEmptyBehavior()
128 BlockData blockData, int offset, int length) { in assertSliceTypedDataBadArguments() argument
129 assertThrows(IllegalArgumentException.class, () -> blockData.slice(offset, length)); in assertSliceTypedDataBadArguments()
154 int offset = 1 + tinyByteArray.length; in typedRandomAccess() local
156 assertEquals(0x123456789ABCDEF1L, blockData.getValueAsLong(8, offset, false)); in typedRandomAccess()
157 assertEquals(0x123456789ABCDEL, blockData.getValueAsLong(7, offset, false)); in typedRandomAccess()
[all …]
/packages/modules/Bluetooth/framework/java/android/bluetooth/
DBluetoothGattCharacteristic.java476 public Integer getIntValue(int formatType, int offset) { in getIntValue() argument
477 if ((offset + getTypeLen(formatType)) > mValue.length) return null; in getIntValue()
481 return unsignedByteToInt(mValue[offset]); in getIntValue()
484 return unsignedBytesToInt(mValue[offset], mValue[offset + 1]); in getIntValue()
488 mValue[offset], mValue[offset + 1], mValue[offset + 2], mValue[offset + 3]); in getIntValue()
490 return unsignedToSigned(unsignedByteToInt(mValue[offset]), 8); in getIntValue()
493 return unsignedToSigned(unsignedBytesToInt(mValue[offset], mValue[offset + 1]), 16); in getIntValue()
498 mValue[offset], in getIntValue()
499 mValue[offset + 1], in getIntValue()
500 mValue[offset + 2], in getIntValue()
[all …]
/packages/apps/LegacyCamera/src/com/android/camera/
DExif.java29 int offset = 0; in getOrientation() local
33 while (offset + 3 < jpeg.length && (jpeg[offset++] & 0xFF) == 0xFF) { in getOrientation()
34 int marker = jpeg[offset] & 0xFF; in getOrientation()
40 offset++; in getOrientation()
52 length = pack(jpeg, offset, 2, false); in getOrientation()
53 if (length < 2 || offset + length > jpeg.length) { in getOrientation()
60 pack(jpeg, offset + 2, 4, false) == 0x45786966 && in getOrientation()
61 pack(jpeg, offset + 6, 2, false) == 0) { in getOrientation()
62 offset += 8; in getOrientation()
68 offset += length; in getOrientation()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/aware/
DTlvBufferUtils.java197 public TlvConstructor putByteArray(int type, @Nullable byte[] array, int offset, in putByteArray() argument
202 System.arraycopy(array, offset, mArray, mPosition, length); in putByteArray()
397 public int offset; field in TlvBufferUtils.TlvElement
399 private TlvElement(int type, int length, @Nullable byte[] refArray, int offset) { in TlvElement() argument
403 this.offset = offset; in TlvElement()
405 if (offset + length > refArray.length) { in TlvElement()
416 return Arrays.copyOfRange(mRefArray, offset, offset + length); in getRawData()
431 return mRefArray[offset]; in getByte()
446 return peekShort(mRefArray, offset, byteOrder); in getShort()
461 return peekInt(mRefArray, offset, byteOrder); in getInt()
[all …]
/packages/modules/Wifi/tests/hostsidetests/multidevices/com.google.snippet.wifi/aware/
DTlvBufferUtils.java197 public TlvConstructor putByteArray(int type, @Nullable byte[] array, int offset, in putByteArray() argument
202 System.arraycopy(array, offset, mArray, mPosition, length); in putByteArray()
397 public int offset; field in TlvBufferUtils.TlvElement
399 private TlvElement(int type, int length, @Nullable byte[] refArray, int offset) { in TlvElement() argument
403 this.offset = offset; in TlvElement()
405 if (offset + length > refArray.length) { in TlvElement()
416 return Arrays.copyOfRange(mRefArray, offset, offset + length); in getRawData()
431 return mRefArray[offset]; in getByte()
446 return peekShort(mRefArray, offset, byteOrder); in getShort()
461 return peekInt(mRefArray, offset, byteOrder); in getInt()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DContactLookupKey.java121 int offset = 0; in parse() local
129 while (offset < length) { in parse()
134 while (offset < length) { in parse()
135 c = string.charAt(offset++); in parse()
165 while (offset < length) { in parse()
166 c = string.charAt(offset++); in parse()
169 if (offset == length) { in parse()
173 c = string.charAt(offset); in parse()
177 offset++; in parse()
187 int start = offset; in parse()
[all …]
/packages/modules/Bluetooth/system/bta/vc/
Ddevice.cc196 VolumeOffset offset = VolumeOffset(service.handle); in set_volume_offset_control_service_handles() local
200 offset.state_handle = chrc.value_handle; in set_volume_offset_control_service_handles()
201 offset.state_ccc_handle = find_ccc_handle(chrc.value_handle); in set_volume_offset_control_service_handles()
202 log::debug("{}, offset_state handle={:#x}, ccc {:#x}", address, offset.state_handle, in set_volume_offset_control_service_handles()
203 offset.state_ccc_handle); in set_volume_offset_control_service_handles()
206 offset.audio_location_handle = chrc.value_handle; in set_volume_offset_control_service_handles()
207 offset.audio_location_ccc_handle = find_ccc_handle(chrc.value_handle); in set_volume_offset_control_service_handles()
208 offset.audio_location_writable = chrc.properties & GATT_CHAR_PROP_BIT_WRITE_NR; in set_volume_offset_control_service_handles()
210 offset.audio_location_handle, offset.audio_location_ccc_handle); in set_volume_offset_control_service_handles()
213 offset.control_point_handle = chrc.value_handle; in set_volume_offset_control_service_handles()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/bass_client/
DBaseData.java123 int offset = 0; in BaseData() local
124 System.arraycopy(serviceData, offset, levelOne.mPresentationDelay, 0, 3); in BaseData()
125 offset += METADATA_PRESENTATION_DELAY_LENGTH; in BaseData()
126 levelOne.mNumSubGroups = serviceData[offset++]; in BaseData()
130 if (offset >= serviceData.length) { in BaseData()
135 Pair<BaseInformation, Integer> pair1 = parseLevelTwo(serviceData, i, offset); in BaseData()
144 offset = pair1.second; in BaseData()
146 if (offset >= serviceData.length) { in BaseData()
151 Pair<BaseInformation, Integer> pair2 = parseLevelThree(serviceData, offset); in BaseData()
159 offset = pair2.second; in BaseData()
[all …]
/packages/modules/Bluetooth/system/tools/scripts/
Dbtsnooz.py100 offset = 0
101 while offset < len(decompressed):
102 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset)
103 offset += 7 + length - 1
107 offset = 0
108 while offset < len(decompressed):
109 length, delta_time_ms, type = struct.unpack_from('=HIb', decompressed, offset)
111 offset += 7
116 sys.stdout.buffer.write(decompressed[offset:offset + length - 1])
117 offset += length - 1
[all …]
/packages/modules/Bluetooth/system/stack/btm/
Dsco_pkt_status.h37 int offset; member
47 offset = 0; in init()
54 data[offset / 8] |= 1UL << (offset % 8); in update()
56 data[offset / 8] &= ~(1UL << (offset % 8)); in update()
58 if (offset == 0) { in update()
61 offset++; in update()
62 if (offset == size) { in update()
63 offset = 0; in update()
73 return !is_full ? ts : ts - BTM_PKT_STATUS_WBS_FRAME_US * (size - offset); in begin_ts_raw_us()
79 uint64_t end_ts_raw_us() { return ts + BTM_PKT_STATUS_WBS_FRAME_US * offset; } in end_ts_raw_us()
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_variation/
Dstdout.txt.expect23 .location = {.poolIndex = 0, .offset = 0, .length = 0},
32 .location = {.poolIndex = 0, .offset = 0, .length = 64},
41 .location = {.poolIndex = 0, .offset = 64, .length = 4},
50 .location = {.poolIndex = 0, .offset = 68, .length = 4},
59 .location = {.poolIndex = 0, .offset = 72, .length = 4},
68 .location = {.poolIndex = 0, .offset = 76, .length = 4},
77 .location = {.poolIndex = 0, .offset = 80, .length = 4},
86 .location = {.poolIndex = 0, .offset = 84, .length = 4},
95 .location = {.poolIndex = 0, .offset = 0, .length = 0},
170 .location = {.poolIndex = 0, .offset = 0, .length = 0},
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_naming/
Dstdout.txt.expect23 .location = {.poolIndex = 0, .offset = 0, .length = 0},
32 .location = {.poolIndex = 0, .offset = 0, .length = 64},
41 .location = {.poolIndex = 0, .offset = 64, .length = 4},
50 .location = {.poolIndex = 0, .offset = 68, .length = 4},
59 .location = {.poolIndex = 0, .offset = 72, .length = 4},
68 .location = {.poolIndex = 0, .offset = 76, .length = 4},
77 .location = {.poolIndex = 0, .offset = 80, .length = 4},
86 .location = {.poolIndex = 0, .offset = 84, .length = 4},
95 .location = {.poolIndex = 0, .offset = 0, .length = 0},
170 .location = {.poolIndex = 0, .offset = 0, .length = 0},
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_implicit_variation/
Dstdout.txt.expect23 .location = {.poolIndex = 0, .offset = 0, .length = 0},
32 .location = {.poolIndex = 0, .offset = 0, .length = 64},
41 .location = {.poolIndex = 0, .offset = 64, .length = 4},
50 .location = {.poolIndex = 0, .offset = 68, .length = 4},
59 .location = {.poolIndex = 0, .offset = 72, .length = 4},
68 .location = {.poolIndex = 0, .offset = 76, .length = 4},
77 .location = {.poolIndex = 0, .offset = 80, .length = 4},
86 .location = {.poolIndex = 0, .offset = 84, .length = 4},
95 .location = {.poolIndex = 0, .offset = 0, .length = 0},
170 .location = {.poolIndex = 0, .offset = 0, .length = 0},
[all …]
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DBearerData.java244 private static String decodeUtf8(byte[] data, int offset, int numFields) in decodeUtf8() argument
246 return decodeCharset(data, offset, numFields, 1, "UTF-8"); in decodeUtf8()
249 private static String decodeUtf16(byte[] data, int offset, int numFields) in decodeUtf16() argument
252 int padding = offset % 2; in decodeUtf16()
253 numFields -= (offset + padding) / 2; in decodeUtf16()
254 return decodeCharset(data, offset, numFields, 2, "utf-16be"); in decodeUtf16()
257 private static String decodeCharset(byte[] data, int offset, int numFields, int width, in decodeCharset() argument
259 if (numFields < 0 || (numFields * width + offset) > data.length) { in decodeCharset()
261 int padding = offset % width; in decodeCharset()
262 int maxNumFields = (data.length - offset - padding) / width; in decodeCharset()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DExifOutputStream.java106 , int offset, int length) { in requestByteToBuffer() argument
109 mBuffer.put(buffer, offset, byteToRead); in requestByteToBuffer()
118 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
125 offset += byteToProcess; in write()
129 out.write(buffer, offset, byteToProcess); in write()
132 offset += byteToProcess; in write()
139 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
140 offset += byteRead; in write()
157 byteRead = requestByteToBuffer(4, buffer, offset, length); in write()
158 offset += byteRead; in write()
[all …]
/packages/apps/Camera2/src/com/android/camera/exif/
DExifOutputStream.java106 , int offset, int length) { in requestByteToBuffer() argument
109 mBuffer.put(buffer, offset, byteToRead); in requestByteToBuffer()
118 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
125 offset += byteToProcess; in write()
129 out.write(buffer, offset, byteToProcess); in write()
132 offset += byteToProcess; in write()
139 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
140 offset += byteRead; in write()
157 byteRead = requestByteToBuffer(4, buffer, offset, length); in write()
158 offset += byteRead; in write()
[all …]
/packages/modules/GeoTZ/tzs2storage/src/readonly/java/com/android/timezone/location/storage/tzs2range/read/
DHeaderBlock.java40 int offset = 0; in HeaderBlock() local
43 int dataS2Level = blockData.getUnsignedByte(offset++); in HeaderBlock()
44 int prefixBitCount = blockData.getUnsignedByte(offset++); in HeaderBlock()
45 int suffixBitCount = blockData.getUnsignedByte(offset++); in HeaderBlock()
46 int suffixRecordBitCount = blockData.getUnsignedByte(offset++); in HeaderBlock()
47 int endCellIdOffsetBitCount = blockData.getUnsignedByte(offset++); in HeaderBlock()
48 int suffixTableBlockIdOffset = blockData.getUnsignedByte(offset++); in HeaderBlock()
55 char stringCount = blockData.getChar(offset); in HeaderBlock()
56 offset += Character.BYTES; in HeaderBlock()
61 byte[] bytes = blockData.getTinyByteArray(offset); in HeaderBlock()
[all …]
/packages/modules/Nfc/libnfc-nci/src/nfc/nci/
Dnci_hmsgs.cc57 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_tlv_parameter_generic_cmd()
58 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_tlv_parameter_generic_cmd()
104 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_reset()
106 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_reset()
135 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_init()
137 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_init()
169 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_get_config()
171 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_get_config()
202 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_set_config()
203 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_set_config()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/exif/
DExifOutputStream.java107 , int offset, int length) { in requestByteToBuffer() argument
110 mBuffer.put(buffer, offset, byteToRead); in requestByteToBuffer()
119 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
126 offset += byteToProcess; in write()
130 out.write(buffer, offset, byteToProcess); in write()
133 offset += byteToProcess; in write()
140 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
141 offset += byteRead; in write()
158 byteRead = requestByteToBuffer(4, buffer, offset, length); in write()
159 offset += byteRead; in write()
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_backward_compatibility_float/
Dstdout.txt.expect23 .location = {.poolIndex = 0, .offset = 0, .length = 0},
32 .location = {.poolIndex = 0, .offset = 0, .length = 0},
41 .location = {.poolIndex = 0, .offset = 0, .length = 0},
50 .location = {.poolIndex = 0, .offset = 0, .length = 0},
59 .location = {.poolIndex = 0, .offset = 0, .length = 0},
68 .location = {.poolIndex = 0, .offset = 0, .length = 0},
77 .location = {.poolIndex = 0, .offset = 0, .length = 0},
86 .location = {.poolIndex = 0, .offset = 0, .length = 0},
95 .location = {.poolIndex = 0, .offset = 0, .length = 0},
104 .location = {.poolIndex = 0, .offset = 0, .length = 0},
[all …]
/packages/modules/NetworkStack/src/android/net/apf/
DApfV61GeneratorBase.java234 private List<byte[]> addJumpIfBytesAtOffsetEqualsHelper(int offset, in addJumpIfBytesAtOffsetEqualsHelper() argument
239 if (offset < 0 || offset > 255) { in addJumpIfBytesAtOffsetEqualsHelper()
263 .addU8(offset) in addJumpIfBytesAtOffsetEqualsHelper()
279 public Type addJumpIfBytesAtOffsetEqualsAnyOf(int offset, @NonNull List<byte[]> bytesList, in addJumpIfBytesAtOffsetEqualsAnyOf() argument
281 final List<byte[]> failbackList = addJumpIfBytesAtOffsetEqualsHelper(offset, bytesList, tgt, in addJumpIfBytesAtOffsetEqualsAnyOf()
286 return addLoadImmediate(R0, offset).addJumpIfBytesAtR0EqualsAnyOf(failbackList, tgt); in addJumpIfBytesAtOffsetEqualsAnyOf()
294 public Type addJumpIfBytesAtOffsetEqualsNoneOf(int offset, @NonNull List<byte[]> bytesList, in addJumpIfBytesAtOffsetEqualsNoneOf() argument
296 final List<byte[]> failbackList = addJumpIfBytesAtOffsetEqualsHelper(offset, bytesList, tgt, in addJumpIfBytesAtOffsetEqualsNoneOf()
301 return addLoadImmediate(R0, offset).addJumpIfBytesAtR0EqualsNoneOf(failbackList, tgt); in addJumpIfBytesAtOffsetEqualsNoneOf()
305 public Type addCountAndDropIfBytesAtOffsetEqualsAnyOf(int offset, List<byte[]> bytesList, in addCountAndDropIfBytesAtOffsetEqualsAnyOf() argument
[all …]
/packages/modules/NeuralNetworks/tools/test_generator/tests/P_vts_internal/
Dstdout.txt.expect23 .location = {.poolIndex = 0, .offset = 0, .length = 0},
32 .location = {.poolIndex = 0, .offset = 0, .length = 0},
41 .location = {.poolIndex = 0, .offset = 0, .length = 4},
50 .location = {.poolIndex = 0, .offset = 0, .length = 0},
59 .location = {.poolIndex = 0, .offset = 4, .length = 8},
68 .location = {.poolIndex = 0, .offset = 0, .length = 0},
77 .location = {.poolIndex = 0, .offset = 0, .length = 0},
86 .location = {.poolIndex = 0, .offset = 0, .length = 0},
95 .location = {.poolIndex = 0, .offset = 0, .length = 0},
104 .location = {.poolIndex = 0, .offset = 0, .length = 0},
[all …]
/packages/apps/Messaging/src/com/android/messaging/ui/
DCompositeAdapter.java149 int offset = position - start; in getPartitionAtPosition() local
152 offset--; in getPartitionAtPosition()
154 if (offset == -1) { in getPartitionAtPosition()
200 final int offset = position - start; in getItem() local
202 if (partition.hasHeader() && offset == 0 && in getItem()
207 return mPartitions[i].getAdapter().getItem(offset); in getItem()
222 final int offset = position - start; in getItemId() local
224 if (partition.hasHeader() && offset == 0 && in getItemId()
229 return mPartitions[i].getAdapter().getItemId(offset); in getItemId()
244 final int offset = position - start; in isEnabled() local
[all …]

12345678910>>...37