Home
last modified time | relevance | path

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

12345678910>>...58

/packages/apps/UnifiedEmail/tests/src/com/android/mail/compose/
DComposeActivityTest.java161 assertEquals(3, to.length); in testRecipientsRefReplyAllCustomFromReplyTo()
163 assertEquals(0, cc.length); in testRecipientsRefReplyAllCustomFromReplyTo()
164 assertEquals(0, bcc.length); in testRecipientsRefReplyAllCustomFromReplyTo()
198 assertEquals(1, to.length); in testRecipientsRefReplyAllOnlyAccount()
200 assertEquals(0, cc.length); in testRecipientsRefReplyAllOnlyAccount()
201 assertEquals(0, bcc.length); in testRecipientsRefReplyAllOnlyAccount()
239 assertEquals(1, to.length); in testRecipientsRefReplyAllOnlyCustomFrom()
241 assertEquals(0, cc.length); in testRecipientsRefReplyAllOnlyCustomFrom()
242 assertEquals(0, bcc.length); in testRecipientsRefReplyAllOnlyCustomFrom()
260 assertTrue(to.length == 1); in testReply()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DRichInputConnection.java123 final int actualLength = Math.min(beforeCursor.length(), internal.length()); in checkConsistencyForDebug()
124 if (internal.length() > actualLength) { in checkConsistencyForDebug()
125 internal.delete(0, internal.length() - actualLength); in checkConsistencyForDebug()
127 final String reference = (beforeCursor.length() <= actualLength) ? beforeCursor.toString() in checkConsistencyForDebug()
128 : beforeCursor.subSequence(beforeCursor.length() - actualLength, in checkConsistencyForDebug()
129 beforeCursor.length()).toString(); in checkConsistencyForDebug()
134 + "\nExpected text = " + internal.length() + " " + internal in checkConsistencyForDebug()
135 + "\nActual text = " + reference.length() + " " + reference; in checkConsistencyForDebug()
255 commitTextWithBackgroundColor(text, newCursorPosition, Color.TRANSPARENT, text.length()); in commitText()
279 mExpectedSelStart += text.length() - mComposingText.length(); in commitTextWithBackgroundColor()
[all …]
/packages/apps/UnifiedEmail/src/com/google/android/mail/common/base/
DStringUtil.java148 if (fromIndex >= string.length()) { in indexOfChars()
159 for (int i = 0; i < chars.length(); i++) { in indexOfChars()
172 for (int i = Math.max(fromIndex, 0); i < string.length(); i++) { in indexOfChars()
282 while (trimCount < s.length()) { in trimStart()
323 while (trimCount < s.length()) { in trimEnd()
324 char ch = s.charAt(s.length() - trimCount - 1); in trimEnd()
336 return s.substring(0, s.length() - trimCount); in trimEnd()
392 checkArgument(what.length() > 0); in replace()
457 if (line.length() <= width) { in formatLineToFixedWidth()
466 col = word.length(); in formatLineToFixedWidth()
[all …]
DCharMatcher.java248 return (sequence.length() == 0) ? -1 : 0;
251 int length = sequence.length();
252 Preconditions.checkPositionIndex(start, length);
253 return (start == length) ? -1 : start;
256 return sequence.length() - 1;
263 return sequence.length() == 0;
271 char[] array = new char[sequence.length()];
277 StringBuilder retval = new StringBuilder(sequence.length() * replacement.length());
278 for (int i = 0; i < sequence.length(); i++) {
284 return (sequence.length() == 0) ? "" : String.valueOf(replacement);
[all …]
/packages/apps/Music/src/com/android/music/
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 …]
/packages/apps/Launcher3/WallpaperPicker/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 …]
DExifOutputStream.java106 , int offset, int length) { in requestByteToBuffer() argument
108 int byteToRead = length > byteNeeded ? byteNeeded : length; in requestByteToBuffer()
118 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
120 && length > 0) { in write()
122 int byteToProcess = length > mByteToSkip ? mByteToSkip : length; in write()
123 length -= byteToProcess; in write()
128 int byteToProcess = length > mByteToCopy ? mByteToCopy : length; in write()
130 length -= byteToProcess; in write()
134 if (length == 0) { in write()
139 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
[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 …]
DExifOutputStream.java106 , int offset, int length) { in requestByteToBuffer() argument
108 int byteToRead = length > byteNeeded ? byteNeeded : length; in requestByteToBuffer()
118 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
120 && length > 0) { in write()
122 int byteToProcess = length > mByteToSkip ? mByteToSkip : length; in write()
123 length -= byteToProcess; in write()
128 int byteToProcess = length > mByteToCopy ? mByteToCopy : length; in write()
130 length -= byteToProcess; in write()
134 if (length == 0) { in write()
139 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
[all …]
/packages/apps/Mms/src/com/android/mms/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 …]
DExifOutputStream.java108 , int offset, int length) { in requestByteToBuffer() argument
110 int byteToRead = length > byteNeeded ? byteNeeded : length; in requestByteToBuffer()
120 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
122 && length > 0) { in write()
124 int byteToProcess = length > mByteToSkip ? mByteToSkip : length; in write()
125 length -= byteToProcess; in write()
130 int byteToProcess = length > mByteToCopy ? mByteToCopy : length; in write()
132 length -= byteToProcess; in write()
136 if (length == 0) { in write()
141 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
[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 …]
DExifOutputStream.java106 , int offset, int length) { in requestByteToBuffer() argument
108 int byteToRead = length > byteNeeded ? byteNeeded : length; in requestByteToBuffer()
118 public void write(byte[] buffer, int offset, int length) throws IOException { in write() argument
120 && length > 0) { in write()
122 int byteToProcess = length > mByteToSkip ? mByteToSkip : length; in write()
123 length -= byteToProcess; in write()
128 int byteToProcess = length > mByteToCopy ? mByteToCopy : length; in write()
130 length -= byteToProcess; in write()
134 if (length == 0) { in write()
139 int byteRead = requestByteToBuffer(2, buffer, offset, length); in write()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapbMessage.java139 if(numbers != null && numbers.length > 0) { in setPhoneNumbers()
140 mPhoneNumbers = new String[numbers.length]; in setPhoneNumbers()
141 for(int i = 0, n = numbers.length; i < n; i++){ in setPhoneNumbers()
148 if(networkNumber != null && networkNumber.length() > 1 && !alpha) { in setPhoneNumbers()
158 if(mPhoneNumbers.length > 0) { in getFirstPhoneNumber()
173 if(mEmailAddresses.length > 0) { in getFirstEmail()
218 if(parts.length == 2) { in parseVcard()
225 if(parts.length == 2) { in parseVcard()
232 if(parts.length == 2) { in parseVcard()
236 … phoneNumbers.add(subParts[subParts.length-1]); // only keep actual phone number in parseVcard()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DFusionDictionary.java176 assert(mChars.length > 0); in hasSeveralChars()
177 return 1 < mChars.length; in hasSeveralChars()
300 final int length = word.length(); in getCodePoints() local
301 if (length <= 0) return new int[] {}; in getCodePoints()
303 final int[] codePoints = new int[Character.codePointCount(characters, 0, length)]; in getCodePoints()
307 srci < length; srci += Character.charCount(codePoint), ++dsti) { in getCodePoints()
406 if (word.length >= Constants.DICTIONARY_MAX_WORD_LENGTH) { in add()
407 MakedictLog.w("Ignoring a word that is too long: word.length = " + word.length); in add()
421 && differentCharIndex < currentPtNode.mChars.length) break; in add()
423 charIndex += currentPtNode.mChars.length; in add()
[all …]
/packages/apps/Nfc/nci/src/com/android/nfc/dhimpl/
DNativeNfcTag.java155 for (int i = 0; i < mTechList.length; i++) { in connectWithStatus()
416 if (mTechHandles.length > 0) { in getHandle()
438 if (mConnectedTechIndex != -1 && mConnectedTechIndex < mTechLibNfcTypes.length) { in getConnectedLibNfcType()
447 if (mConnectedTechIndex != -1 && mConnectedTechIndex < mTechList.length) { in getConnectedTechnology()
459 int[] mNewTechList = new int[mTechList.length + 1]; in addTechnology()
460 System.arraycopy(mTechList, 0, mNewTechList, 0, mTechList.length); in addTechnology()
461 mNewTechList[mTechList.length] = tech; in addTechnology()
464 int[] mNewHandleList = new int[mTechHandles.length + 1]; in addTechnology()
465 System.arraycopy(mTechHandles, 0, mNewHandleList, 0, mTechHandles.length); in addTechnology()
466 mNewHandleList[mTechHandles.length] = handle; in addTechnology()
[all …]
/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/
DNativeNfcTag.java156 for (int i = 0; i < mTechList.length; i++) { in connectWithStatus()
222 if (mConnectedTechIndex == -1 && mTechList.length > 0) { in startPresenceChecking()
425 if (mTechHandles.length > 0) { in getHandle()
447 if (mConnectedTechIndex != -1 && mConnectedTechIndex < mTechLibNfcTypes.length) { in getConnectedLibNfcType()
456 if (mConnectedTechIndex != -1 && mConnectedTechIndex < mTechList.length) { in getConnectedTechnology()
468 int[] mNewTechList = new int[mTechList.length + 1]; in addTechnology()
469 System.arraycopy(mTechList, 0, mNewTechList, 0, mTechList.length); in addTechnology()
470 mNewTechList[mTechList.length] = tech; in addTechnology()
473 int[] mNewHandleList = new int[mTechHandles.length + 1]; in addTechnology()
474 System.arraycopy(mTechHandles, 0, mNewHandleList, 0, mTechHandles.length); in addTechnology()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DInputLogicTests.java39 mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); in testPickSuggestionThenBackspace()
52 mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); in testPickAutoCorrectionThenBackspace()
66 mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); in testPickTypedWordOverAutoCorrectionThenBackspace()
81 mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1); in testPickDifferentSuggestionThenBackspace()
91 final int typedLength = STRING_TO_TYPE.length(); in testDeleteSelection()
111 final int typedLength = STRING_TO_TYPE.length(); in testDeleteSelectionTwice()
155 mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1); in testAutoCorrectWithPeriodThenRevert()
165 mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1); in testAutoCorrectWithSpaceThenRevert()
175 mLatinIME.onUpdateSelection(0, 0, STRING_TO_TYPE.length(), STRING_TO_TYPE.length(), -1, -1); in testAutoCorrectToSelfDoesNotRevert()
189 for (int i = 0; i < STRINGS_TO_TYPE.length; ++i) { in testDoubleSpace()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
DStringAndJsonUtilsTests.java242 for (int i = 0; i < bytes.length; ++i) { in testHexStringUtils()
254 for (int i = 0; i < objs.length; ++i) { in testJsonUtils()
264 STR_WITH_SUPPLEMENTARY_CHAR.length()); in testToCodePointArray()
265 assertEquals("toCodePointArray, size matches", codePointArray.length, in testToCodePointArray()
266 EXPECTED_RESULT.length); in testToCodePointArray()
267 for (int i = 0; i < EXPECTED_RESULT.length; ++i) { in testToCodePointArray()
282 STR_WITH_SUPPLEMENTARY_CHAR.length(), false /* downCase */); in testCopyCodePointsAndReturnCodePointCount()
284 EXPECTED_RESULT.length); in testCopyCodePointsAndReturnCodePointCount()
292 STR_WITH_SUPPLEMENTARY_CHAR.length(), true /* downCase */); in testCopyCodePointsAndReturnCodePointCount()
294 EXPECTED_RESULT_DOWNCASE.length); in testCopyCodePointsAndReturnCodePointCount()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/codec/
DEncoderUtil.java224 for (int idx = 0; idx < text.length(); idx++) { in hasToBeEncoded()
362 final int end = bytes.length; in encodeB()
407 final int end = bytes.length; in encodeQ()
439 final int length = str.length(); in isToken() local
440 if (length == 0) in isToken()
443 for (int idx = 0; idx < length; idx++) { in isToken()
457 final int length = str.length(); in isAtomPhrase() local
458 for (int idx = 0; idx < length; idx++) { in isAtomPhrase()
478 final int length = str.length(); in isDotAtomText() local
479 if (length == 0) in isDotAtomText()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DStringUtils.java54 return text.codePointCount(0, text.length()); in codePointCount()
98 final ArrayList<String> result = new ArrayList<>(elements.length - 1); in removeFromCommaSplittableTextIfExists()
133 if (s.length() <= 1) { in capitalizeFirstCodePoint()
144 if (s.length() <= 1) { in capitalizeFirstAndDowncaseRest()
163 return toCodePointArray(charSequence, 0, charSequence.length()); in toCodePointArray()
175 final int length = charSequence.length(); in toCodePointArray() local
176 if (length <= 0) { in toCodePointArray()
233 int stringLength = codePoints.length; in getStringFromNullTerminatedCodePointArray()
234 for (int i = 0; i < codePoints.length; i++) { in getStringFromNullTerminatedCodePointArray()
247 final int len = text.length(); in getCapitalizationType()
[all …]
/packages/apps/UnifiedEmail/tests/src/com/android/emailcommon/mail/
DAddressUnitTests.java82 int len = testString.length(); in testBase64Decode()
103 DecoderUtil.decodeEncodedWord(body, 0, body.length()); in testEncodedWord()
106 DecoderUtil.decodeEncodedWord(body2, 0, body2.length()); in testEncodedWord()
193 assertTrue("parsing null address", result != null && result.length == 0); in testEmptyParse()
197 assertTrue("parsing zero-length", result != null && result.length == 0); in testEmptyParse()
201 assertTrue("parsing spaces", result != null && result.length == 0); in testEmptyParse()
205 assertTrue("parsing spaces with comma", result != null && result.length == 0); in testEmptyParse()
213 assertEquals("bare address count", 1, address1.length); in testSingleParse()
218 assertEquals("bracket address count", 1, address2.length); in testSingleParse()
223 assertEquals("address with name count", 1, address3.length); in testSingleParse()
[all …]
/packages/apps/UnifiedEmail/src/com/android/emailcommon/mail/
DAddress.java138 if (tokens.length > 0) { in getEmailAddress()
189 if (personal.length() == 0) { in decodeAddressPersonal()
204 if (addressList != null && addressList.length() > 0) { in isAllValid()
206 for (int i = 0, length = tokens.length; i < length; ++i) { in isAllValid()
225 if (addressList == null || addressList.length() == 0) { in parse()
230 for (int i = 0, length = tokens.length; i < length; ++i) { in parse()
339 if (addresses == null || addresses.length == 0) { in toString()
342 if (addresses.length == 1) { in toString()
346 for (int i = 1; i < addresses.length; i++) { in toString()
376 if (addresses == null || addresses.length == 0) { in toHeader()
[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/apps/Camera2/src/com/android/camera/util/
DXmpUtil.java65 public int length; field in XmpUtil.Section
116 section.data, XMP_HEADER_SIZE, buffer, 0, buffer.length); in extractXMPMeta()
223 if (section.length > 0) { in writeJpegFile()
225 int lh = section.length >> 8; in writeJpegFile()
226 int ll = section.length & 0xff; in writeJpegFile()
252 if (buffer.length > MAX_XMP_BUFFER_SIZE) { in insertXMPSection()
257 byte[] xmpdata = new byte[buffer.length + XMP_HEADER_SIZE]; in insertXMPSection()
259 System.arraycopy(buffer, 0, xmpdata, XMP_HEADER_SIZE, buffer.length); in insertXMPSection()
263 xmpSection.length = xmpdata.length + 2; in insertXMPSection()
292 if (data.length < XMP_HEADER_SIZE) { in hasXMPHeader()
[all …]

12345678910>>...58