Home
last modified time | relevance | path

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

12345678910>>...109

/aosp14/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DLimitedLengthInputStreamTest.java85 byte[] temp = new byte[TEST_STRING1.length]; in checkReadBytesWithOffsetAndLength_WithString1()
86 byte[] expected = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1()
87 byte[] actual = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1()
92 assertEquals(length, is.read(temp, 0, temp.length)); in checkReadBytesWithOffsetAndLength_WithString1()
94 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytesWithOffsetAndLength_WithString1()
127 assertEquals(TEST_STRING1.length, is.read(temp, 0, TEST_STRING1.length + 10)); in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success()
135 byte[] temp = new byte[TEST_STRING1.length]; in checkReadBytes_WithString1()
136 byte[] expected = new byte[length]; in checkReadBytes_WithString1()
137 byte[] actual = new byte[length]; in checkReadBytes_WithString1()
142 assertEquals(length, is.read(temp)); in checkReadBytes_WithString1()
[all …]
/aosp14/frameworks/base/core/java/android/hardware/camera2/params/
H A DReprocessFormatsMap.java77 int left = entry.length; in ReprocessFormatsMap()
98 if (length > 0) { in ReprocessFormatsMap()
106 i += length; in ReprocessFormatsMap()
107 left -= length; in ReprocessFormatsMap()
132 int left = mEntry.length; in getInputs()
148 if (length > 0) { in getInputs()
156 i += length; in getInputs()
157 left -= length; in getInputs()
196 if (length > 0) { in getOutputs()
216 i += length; in getOutputs()
[all …]
/aosp14/frameworks/base/keystore/java/android/security/keystore/
H A DArrayUtils.java51 arr2, 0, (arr2 != null) ? arr2.length : 0); in concat()
83 if (length > dst.length - dstOffset) { in copy()
84 length = dst.length - dstOffset; in copy()
86 if (length > src.length - srcOffset) { in copy()
87 length = src.length - srcOffset; in copy()
89 if (length <= 0) { in copy()
93 return length; in copy()
100 if ((offset == 0) && (len == arr.length)) { in subarray()
109 if ((arr1 == null) || (arr1.length == 0)) { in concat()
114 int[] result = new int[arr1.length + arr2.length]; in concat()
[all …]
/aosp14/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DLines2Activity.java90 canvas.drawLine(x, y, x, y + length, p); in drawVerticalLine()
94 canvas.drawLine(x, y, x + length, y + length, p); in drawDiagonalLine()
161 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
163 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw()
170 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
184 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
193 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
207 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
216 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
230 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
[all …]
/aosp14/frameworks/base/core/java/android/database/
H A DMergeCursor.java58 int length = mCursors.length; in getCount() local
59 for (int i = 0 ; i < length ; i++) { in getCount()
73 int length = mCursors.length; in onMove() local
74 for (int i = 0 ; i < length; i++) { in onMove()
161 int length = mCursors.length; in deactivate() local
172 int length = mCursors.length; in close() local
182 int length = mCursors.length; in registerContentObserver() local
191 int length = mCursors.length; in unregisterContentObserver() local
201 int length = mCursors.length; in registerDataSetObserver() local
211 int length = mCursors.length; in unregisterDataSetObserver() local
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/database/
H A DSortCursor.java63 int length = mCursors.length; in SortCursor() local
64 mSortColumns = new int[length]; in SortCursor()
78 for (int j = 0 ; j < length; j++) { in SortCursor()
98 int length = mCursors.length; in getCount() local
136 int length = mCursors.length; in onMove() local
249 int length = mCursors.length; in getColumnNames() local
262 int length = mCursors.length; in deactivate() local
271 int length = mCursors.length; in close() local
280 int length = mCursors.length; in registerDataSetObserver() local
290 int length = mCursors.length; in unregisterDataSetObserver() local
[all …]
/aosp14/frameworks/base/telephony/java/com/android/internal/telephony/uicc/
H A DIccUtils.java128 int size = Math.min((bytes.length - offset) * 2, bcd.length()); in bcdToBytes()
342 if (length == 0) { in adnStringFieldToString()
345 if (length >= 1) { in adnStringFieldToString()
375 if (len > length - 3) in adnStringFieldToString()
376 len = length - 3; in adnStringFieldToString()
383 if (len > length - 4) in adnStringFieldToString()
458 int sz = s.length(); in hexStringToBytes()
721 if (length > 4) { in bytesToInt()
725 if (offset < 0 || length < 0 || offset + length > src.length) { in bytesToInt()
758 if (length > 8) { in bytesToRawLong()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/os/
H A DMemoryFileTest.java35 for (int i = 0; i < length; i++) { in compareBuffers()
77 byte[] buffer = new byte[testString.length]; in testRun()
81 file.readBytes(buffer, 2000, 0, testString.length); in testRun()
82 compareBuffers(testString, buffer, testString.length); in testRun()
85 buffer = new byte[testString.length]; in testRun()
91 is.mark(testString.length); in testRun()
96 buffer = new byte[testString.length]; in testRun()
118 byte[] copy = new byte[file.length()]; in testOutputStreamAdvances()
119 file.readBytes(copy, 0, 0, file.length()); in testOutputStreamAdvances()
131 byte[] buffer = new byte[testString.length + 10]; in readIndexOutOfBoundsException()
[all …]
H A DAidlTest.java132 for (int i = 0; i < a0.length && i < a2.length; i++) { in booleanArray()
135 for (int i = 0; i < a0.length && i < a1.length; i++) { in booleanArray()
142 for (int i = 0; i < a0.length && i < a2.length; i++) { in charArray()
145 for (int i = 0; i < a0.length && i < a1.length; i++) { in charArray()
152 for (int i = 0; i < a0.length && i < a2.length; i++) { in intArray()
155 for (int i = 0; i < a0.length && i < a1.length; i++) { in intArray()
162 for (int i = 0; i < a0.length && i < a2.length; i++) { in longArray()
165 for (int i = 0; i < a0.length && i < a1.length; i++) { in longArray()
172 for (int i = 0; i < a0.length && i < a2.length; i++) { in floatArray()
175 for (int i = 0; i < a0.length && i < a1.length; i++) { in floatArray()
[all …]
/aosp14/frameworks/base/telephony/java/android/telephony/
H A DJapanesePhoneNumberFormatter.java164 int length = text.length(); in format() local
165 if (length > 3 in format()
168 } else if (length < 1 || text.charAt(0) != '0') { in format()
176 while (i < text.length()) { in format()
184 length = text.length(); in format()
189 while (i < length) { in format()
192 text.replace(0, length, saved); in format()
198 text.replace(0, length, saved); in format()
202 if (length > dashPos2) { in format()
206 if (length > dashPos1) { in format()
[all …]
/aosp14/frameworks/base/core/java/android/ddm/
H A DDdmHandleHello.java143 + vmIdent.length() * 2 in handleHELO()
144 + appName.length() * 2 in handleHELO()
146 + vmFlags.length() * 2 in handleHELO()
152 out.putInt(vmIdent.length()); in handleHELO()
153 out.putInt(appName.length()); in handleHELO()
159 out.putInt(vmFlags.length()); in handleHELO()
162 out.putInt(pkgName.length()); in handleHELO()
188 int size = 4 + 4 * (vmFeatures.length + FRAMEWORK_FEATURES.length); in handleFEAT()
190 size += vmFeatures[i].length() * 2; in handleFEAT()
196 out.putInt(vmFeatures.length + FRAMEWORK_FEATURES.length); in handleFEAT()
[all …]
/aosp14/frameworks/base/tools/powermodel/src/com/android/powermodel/component/
H A DCpuProfile.java67 mCoreCount = Arrays.copyOf(value, value.length); in setCoreCount()
77 if (power != null && value.length != power.length) { in setCoreSpeeds()
82 if (mCoreCount != null && cluster >= mCoreCount.length) { in setCoreSpeeds()
86 + mCoreCount.length + ")"); in setCoreSpeeds()
91 mCorePower.put(cluster, Arrays.copyOf(value, value.length)); in setCorePower()
93 if (speeds != null && value.length != speeds.length) { in setCorePower()
98 if (mCoreCount != null && cluster >= mCoreCount.length) { in setCorePower()
102 + mCoreCount.length + ")"); in setCorePower()
125 result.clusters = new Cluster[mCoreCount.length]; in build()
126 for (int i = 0; i < result.clusters.length; i++) { in build()
[all …]
/aosp14/frameworks/base/core/java/android/nfc/
H A DNdefRecord.java474 byte[] b = new byte[byteDomain.length + 1 + byteType.length]; in createExternal()
476 b[byteDomain.length] = ':'; in createExternal()
477 System.arraycopy(byteType, 0, b, byteDomain.length + 1, byteType.length); in createExternal()
511 ByteBuffer buffer = ByteBuffer.allocate(1 + languageCodeBytes.length + textBytes.length); in createTextRecord()
760 if (mPayload.length < 2) { in parseWktUri()
917 if (type.length != 0 || id.length != 0 || payload.length != 0) { in validateTnf()
971 int length = 3 + mType.length + mId.length + mPayload.length; in getByteLength() local
976 if (!sr) length += 3; in getByteLength()
977 if (il) length += 1; in getByteLength()
979 return length; in getByteLength()
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/util/
H A DCharSequences.java38 public int length() { in forAsciiBytes() method in CharSequences
39 return bytes.length; in forAsciiBytes()
65 validate(start, end, bytes.length);
71 public int length() {
78 validate(newStart, newEnd, length());
83 return new String(bytes, start, length());
88 static void validate(int start, int end, int length) {
100 if (a.length() != b.length()) {
104 int length = a.length();
105 for (int i = 0; i < length; i++) {
[all …]
H A DGrowingArrayUtils.java45 assert currentSize <= array.length; in append()
47 if (currentSize + 1 > array.length) { in append()
63 assert currentSize <= array.length; in append()
65 if (currentSize + 1 > array.length) { in append()
78 assert currentSize <= array.length; in append()
93 assert currentSize <= array.length; in append()
108 assert currentSize <= array.length; in append()
131 assert currentSize <= array.length; in insert()
152 assert currentSize <= array.length; in insert()
171 assert currentSize <= array.length; in insert()
[all …]
/aosp14/frameworks/base/services/usb/java/com/android/server/usb/descriptors/
H A DUsbACInterface.java84 public UsbACInterface(int length, byte type, byte subtype, int subclass) { in UsbACInterface() argument
85 super(length, type); in UsbACInterface()
154 return new UsbACSelectorUnit(length, type, subtype, subClass); in allocAudioControlDescriptor()
160 return new UsbACFeatureUnit(length, type, subtype, subClass); in allocAudioControlDescriptor()
196 return new Usb20ASGeneral(length, type, subtype, subClass); in allocAudioStreamingDescriptor()
198 return new Usb10ASGeneral(length, type, subtype, subClass); in allocAudioStreamingDescriptor()
218 return new UsbMSMidiHeader(length, type, subtype, subClass); in allocMidiStreamingDescriptor()
221 return new UsbMSMidiInputJack(length, type, subtype, subClass); in allocMidiStreamingDescriptor()
242 int length, byte type) { in allocDescriptor() argument
252 parser, stream, length, type, subtype, subClass); in allocDescriptor()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/
H A DBootReceiverFixFsckFsStatTest.java53 doTestFsckFsStat(logs, 0x405, 0x5, 0, logs.length); in testTreeOptimization()
55 final String[] doubleLogs = new String[logs.length * 2]; in testTreeOptimization()
56 System.arraycopy(logs, 0, doubleLogs, 0, logs.length); in testTreeOptimization()
57 System.arraycopy(logs, 0, doubleLogs, logs.length, logs.length); in testTreeOptimization()
59 doTestFsckFsStat(doubleLogs, 0x402, 0x2, logs.length, logs.length * 2); in testTreeOptimization()
81 doTestFsckFsStat(logs, 0x405, 0x405, 0, logs.length); in testQuotaOnly()
102 doTestFsckFsStat(logs, 0x405, 0x405, 0, logs.length); in testOrphaned()
121 doTestFsckFsStat(logs, 0x405, 0x5, 0, logs.length); in testTimestampAdjustment()
139 doTestFsckFsStat(logs, 0x405, 0x5, 0, logs.length); in testTimestampAdjustmentNoFixLine()
163 doTestFsckFsStat(logs, 0x405, 0x405, 0, logs.length); in testTimestampAdjustmentWithQuotaFix()
[all …]
/aosp14/frameworks/base/core/java/org/apache/http/conn/ssl/
H A DAndroidDistinguishedNameParser.java34 private final int length; field in AndroidDistinguishedNameParser
50 this.length = this.dn.length(); in AndroidDistinguishedNameParser()
59 if (pos == length) { in nextAT()
72 if (pos >= length) { in nextAT()
116 if (pos == length) { in quotedAV()
144 if (pos + 4 >= length) { in hexAV()
197 if (pos >= length) { in escapedAV()
240 if (pos == length) { in getEscaped()
370 if (pos == length) { in findMostSpecific()
397 if (pos >= length) { in findMostSpecific()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/graphics/
H A DPaintTest.java35 if (expected.length != actual.length) { in assertEquals()
169 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), false, true); in testGetTextRunAdvances()
170 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), false, false); in testGetTextRunAdvances()
179 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), true, true); in testGetTextRunAdvances()
180 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), true, false); in testGetTextRunAdvances()
232 p.getTextRunAdvances(text, 0, text.length, 0, text.length, false, in testGetTextRunAdvances_invalid()
239 p.getTextRunAdvances(text, 0, text.length, 0, text.length, false, in testGetTextRunAdvances_invalid()
247 p.getTextRunAdvances(text, 0, text.length, -1, text.length, false, null, 0); in testGetTextRunAdvances_invalid()
254 p.getTextRunAdvances(text, 0, text.length, 1, text.length, false, null, 0); in testGetTextRunAdvances_invalid()
261 p.getTextRunAdvances(text, 0, text.length, 0, text.length - 1, false, null, 0); in testGetTextRunAdvances_invalid()
[all …]
/aosp14/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/exif/
H A DExifTag.java334 if (buf.length > 0) { in setValue()
340 int count = finalBuf.length; in setValue()
418 mValue = new byte[length]; in setValue()
420 mComponentCountActual = length; in setValue()
592 if (b == null || b.length < 1) { in getValueAsByte()
623 if (r == null || r.length < 1) { in getValueAsRational()
676 if (i == null || i.length < 1) { in getValueAsInt()
707 if (l == null || l.length < 1) { in getValueAsLong()
730 if (l != null && l.length >= 1) { in forceGetValueAsLong()
837 getBytes(buf, 0, buf.length); in getBytes()
[all …]
/aosp14/frameworks/base/tests/UsbTests/src/com/android/server/usb/
H A DUsbMidiPacketConverterTest.java43 assertEquals(expectedArray.length, outputArray.length); in compareByteArrays()
44 for (int i = 0; i < outputArray.length; i++) { in compareByteArrays()
56 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderSinglePacket()
75 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderMultiplePackets()
97 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderSysExEndFirstByte()
114 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderSysExEndSecondByte()
129 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderSysExEndThirdByte()
142 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderSysExStartEnd()
155 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderSysExStartByteEnd()
167 usbMidiPacketConverter.decodeMidiPackets(input, input.length); in testDecoderDefaultToFirstCable()
[all …]
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/libcore/regression/
H A DCharsetPerfTest.java92 byte[] bytes = makeBytes(makeString(length)); in time_new_String_BString()
101 public void time_new_String_BII(int length, String name) throws Exception { in time_new_String_BII() argument
102 byte[] bytes = makeBytes(makeString(length)); in time_new_String_BII()
105 new String(bytes, 0, bytes.length); in time_new_String_BII()
112 byte[] bytes = makeBytes(makeString(length)); in time_new_String_BIIString()
115 new String(bytes, 0, bytes.length, name); in time_new_String_BIIString()
121 public void time_String_getBytes(int length, String name) throws Exception { in time_String_getBytes() argument
122 String string = makeString(length); in time_String_getBytes()
129 private static String makeString(int length) { in makeString() argument
130 StringBuilder result = new StringBuilder(length); in makeString()
[all …]
/aosp14/frameworks/base/core/java/android/hardware/usb/
H A DUsbDeviceConnection.java120 return request.queueIfConnectionOpen(buffer, length); in queueRequest()
267 checkBounds(buffer, offset, length); in controlTransfer()
269 buffer, offset, length, timeout); in controlTransfer()
293 byte[] buffer, int length, int timeout) { in bulkTransfer() argument
294 return bulkTransfer(endpoint, buffer, 0, length, timeout); in bulkTransfer()
313 byte[] buffer, int offset, int length, int timeout) { in bulkTransfer() argument
314 checkBounds(buffer, offset, length); in bulkTransfer()
316 && length > UsbRequest.MAX_USBFS_BUFFER_SIZE) { in bulkTransfer()
317 length = UsbRequest.MAX_USBFS_BUFFER_SIZE; in bulkTransfer()
415 if (length < 0 || start < 0 || start + length > bufferLength) { in checkBounds()
[all …]
/aosp14/frameworks/base/obex/javax/obex/
H A DObexPacket.java28 private ObexPacket(int headerId, int length) { in ObexPacket() argument
30 mLength = length; in ObexPacket()
53 int length = is.read(); in read() local
54 length = (length << 8) + is.read(); in read()
56 ObexPacket newPacket = new ObexPacket(headerId, length); in read()
60 if (length > 3) { in read()
62 temp = new byte[length - 3]; in read()
64 while (bytesReceived != temp.length) { in read()
65 bytesReceived += is.read(temp, bytesReceived, temp.length - bytesReceived); in read()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/
H A DRuleBinaryParserTest.java119 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryStream_validCompoundFormula_noIndexing()
158 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
203 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validCompoundFormula_andConnector_noIndexing()
251 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validCompoundFormula_orConnector_noIndexing()
290 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validAtomicFormula_stringValue_noIndexing()
322 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validAtomicFormula_hashedValue_noIndexing()
356 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validAtomicFormulaWithCertificateLineage()
388 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validAtomicFormula_integerValue_noIndexing()
416 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validAtomicFormula_booleanValue_noIndexing()
443 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_invalidAtomicFormula_noIndexing()
[all …]

12345678910>>...109