Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 3819) sorted by relevance

12345678910>>...153

/packages/apps/SecureElement/src/com/android/se/security/gpac/
DBerTlv.java60 StringBuilder sb = new StringBuilder(digest.length * 2); in toHex()
78 if (data == null || data.length == 0) { in decode()
86 if (curIndex < data.length) { in decode()
91 if (curIndex < data.length) { in decode()
95 "Index " + curIndex + " out of range! [0..[" + data.length); in decode()
104 throw new ParserException("Index " + curIndex + " out of range! [0..[" + data.length); in decode()
108 int length; in decode() local
109 if (curIndex < data.length) { in decode()
112 length = temp; in decode()
114 if (curIndex < data.length) { in decode()
[all …]
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/util/
DArrayUtils.java32 if (arrays.length == 0) { in concatByteArrays()
38 for (int i = 0; i < arrays.length; i++) { in concatByteArrays()
39 totalSize += arrays[i].length; in concatByteArrays()
44 int pos = arrays[0].length; in concatByteArrays()
45 for (int i = 1; i < arrays.length; i++) { in concatByteArrays()
47 System.arraycopy(current, 0, result, pos, current.length); in concatByteArrays()
48 pos += current.length; in concatByteArrays()
57 return bytes == null || bytes.length == 0; in isEmpty()
66 int length = b.length; in append() local
67 byte[] result = new byte[length + 1]; in append()
[all …]
/packages/modules/Bluetooth/framework/tests/unit/src/android/bluetooth/
DBluetoothCodecConfigTest.java92 sCodecTypeArray.length
93 * sCodecPriorityArray.length
94 * sSampleRateArray.length
95 * sBitsPerSampleArray.length
96 * sChannelModeArray.length
97 * sCodecSpecific1Array.length
98 * sCodecSpecific2Array.length
99 * sCodecSpecific3Array.length
100 * sCodecSpecific4Array.length;
103 int left = sCodecTypeArray.length; in selectCodecType()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/aware/
DTlvBufferUtils.java111 mArrayLength = (array == null) ? 0 : array.length; in wrap()
144 size += field.length; in allocateAndPut()
198 int length) { in putByteArray() argument
199 checkLength(length); in putByteArray()
200 addHeader(type, length); in putByteArray()
201 if (length != 0) { in putByteArray()
202 System.arraycopy(array, offset, mArray, mPosition, length); in putByteArray()
204 mPosition += length; in putByteArray()
219 return putByteArray(type, array, 0, (array == null) ? 0 : array.length); in putByteArray()
232 checkRawLength(array.length); in putRawByteArray()
[all …]
/packages/modules/Bluetooth/framework/java/android/bluetooth/
DBluetoothUtils.java56 private static byte[] extractBytes(byte[] rawBytes, int start, int length) { in extractBytes() argument
57 int remainingLength = rawBytes.length - start; in extractBytes()
58 if (remainingLength < length) { in extractBytes()
64 + length in extractBytes()
66 + rawBytes.length in extractBytes()
71 byte[] bytes = new byte[length]; in extractBytes()
72 System.arraycopy(rawBytes, start, bytes, 0, length); in extractBytes()
89 if (rawBytes.length == 0) { in parseLengthTypeValueBytes()
95 while (currentPos < rawBytes.length) { in parseLengthTypeValueBytes()
97 int length = rawBytes[currentPos] & 0xFF; in parseLengthTypeValueBytes() local
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/gatt/
DAdvertiseHelper.java62 int nameLength = nameBytes.length; in advertiseDataToBytes()
86 int dataLen = 2 + (manufacturerData == null ? 0 : manufacturerData.length); in advertiseDataToBytes()
92 System.arraycopy(manufacturerData, 0, concated, 2, manufacturerData.length); in advertiseDataToBytes()
95 check_length(MANUFACTURER_SPECIFIC_DATA, concated.length + 1); in advertiseDataToBytes()
96 ret.write(concated.length + 1); in advertiseDataToBytes()
98 ret.write(concated, 0, concated.length); in advertiseDataToBytes()
115 if (uuid.length == BluetoothUuid.UUID_BYTES_16_BIT) { in advertiseDataToBytes()
116 serviceUuids16.write(uuid, 0, uuid.length); in advertiseDataToBytes()
117 } else if (uuid.length == BluetoothUuid.UUID_BYTES_32_BIT) { in advertiseDataToBytes()
118 serviceUuids32.write(uuid, 0, uuid.length); in advertiseDataToBytes()
[all …]
/packages/modules/Connectivity/thread/framework/java/android/net/thread/
DActiveOperationalDataset.java226 if (tlvs.length > LENGTH_MAX_DATASET_TLVS) { in fromThreadTlvs()
230 LENGTH_MAX_DATASET_TLVS, tlvs.length)); in fromThreadTlvs()
235 while (i < tlvs.length) { in fromThreadTlvs()
237 if (i >= tlvs.length) { in fromThreadTlvs()
241 type, tlvs.length)); in fromThreadTlvs()
244 int length = tlvs[i++] & 0xff; in fromThreadTlvs() local
245 if (i + length > tlvs.length) { in fromThreadTlvs()
250 type, length, tlvs.length)); in fromThreadTlvs()
253 initWithTlv(builder, type, Arrays.copyOfRange(tlvs, i, i + length)); in fromThreadTlvs()
254 i += length; in fromThreadTlvs()
[all …]
/packages/apps/LegacyCamera/src/com/android/camera/
DExif.java30 int length = 0; in getOrientation() local
33 while (offset + 3 < jpeg.length && (jpeg[offset++] & 0xFF) == 0xFF) { in getOrientation()
52 length = pack(jpeg, offset, 2, false); in getOrientation()
53 if (length < 2 || offset + length > jpeg.length) { in getOrientation()
59 if (marker == 0xE1 && length >= 8 && in getOrientation()
63 length -= 8; in getOrientation()
68 offset += length; in getOrientation()
69 length = 0; in getOrientation()
73 if (length > 8) { in getOrientation()
84 if (count < 10 || count > length) { in getOrientation()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/kanon/
DKeyAttestationCertificateChainRecordTest.java51 12 + FAKE_CERT_1.length + FAKE_CERT_2.length + FAKE_CERT_3.length, encoded.length); in test_serialize()
55 assertThat(ByteBuffer.wrap(length1).getInt()).isEqualTo(FAKE_CERT_1.length); in test_serialize()
56 byte[] cert1 = new byte[FAKE_CERT_1.length]; in test_serialize()
57 System.arraycopy(encoded, 4, cert1, 0, FAKE_CERT_1.length); in test_serialize()
62 encoded, 4 + FAKE_CERT_1.length, length2, 0, BYTES_TO_ENCODE_CERTIFICATE_LENGTH); in test_serialize()
63 assertThat(ByteBuffer.wrap(length2).getInt()).isEqualTo(FAKE_CERT_2.length); in test_serialize()
64 byte[] cert2 = new byte[FAKE_CERT_2.length]; in test_serialize()
65 System.arraycopy(encoded, 8 + FAKE_CERT_1.length, cert2, 0, FAKE_CERT_2.length); in test_serialize()
71 8 + FAKE_CERT_1.length + FAKE_CERT_2.length, in test_serialize()
75 assertThat(ByteBuffer.wrap(length3).getInt()).isEqualTo(FAKE_CERT_3.length); in test_serialize()
[all …]
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/
DGenericDocument.java284 GenericDocument[] documents = new GenericDocument[docParcels.length]; in getProperty()
285 for (int i = 0; i < docParcels.length; i++) { in getProperty()
342 if (stringValues != null && index < stringValues.length) { in getRawPropertyFromRawDocument()
347 if (longValues != null && index < longValues.length) { in getRawPropertyFromRawDocument()
352 if (doubleValues != null && index < doubleValues.length) { in getRawPropertyFromRawDocument()
357 if (booleanValues != null && index < booleanValues.length) { in getRawPropertyFromRawDocument()
362 if (bytesValues != null && index < bytesValues.length) { in getRawPropertyFromRawDocument()
369 if (docValues != null && index < docValues.length) { in getRawPropertyFromRawDocument()
374 if (embeddingValues != null && index < embeddingValues.length) { in getRawPropertyFromRawDocument()
403 if (docParcels != null && docParcels.length == 1) { in getRawPropertyFromRawDocument()
[all …]
/packages/modules/Uwb/service/java/com/android/server/uwb/params/
DTlvDecoderBuffer.java49 public final byte length; field in TlvDecoderBuffer.Tlv
57 return tagType == tlv.tagType && length == tlv.length && Arrays.equals(value, in equals()
63 int result = Objects.hash(tagType, length); in hashCode()
68 Tlv(byte tagType, byte length, byte[] value) { in Tlv() argument
70 this.length = length; in Tlv()
76 return "Tlv[tagType: " + tagType + ", length: " + length + ", value: " in toString()
106 byte length = mBuffer.get(); in parse()
107 byte[] value = new byte[length]; in parse()
109 Log.i(TAG, "Parsed TLV: " + new Tlv(tagType, length, value)); in parse()
110 mTlvs.put(tagType, new Tlv(tagType, length, value)); in parse()
[all …]
/packages/apps/Camera2/src/com/android/camera/exif/
DExifTag.java237 if (checkBadComponentCount(value.length)) { in setValue()
250 long[] data = new long[value.length]; in setValue()
251 for (int i = 0; i < value.length; i++) { in setValue()
255 mComponentCountActual = value.length; in setValue()
287 if (checkBadComponentCount(value.length) || mDataType != TYPE_UNSIGNED_LONG) { in setValue()
294 mComponentCountActual = value.length; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
340 int count = finalBuf.length; in setValue()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/exif/
DExifTag.java237 if (checkBadComponentCount(value.length)) { in setValue()
250 long[] data = new long[value.length]; in setValue()
251 for (int i = 0; i < value.length; i++) { in setValue()
255 mComponentCountActual = value.length; in setValue()
287 if (checkBadComponentCount(value.length) || mDataType != TYPE_UNSIGNED_LONG) { in setValue()
294 mComponentCountActual = value.length; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
340 int count = finalBuf.length; in setValue()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DExifTag.java237 if (checkBadComponentCount(value.length)) { in setValue()
250 long[] data = new long[value.length]; in setValue()
251 for (int i = 0; i < value.length; i++) { in setValue()
255 mComponentCountActual = value.length; in setValue()
287 if (checkBadComponentCount(value.length) || mDataType != TYPE_UNSIGNED_LONG) { in setValue()
294 mComponentCountActual = value.length; in setValue()
334 if (buf.length > 0) { in setValue()
335 finalBuf = (buf[buf.length - 1] == 0 || mDataType == TYPE_UNDEFINED) ? buf : Arrays in setValue()
336 .copyOf(buf, buf.length + 1); in setValue()
340 int count = finalBuf.length; in setValue()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
DSpannableStringUtilsTests.java63 final CharSequence b = s.subSequence(15, s.length()); in testConcatWithSuggestionSpansOnly()
67 Object[] spans = result.getSpans(0, result.length(), SuggestionSpan.class); in testConcatWithSuggestionSpansOnly()
68 for (int i = 0; i < spans.length; i++) { in testConcatWithSuggestionSpansOnly()
80 actualCount = spanned.getSpans(0, spanned.length(), Object.class).length; in assertSpanCount()
91 final Object[] actualSpans = spanned.getSpans(0, spanned.length(), Object.class); in assertSpan()
128 assertEquals(7, charSequencesFromString.length); in testSplitCharSequenceWithSpan()
129 assertEquals(7, charSequencesFromSpanned.length); in testSplitCharSequenceWithSpan()
205 false /* preserveTrailingEmptySegmengs */).length); in testSplitCharSequencePreserveTrailingEmptySegmengs()
207 false /* preserveTrailingEmptySegmengs */).length); in testSplitCharSequencePreserveTrailingEmptySegmengs()
210 true /* preserveTrailingEmptySegmengs */).length); in testSplitCharSequencePreserveTrailingEmptySegmengs()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/
DFixedLengthInputStream.java28 private final int length; field in FixedLengthInputStream
31 public FixedLengthInputStream(InputStream in, int length) { in FixedLengthInputStream() argument
33 this.length = length; in FixedLengthInputStream()
38 return length - count; in available()
43 if (count < length) { in read()
52 public int read(byte[] b, int offset, int length) throws IOException { in read() argument
53 if (count < this.length) { in read()
54 int d = in.read(b, offset, Math.min(this.length - count, length)); in read()
68 return read(b, 0, b.length); in read()
72 return length; in getLength()
[all …]
/packages/apps/SecureElement/src/com/android/se/
DCommandApduValidator.java54 if (apdu.length < CMD_APDU_LENGTH_CASE1) { in execute()
55 throw new IllegalArgumentException("Invalid length for command (" + apdu.length + ")."); in execute()
60 if (apdu.length == CMD_APDU_LENGTH_CASE1) { in execute()
64 if (apdu.length == CMD_APDU_LENGTH_CASE2) { in execute()
71 if (apdu.length == CMD_APDU_LENGTH_CASE3_WITHOUT_DATA + lc) { in execute()
74 if (apdu.length == CMD_APDU_LENGTH_CASE4_WITHOUT_DATA + lc) { in execute()
75 checkLe((int) 0x0FF & apdu[apdu.length - 1]); in execute()
81 if (apdu.length == CMD_APDU_LENGTH_CASE2_EXTENDED) { in execute()
87 if (apdu.length <= OFFSET_DATA_EXTENDED) { in execute()
88 throw new IllegalArgumentException("Unexpected value of Lc or Le" + apdu.length); in execute()
[all …]
/packages/apps/SecureElement/src/com/android/se/internal/
DUtil.java38 byte[] data = new byte[array1.length + array2.length]; in mergeBytes()
39 System.arraycopy(array1, 0, data, 0, array1.length); in mergeBytes()
40 System.arraycopy(array2, 0, data, array1.length, array2.length); in mergeBytes()
45 public static byte[] getMid(byte[] array, int start, int length) { in getMid() argument
46 byte[] data = new byte[length]; in getMid()
47 System.arraycopy(array, start, data, 0, length); in getMid()
59 public static byte[] appendResponse(byte[] r1, byte[] r2, int length) { in appendResponse() argument
60 byte[] rsp = new byte[r1.length + length]; in appendResponse()
61 System.arraycopy(r1, 0, rsp, 0, r1.length); in appendResponse()
62 System.arraycopy(r2, 0, rsp, r1.length, length); in appendResponse()
[all …]
/packages/apps/SecureElement/src/com/android/se/security/arf/PKCS15/
DEF.java81 if ((data == null) || (data.length < 15)) { in decodeSIMFileProps()
125 if ((buffer != null) && (buffer.length >= 2)) { in decodeUSIMFileProps()
131 if ((buffer != null) && (buffer.length >= 2)) { in decodeUSIMFileProps()
148 if (buffer.length == 5) { in decodeUSIMFileProps()
171 if ((path == null) || (path.length == 0) || ((path.length % 2) != 0)) { in selectFile()
174 int length = path.length; in selectFile() local
186 for (int index = 0; index < length; index += 2) { in selectFile()
194 int sw1 = data[data.length - 2] & 0xFF; in selectFile()
196 return (sw1 << 8) | (data[data.length - 1] & 0xFF); in selectFile()
222 int length, pos = 0; in readBinary() local
[all …]
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DDnsSdTxtRecord.java76 valLen = valBytes.length; in set()
89 for (int i = 0; i < keyBytes.length; i++) { in set()
95 if (keyBytes.length + valLen >= 255) { in set()
121 for (int i=0; avStart < mData.length; i++) { in remove()
123 if (key.length() <= avLen && in remove()
124 (key.length() == avLen || mData[avStart + key.length() + 1] == mSeparator)) { in remove()
125 String s = new String(mData, avStart + 1, key.length()); in remove()
128 mData = new byte[oldBytes.length - avLen - 1]; in remove()
131 oldBytes.length - avStart - avLen - 1); in remove()
143 for (nextKey = 0; nextKey < mData.length; count++) { in keyCount()
[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/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/async/
DBufferedFileTest.java112 final int totalLen = data1.length + data2.length; in enqueueOutboundData()
115 assertTrue(file.enqueueOutboundData(data1, 0, data1.length, null, 0, 0)); in enqueueOutboundData()
118 assertEquals(data1.length, file.getOutboundBufferSize()); in enqueueOutboundData()
128 assertTrue(file.enqueueOutboundData(data2, 0, data2.length, null, 0, 0)); in enqueueOutboundData()
136 assertEquals(data2[0], arrayCaptor.getValue()[data1.length]); in enqueueOutboundData()
153 final int totalLen = data1.length + data2.length; in enqueueOutboundData_combined()
161 assertTrue(file.enqueueOutboundData(data1, 0, data1.length, data2, 0, data2.length)); in enqueueOutboundData_combined()
169 assertEquals(data2[0], arrayCaptor.getValue()[data1.length]); in enqueueOutboundData_combined()
189 final int data1And2Len = data1.length + data2.length; in enableWriteEvents()
191 assertTrue(file.enqueueOutboundData(data1, 0, data1.length, data2, 0, data2.length)); in enableWriteEvents()
[all …]
/packages/apps/SecureElement/src/com/android/se/security/
DCommandApdu.java62 mLc = data.length; in CommandApdu()
71 mLc = data.length; in CommandApdu()
90 if (header1.length < 4 || header2.length < 4) { in compareHeaders()
134 mLc = data.length; in setData()
150 int length = 4; // CLA, INS, P1, P2 in toBytes() local
151 if (mData.length != 0) { in toBytes()
152 length += 1; // LC in toBytes()
153 length += mData.length; // DATA in toBytes()
156 length += 1; // LE in toBytes()
159 byte[] apdu = new byte[length]; in toBytes()
[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/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 …]

12345678910>>...153