Home
last modified time | relevance | path

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

12345678910>>...92

/frameworks/opt/chips/tests/src/com/android/ex/chips/
DChipsTest.java112 public int length() { in length() method in ChipsTest.MockRecipientEditTextView
113 return mEditable != null ? mEditable.length() : 0; in length()
190 int firstEnd = firstStart + first.trim().length(); in testSanitizeBetween()
192 int secondEnd = secondStart + second.trim().length(); in testSanitizeBetween()
193 mEditable.setSpan(mMockRecips[mMockRecips.length - 2], firstStart, firstEnd, 0); in testSanitizeBetween()
194 mEditable.setSpan(mMockRecips[mMockRecips.length - 1], secondStart, secondEnd, 0); in testSanitizeBetween()
199 assertEquals(editableString.indexOf(second), secondStart - extra.length()); in testSanitizeBetween()
208 firstEnd = firstStart + first.length(); in testSanitizeBetween()
209 mEditable.setSpan(mMockRecips[mMockRecips.length - 1], firstStart, firstEnd, 0); in testSanitizeBetween()
212 assertEquals(mEditable.getSpanStart(mMockRecips[mMockRecips.length - 1]), firstStart in testSanitizeBetween()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DLimitedLengthInputStreamTest.java42 InputStream is = new LimitedLengthInputStream(mTestStream1, -1, TEST_STRING1.length); in testConstructor_NegativeOffset_Failure()
80 private void checkReadBytesWithOffsetAndLength_WithString1(int offset, int length) in checkReadBytesWithOffsetAndLength_WithString1() argument
82 byte[] temp = new byte[TEST_STRING1.length]; in checkReadBytesWithOffsetAndLength_WithString1()
83 byte[] expected = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1()
84 byte[] actual = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1()
86 System.arraycopy(TEST_STRING1, offset, expected, 0, length); in checkReadBytesWithOffsetAndLength_WithString1()
88 InputStream is = new LimitedLengthInputStream(mTestStream1, offset, length); in checkReadBytesWithOffsetAndLength_WithString1()
89 assertEquals(length, is.read(temp, 0, temp.length)); in checkReadBytesWithOffsetAndLength_WithString1()
91 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytesWithOffsetAndLength_WithString1()
94 assertEquals(-1, is.read(temp, 0, temp.length)); in checkReadBytesWithOffsetAndLength_WithString1()
[all …]
/frameworks/av/media/libstagefright/codecs/m4v_h263/enc/src/
Dvlc_encode.cpp184 Int length; in PutDCsize_lum() local
189 length = DCtab_lum[size].len; in PutDCsize_lum()
190 if (length) in PutDCsize_lum()
191 BitstreamPutBits(bitstream, length, DCtab_lum[size].code); in PutDCsize_lum()
193 return length; in PutDCsize_lum()
199 Int length; in PutDCsize_chrom() local
203 length = DCtab_chrom[size].len; in PutDCsize_chrom()
204 if (length) in PutDCsize_chrom()
205 BitstreamPutBits(bitstream, length, DCtab_chrom[size].code); in PutDCsize_chrom()
207 return length; in PutDCsize_chrom()
[all …]
/frameworks/base/obex/javax/obex/
DObexHelper.java185 int length = 0; in updateHeaderSet() local
191 while (index < headerArray.length) { in updateHeaderSet()
208 length = 0xFF & headerArray[index]; in updateHeaderSet()
209 length = length << 8; in updateHeaderSet()
211 length += 0xFF & headerArray[index]; in updateHeaderSet()
212 length -= 3; in updateHeaderSet()
214 value = new byte[length]; in updateHeaderSet()
215 System.arraycopy(headerArray, index, value, 0, length); in updateHeaderSet()
216 if (length == 0 || (length > 0 && (value[length - 1] != 0))) { in updateHeaderSet()
225 value.length, "ISO8859_1")); in updateHeaderSet()
[all …]
DPrivateInputStream.java76 return mData.length - mIndex; in available()
92 while (mData.length == mIndex) { in read()
102 return read(b, 0, b.length); in read()
106 public synchronized int read(byte[] b, int offset, int length) throws IOException { in read() argument
111 if ((offset | length) < 0 || length > b.length - offset) { in read()
116 int currentDataLength = mData.length - mIndex; in read()
117 int remainReadLength = length; in read()
131 currentDataLength = mData.length - mIndex; in read()
149 int length = (body.length - start) + (mData.length - mIndex); in writeBytes() local
150 byte[] temp = new byte[length]; in writeBytes()
[all …]
/frameworks/base/core/java/android/hardware/camera2/params/
DReprocessFormatsMap.java77 int left = entry.length; in ReprocessFormatsMap()
78 for (int i = 0; i < entry.length; ) { in ReprocessFormatsMap()
89 final int length = entry[i]; in ReprocessFormatsMap() local
93 for (int j = 0; j < length; ++j) { in ReprocessFormatsMap()
98 if (length > 0) { in ReprocessFormatsMap()
99 if (left < length) { in ReprocessFormatsMap()
103 "expected: %d)", inputFormat, left, length)); in ReprocessFormatsMap()
106 i += length; in ReprocessFormatsMap()
107 left -= length; in ReprocessFormatsMap()
132 int left = mEntry.length; in getInputs()
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DLines2Activity.java89 private void drawVerticalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawVerticalLine() argument
90 canvas.drawLine(x, y, x, y + length, p); in drawVerticalLine()
93 private void drawDiagonalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawDiagonalLine() argument
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()
166 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw()
170 for (float length = 1; length <= 10; length +=1 ) { in onDraw()
172 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw()
175 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw()
[all …]
/frameworks/base/core/java/android/database/
DMergeCursor.java47 for (int i = 0; i < mCursors.length; i++) { in MergeCursor()
58 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
162 for (int i = 0 ; i < length ; i++) { in deactivate()
172 int length = mCursors.length; in close() local
173 for (int i = 0 ; i < length ; i++) { in close()
182 int length = mCursors.length; in registerContentObserver() local
[all …]
/frameworks/base/libs/common_time/
Dcommon_time_server_packets.cpp42 if ((offset + sizeof(field_name)) > length) \
53 if ((offset + sizeof(field_name)) > length) \
79 uint32_t length) { in serializeHeader() argument
91 uint32_t length) { in deserializeHeader() argument
104 uint32_t length) { in serializePacket() argument
107 ret = serializeHeader(data, length); in serializePacket()
112 length -= ret; in serializePacket()
117 length); in serializePacket()
121 length); in serializePacket()
124 tmp =((SyncRequestPacket*)(this))->serializePacket(data, length); in serializePacket()
[all …]
/frameworks/base/core/java/com/android/internal/database/
DSortCursor.java59 int length = mCursors.length; in SortCursor() local
60 mSortColumns = new int[length]; in SortCursor()
61 for (int i = 0 ; i < length ; i++) { in SortCursor()
74 for (int j = 0 ; j < length; j++) { in SortCursor()
84 for (int i = mRowNumCache.length - 1; i >= 0; i--) { in SortCursor()
87 mCurRowNumCache = new int[ROWCACHESIZE][length]; in SortCursor()
94 int length = mCursors.length; in getCount() local
95 for (int i = 0 ; i < length ; i++) { in getCount()
132 int length = mCursors.length; in onMove() local
135 for (int i = 0; i < length; i++) { in onMove()
[all …]
/frameworks/opt/net/voip/src/jni/rtp/
DAmrCodec.cpp55 int decode(int16_t *samples, int count, void *payload, int length);
105 int length = AMREncode(mEncoder, mSidSync, (Mode)mMode, in encode() local
108 if (type != mMode || length != (8 + gFrameBits[mMode] + 7) >> 3) { in encode()
115 ++length; in encode()
122 bytes[length + 1] = 0; in encode()
123 for (int i = 0; i <= length; ++i) { in encode()
126 length = (10 + gFrameBits[mMode] + 7) >> 3; in encode()
128 return length; in encode()
131 int AmrCodec::decode(int16_t *samples, int count, void *payload, int length) in decode() argument
135 if (length < 2) { in decode()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DMemoryFileTest.java32 private void compareBuffers(byte[] buffer1, byte[] buffer2, int length) throws Exception { in compareBuffers() argument
33 for (int i = 0; i < length; i++) { in compareBuffers()
53 newFile.writeBytes(testString, 0, 0, testString.length); in testPurge()
57 file.readBytes(testString, 0, 0, testString.length); in testPurge()
75 byte[] buffer = new byte[testString.length]; in testRun()
78 file.writeBytes(testString, 0, 2000, testString.length); in testRun()
79 file.readBytes(buffer, 2000, 0, testString.length); in testRun()
80 compareBuffers(testString, buffer, testString.length); in testRun()
83 buffer = new byte[testString.length]; in testRun()
89 is.mark(testString.length); in testRun()
[all …]
/frameworks/base/telephony/java/android/telephony/
DJapanesePhoneNumberFormatter.java162 int length = text.length(); in format() local
163 if (length > 3 in format()
166 } else if (length < 1 || text.charAt(0) != '0') { in format()
170 CharSequence saved = text.subSequence(0, length); in format()
174 while (i < text.length()) { in format()
182 length = text.length(); in format()
187 while (i < length) { in format()
190 text.replace(0, length, saved); in format()
196 text.replace(0, length, saved); in format()
200 if (length > dashPos2) { in format()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
DIccUtils.java43 bcdToString(byte[] data, int offset, int length) { in bcdToString() argument
44 StringBuilder ret = new StringBuilder(length*2); in bcdToString()
46 for (int i = offset ; i < offset + length ; i++) { in bcdToString()
68 cdmaBcdToString(byte[] data, int offset, int length) { in cdmaBcdToString() argument
69 StringBuilder ret = new StringBuilder(length); in cdmaBcdToString()
72 for (int i = offset; count < length; i++) { in cdmaBcdToString()
78 if (++count == length) break; in cdmaBcdToString()
176 adnStringFieldToString(byte[] data, int offset, int length) { in adnStringFieldToString() argument
177 if (length == 0) { in adnStringFieldToString()
180 if (length >= 1) { in adnStringFieldToString()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DIccUtils.java43 bcdToString(byte[] data, int offset, int length) { in bcdToString() argument
44 StringBuilder ret = new StringBuilder(length*2); in bcdToString()
46 for (int i = offset ; i < offset + length ; i++) { in bcdToString()
68 cdmaBcdToString(byte[] data, int offset, int length) { in cdmaBcdToString() argument
69 StringBuilder ret = new StringBuilder(length); in cdmaBcdToString()
72 for (int i = offset; count < length; i++) { in cdmaBcdToString()
78 if (++count == length) break; in cdmaBcdToString()
176 adnStringFieldToString(byte[] data, int offset, int length) { in adnStringFieldToString() argument
177 if (length == 0) { in adnStringFieldToString()
180 if (length >= 1) { in adnStringFieldToString()
[all …]
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/java/
DCharsets.java52 public static byte[] toAsciiBytes(char[] chars, int offset, int length) { in toAsciiBytes() argument
53 CharBuffer cb = CharBuffer.allocate(length); in toAsciiBytes()
54 cb.put(chars, offset, length); in toAsciiBytes()
62 public static byte[] toIsoLatin1Bytes(char[] chars, int offset, int length) { in toIsoLatin1Bytes() argument
63 CharBuffer cb = CharBuffer.allocate(length); in toIsoLatin1Bytes()
64 cb.put(chars, offset, length); in toIsoLatin1Bytes()
72 public static byte[] toUtf8Bytes(char[] chars, int offset, int length) { in toUtf8Bytes() argument
73 CharBuffer cb = CharBuffer.allocate(length); in toUtf8Bytes()
74 cb.put(chars, offset, length); in toUtf8Bytes()
82 public static byte[] toBigEndianUtf16Bytes(char[] chars, int offset, int length) { in toBigEndianUtf16Bytes() argument
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneNumberWatcherTest.java32 textWatcher.beforeTextChanged(number, 0, 0, multiChars.length()); in testAppendChars()
34 Selection.setSelection(number, number.length()); in testAppendChars()
35 textWatcher.onTextChanged(number, 0, 0, number.length()); in testAppendChars()
38 assertEquals(formatted1.length(), Selection.getSelectionEnd(number)); in testAppendChars()
42 int len = number.length(); in testAppendChars()
43 textWatcher.beforeTextChanged(number, number.length(), 0, 1); in testAppendChars()
45 Selection.setSelection(number, number.length()); in testAppendChars()
49 assertEquals(formatted2.length(), Selection.getSelectionEnd(number)); in testAppendChars()
58 int len = number.length(); in testRemoveLastChars()
61 Selection.setSelection(number, number.length()); in testRemoveLastChars()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DCharSequences.java36 public int length() { in forAsciiBytes() method in CharSequences
37 return bytes.length; in forAsciiBytes()
63 validate(start, end, bytes.length);
69 public int length() {
76 validate(newStart, newEnd, length());
81 return new String(bytes, start, length());
86 static void validate(int start, int end, int length) {
89 if (end > length) throw new IndexOutOfBoundsException();
97 if (a.length() != b.length()) {
101 int length = a.length();
[all …]
DGrowingArrayUtils.java41 assert currentSize <= array.length; in append()
43 if (currentSize + 1 > array.length) { in append()
58 assert currentSize <= array.length; in append()
60 if (currentSize + 1 > array.length) { in append()
73 assert currentSize <= array.length; in append()
75 if (currentSize + 1 > array.length) { in append()
88 assert currentSize <= array.length; in append()
90 if (currentSize + 1 > array.length) { in append()
111 assert currentSize <= array.length; in insert()
113 if (currentSize + 1 <= array.length) { in insert()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/
DExif.java69 int length = 0; in getOrientation() local
102 length = pack(jpeg, offset, 2, false); in getOrientation()
103 if (length < 2 || !has(jpeg, byteSize, offset + length - 1)) { in getOrientation()
109 if (marker == 0xE1 && length >= 8 && in getOrientation()
113 length -= 8; in getOrientation()
120 offset += length; in getOrientation()
121 length = 0; in getOrientation()
128 if (length > 8) { in getOrientation()
139 if (count < 10 || count > length) { in getOrientation()
144 length -= count; in getOrientation()
[all …]
/frameworks/opt/bitmap/src/com/android/bitmap/util/
DExif.java74 int length = 0; in getOrientation() local
107 length = pack(jpeg, offset, 2, false); in getOrientation()
108 if (length < 2 || !has(jpeg, byteSize, offset + length - 1)) { in getOrientation()
114 if (marker == 0xE1 && length >= 8 && in getOrientation()
118 length -= 8; in getOrientation()
125 offset += length; in getOrientation()
126 length = 0; in getOrientation()
133 if (length > 8) { in getOrientation()
144 if (count < 10 || count > length) { in getOrientation()
149 length -= count; in getOrientation()
[all …]
/frameworks/base/core/java/android/ddm/
DDdmHandleHello.java68 new Chunk(ChunkHandler.type("TEST"), data, 1, data.length-2); in connected()
134 if (vmInstructionSet != null && vmInstructionSet.length() > 0) { in handleHELO()
141 + vmIdent.length() * 2 in handleHELO()
142 + appName.length() * 2 in handleHELO()
143 + instructionSetDescription.length() * 2 in handleHELO()
144 + vmFlags.length() * 2); in handleHELO()
148 out.putInt(vmIdent.length()); in handleHELO()
149 out.putInt(appName.length()); in handleHELO()
153 out.putInt(instructionSetDescription.length()); in handleHELO()
155 out.putInt(vmFlags.length()); in handleHELO()
[all …]
/frameworks/base/core/java/android/nfc/
DNdefRecord.java313 if (packageName.length() == 0) throw new IllegalArgumentException("packageName is empty"); in createApplicationRecord()
345 if (uriString.length() == 0) throw new IllegalArgumentException("uri is empty"); in createUri()
348 for (int i = 1; i < URI_PREFIX_MAP.length; i++) { in createUri()
351 uriString = uriString.substring(URI_PREFIX_MAP[i].length()); in createUri()
356 byte[] recordBytes = new byte[uriBytes.length + 1]; in createUri()
358 System.arraycopy(uriBytes, 0, recordBytes, 1, uriBytes.length); in createUri()
418 if (mimeType.length() == 0) throw new IllegalArgumentException("mimeType is empty"); in createMime()
421 if (slashIndex == mimeType.length() - 1) { in createMime()
464 if (domain.length() == 0) throw new IllegalArgumentException("domain is empty"); in createExternal()
465 if (type.length() == 0) throw new IllegalArgumentException("type is empty"); in createExternal()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DComprehensionTlv.java51 protected ComprehensionTlv(int tag, boolean cr, int length, byte[] data, in ComprehensionTlv() argument
55 mLength = length; in ComprehensionTlv()
91 int endIndex = data.length; in decodeMany()
117 int endIndex = data.length; in decode()
151 int length; in decode() local
154 length = temp; in decode()
156 length = data[curIndex++] & 0xff; in decode()
157 if (length < 0x80) { in decode()
160 "length < 0x80 length=" + Integer.toHexString(length) + in decode()
165 length = ((data[curIndex] & 0xff) << 8) in decode()
[all …]
/frameworks/base/core/java/android/hardware/usb/
DUsbDeviceConnection.java147 int index, byte[] buffer, int length, int timeout) { in controlTransfer() argument
148 return controlTransfer(requestType, request, value, index, buffer, 0, length, timeout); in controlTransfer()
172 byte[] buffer, int offset, int length, int timeout) { in controlTransfer() argument
173 checkBounds(buffer, offset, length); in controlTransfer()
175 buffer, offset, length, timeout); in controlTransfer()
195 byte[] buffer, int length, int timeout) { in bulkTransfer() argument
196 return bulkTransfer(endpoint, buffer, 0, length, timeout); in bulkTransfer()
212 byte[] buffer, int offset, int length, int timeout) { in bulkTransfer() argument
213 checkBounds(buffer, offset, length); in bulkTransfer()
214 return native_bulk_request(endpoint.getAddress(), buffer, offset, length, timeout); in bulkTransfer()
[all …]

12345678910>>...92