/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/ |
D | AlignmentTest.java | 62 byte found[] = readSegment(newZFile, 1024, testBytes.length); in addAlignedFile() 78 assertTrue(newZFile.length() < 1024); in addNonAlignedFile() 101 assertTrue(newZFile.length() < 1024); 120 assertArrayEquals(testBytes1, readSegment(newZFile, 1024, testBytes1.length)); 122 assertTrue(newZFile.length() > 1024); 138 assertTrue(newZFile.length() < 1024); 163 assertArrayEquals(testBytes0, readSegment(newZFile, off0, testBytes0.length)); 164 assertArrayEquals(testBytes1, readSegment(newZFile, off1, testBytes1.length)); 180 assertArrayEquals(testBytes, readSegment(newZFile, 1024, testBytes.length)); 182 int flen = (int) newZFile.length(); [all …]
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/util/ |
D | StringSearch.kt | 28 val skipLut = ByteArray(256) { lookFor.length.toByte() } in <lambda>() 29 val suffixSkip = ByteArray(lookFor.length) 33 return (0 until (str.length - pos)).none { str[it] != str[pos + it] } in isPrefix() 38 while (word[pos - i] == word[word.length - 1 - i] && i < pos) { in longestCommonSuffix() 46 val last = lookFor.length - 1 66 val length get() = lookFor.length constant in trebuchet.util.StringSearch 69 var index = startIndex + lookFor.length - 1 in find() 79 while (reader.windowFor(index) !== reader.windowFor(index - lookFor.length + 1)) { in find() 80 var lookForIndex = lookFor.length - 1 in find() 109 var index = reader.startIndex + lookFor.length - 1 in findInLoadedRegion() [all …]
|
/tools/apksig/src/main/java/com/android/apksig/internal/jar/ |
D | ManifestParser.java | 46 this(data, 0, data.length); in ManifestParser() 52 public ManifestParser(byte[] data, int offset, int length) { in ManifestParser() argument 55 mEndOffset = offset + length; in ManifestParser() 83 } while (attr.length() == 0); in readSection() 90 if ((attr == null) || (attr.length() == 0)) { in readSection() 114 attr.substring(delimiterIndex + ": ".length())); in parseAttr() 126 } else if (bytes.length == 0) { in readAttribute() 139 if ((mBufferedLine != null) && (mBufferedLine.length == 0)) { in readAttributeBytes() 157 if (line.length == 0) { in readAttributeBytes() 170 if ((line.length == 0) || (line[0] != ' ')) { in readAttributeBytes() [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/audio_analysis_lib/ |
D | audio_quality_measurement.py | 223 teager_value, length = 0, len(wave) 224 for i in range(1, length - 1): 228 teager_value = (float(teager_value) / length) / (amplitude**2) 312 length = len(signal) 314 for left_border in range(0, length, hilbert_block): 315 right_border = min(length, left_border + hilbert_block) 317 temp_right_border = min(length, right_border + half_hilbert_block) 352 length = len(arr) 356 left_average_array = numpy.zeros(length) 357 right_average_array = numpy.zeros(length) [all …]
|
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/ |
D | TextTypeItem.kt | 116 thisString.length == otherString.length + JAVA_LANG_PREFIX.length in qualifiedTypeName() 261 end = s.length in markRecent() 286 for (i in index..s.length) { in markRecent() 293 return if (i == s.length - 1) { in markRecent() 315 val length = type.length in markRecent() constant 317 length in markRecent() 333 length in markRecent() 346 val oldLength = s.length in markRecent() 348 val newLength = s.length in markRecent() 355 for (i in 0 until s.length) { in markRecent() [all …]
|
D | TextTypeParameterItem.kt | 72 val length = typeParameterString.length in create() constant 73 var nameEnd = length in create() 74 for (i in 0 until length) { in create() 108 var start = index + "extends ".length in bounds() 109 val length = s.length in bounds() constant 110 for (i in start until length) { in bounds() 127 if (start < length) { in bounds() 128 add(list, typeString, start, length) in bounds()
|
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/ |
D | ShortName.java | 53 if (nameExt.length() > 12) in ShortName() 81 System.arraycopy(nameArr, 0, result, 0, nameArr.length); in ShortName() 82 System.arraycopy(extArr, 0, result, 8, extArr.length); in ShortName() 92 System.arraycopy(name.toCharArray(), 0, result, 0, name.length()); in toCharArray() 93 System.arraycopy(ext.toCharArray(), 0, result, 8, ext.length()); in toCharArray() 155 for (int i = 0; i < nameArr.length; i++) { in parse() 160 for (int i = 0; i < extArr.length; i++) { in parse() 180 for (int i = 0; i < this.name.length; i++) { in toString() 204 if (str.length() < minLength) in checkString() 208 if (str.length() > maxLength) in checkString() [all …]
|
D | Dummy83BufferGenerator.java | 66 for (int src=0; src < dirty.length(); src++) { in tidyString() 81 for (int i=0; i < s.length(); i++) { in cleanString() 90 final StringBuilder sb = new StringBuilder(str.length()); in stripLeadingPeriods() 92 for (int i=0; i < str.length(); i++) { in stripLeadingPeriods() 158 invalidchar[randomNumber % invalidchar.length]; in generate83BufferNew() 159 randomNumber /= invalidchar.length; in generate83BufferNew() 160 if (randomNumber < invalidchar.length) in generate83BufferNew()
|
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/ |
D | Javadoc.kt | 144 doc.length - 2 in mergeDocumentation() 151 else returnTag.textRange.startOffset + returnTag.name.length + 1 in mergeDocumentation() 172 else -> doc.length - 2 // "*/ in mergeDocumentation() 180 else parameter.textRange.startOffset + parameter.name.length + 1 in mergeDocumentation() 189 } else firstTag?.textRange?.startOffset ?: doc.length - 2 in mergeDocumentation() 298 val length = html.length in getBodyContents() constant 320 loop@ while (offset < length) { in getBodyContents() 325 if (offset == length) { in getBodyContents() 350 offset = length in getBodyContents() 359 offset = length in getBodyContents() [all …]
|
D | CodePrinter.kt | 98 val initialLength = sb.length in appendSourceExpression() 100 val length = sb.length in appendSourceExpression() constant 110 sb.setLength(length) in appendSourceExpression() 111 if (length == initialLength) { in appendSourceExpression() 161 val initialLength = sb.length in appendExpression() 163 val length = sb.length in appendExpression() constant 173 sb.setLength(length) in appendExpression() 174 if (length == initialLength) { in appendExpression() 180 return sb.length != 2 in appendExpression() 308 if (sb.length > 2) { in appendExpression()
|
/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
D | RandomAccessFileDataSink.java | 66 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 72 if (offset > buf.length) { in consume() 76 "offset: " + offset + ", buf.length: " + buf.length); in consume() 78 if (length == 0) { in consume() 84 mFile.write(buf, offset, length); in consume() 85 mPosition += length; in consume() 91 int length = buf.remaining(); in consume() local 92 if (length == 0) { in consume() 101 mPosition += length; in consume()
|
D | ByteArrayDataSink.java | 49 public void consume(byte[] buf, int offset, int length) throws IOException { in consume() argument 55 if (offset > buf.length) { in consume() 59 "offset: " + offset + ", buf.length: " + buf.length); in consume() 61 if (length == 0) { in consume() 65 ensureAvailable(length); in consume() 66 System.arraycopy(buf, offset, mArray, mSize, length); in consume() 67 mSize += length; in consume() 85 int chunkSize = Math.min(buf.remaining(), tmp.length); in consume() 98 if (minCapacity <= mArray.length) { in ensureAvailable() 105 int doubleCurrentSize = (int) Math.min(mArray.length * 2L, Integer.MAX_VALUE); in ensureAvailable()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | FixedByteArrayOutputStream.java | 60 mBuffer.length - mWritePos); in getData() 72 if (mWritePos >= mBuffer.length) { in write() 83 if (len >= mBuffer.length) { in write() 85 System.arraycopy(b, off + len - mBuffer.length, mBuffer, 0, mBuffer.length); in write() 90 int freeSpace = mBuffer.length - mWritePos; in write() 102 if (mWritePos > mBuffer.length) { in write() 104 mWritePos = mWritePos % mBuffer.length; in write() 114 return mBuffer.length; in size()
|
D | ArrayUtil.java | 44 int length = 0; in buildArray() local 46 length += array.length; in buildArray() 48 String[] newArray = new String[length]; in buildArray() 51 System.arraycopy(array, 0, newArray, offset, array.length); in buildArray() 52 offset += array.length; in buildArray() 67 List<T> retList = new ArrayList<T>(inputAry.length); in list() 106 if ((pieces.length == 1) && (pieces[0] instanceof Collection)) { in join()
|
D | TableBuilder.java | 75 int blanks = mRowLength - mText.length() - 2; in build() 106 if (text.length() > width) { in build() 111 addPadding(width - text.length()); in build() 131 for (int i = 0; i < mColumns.length; i++) { in build() 134 addPadding(mColumnWidth[i] - mColumns[i].length() + mPadding); in build() 244 if (line.length != mColumns) { in addLine() 246 String.format("Expect %d columns, actual %d columns", mColumns, line.length)); in addLine() 250 if (line[i].length() > mColumnWidth[i]) { in addLine() 251 mColumnWidth[i] = line[i].length(); in addLine()
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/ |
D | DataSlice.kt | 40 inline val length: Int get() = endIndex - startIndex constant in trebuchet.io.DataSlice 52 if (length != other.length) return false in equals() 80 override fun toString() = String(buffer, startIndex, length) in toString() 83 if (length - buffer.size < 50) { in toString() 90 fun ByteArray.asSlice(length: Int = this.size) = DataSlice(this, 0, length) in ByteArray() 96 override val length: Int get() = data.length in ByteArray() constant
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | DeviceFileReporterTest.java | 59 public long length() { in length() method in DeviceFileReporterTest.FakeFile 90 .andReturn(new FakeFile(filename, tombstone.length())); in testSimple() 116 .andReturn(new FakeFile(filename, tombstone.length())); in testTrim() 142 .andReturn(new FakeFile(filename, tombstone.length())); in testLine_containingSpace() 144 .andReturn(new FakeFile(filename1, tombstone.length())); in testLine_containingSpace() 146 .andReturn(new FakeFile(filename2, tombstone.length())); in testLine_containingSpace() 181 new FakeFile(filename, tombstone.length())); in testLineEnding_LF() 209 new FakeFile(filename, tombstone.length())); in testLineEnding_CRLF() 259 .andReturn(new FakeFile(pngFilename, pngContents.length())); in testRepeat_skip() 266 .andReturn(new FakeFile(xmlFilename, xmlContents.length())); in testRepeat_skip() [all …]
|
/tools/apksig/src/apksigner/java/com/android/apksigner/ |
D | OptionsParser.java | 59 if (mIndex >= mParams.length) { in nextOption() 85 return param.substring("--".length(), valueDelimiterIndex); in nextOption() 87 return param.substring("--".length()); in nextOption() 91 return param.substring("-".length()); in nextOption() 121 if (mIndex >= mParams.length) { in getRequiredValue() 171 if (mIndex >= mParams.length) { in getOptionalBooleanValue() 192 if (mIndex >= mParams.length) { in getRemainingParams() 198 return Arrays.copyOfRange(mParams, mIndex + 1, mParams.length); in getRemainingParams() 200 return Arrays.copyOfRange(mParams, mIndex, mParams.length); in getRemainingParams()
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/ |
D | ZFile.java | 504 long rafSize = raf.length(); in ZFile() 716 if (lastToRead > raf.length()) { in readEocd() 717 lastToRead = Ints.checkedCast(raf.length()); in readEocd() 721 directFullyRead(raf.length() - lastToRead, last); in readEocd() 738 for (int endIdx = last.length - MIN_EOCD_SIZE; endIdx >= 0 && foundEocdSignature == -1; in readEocd() 754 ByteBuffer.wrap(last, foundEocdSignature, last.length - foundEocdSignature); in readEocd() 758 eocdStart = Ints.checkedCast(raf.length() - lastToRead + foundEocdSignature); in readEocd() 764 if (eocdStart + eocd.getEocdSize() != raf.length()) { in readEocd() 770 + raf.length() in readEocd() 888 Preconditions.checkArgument(end <= raf.length(), "end > raf.length()"); in directOpen() [all …]
|
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/compress/ |
D | MultiCompressorTest.java | 52 byte[] resultAll = new byte[data.length * 2]; in compress() 92 assertTrue(ci.getCompressedSize() < data.length); in sameCompressionResultButBetterThanStore() 99 int bestSize = compress(data, Deflater.BEST_COMPRESSION).length; 100 int defaultSize = compress(data, Deflater.DEFAULT_COMPRESSION).length; 120 long defaultFileSize = defaultFile.length(); 121 long resultFileSize = resultFile.length(); 129 int bestSize = compress(data, Deflater.BEST_COMPRESSION).length; 130 int defaultSize = compress(data, Deflater.DEFAULT_COMPRESSION).length; 150 long defaultFileSize = defaultFile.length(); 151 long resultFileSize = resultFile.length();
|
/tools/loganalysis/src/com/android/loganalysis/util/ |
D | ArrayUtil.java | 45 int length = 0; in buildArray() local 47 length += array.length; in buildArray() 49 String[] newArray = new String[length]; in buildArray() 52 System.arraycopy(array, 0, newArray, offset, array.length); in buildArray() 53 offset += array.length; in buildArray() 68 List<T> retList = new ArrayList<T>(inputAry.length); in list() 107 if ((pieces.length == 1) && (pieces[0] instanceof Collection)) { in join()
|
/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSinkTestBase.java | 58 sink.consume(input, input.length - 2, 0); in testConsumeFromArray() 59 sink.consume(input, input.length - 1, 0); in testConsumeFromArray() 60 sink.consume(input, input.length, 0); in testConsumeFromArray() 65 assertConsumeArrayThrowsIOOB(sink, input, 0, input.length + 1); in testConsumeFromArray() 66 assertConsumeArrayThrowsIOOB(sink, input, input.length - 2, 4); in testConsumeFromArray() 67 assertConsumeArrayThrowsIOOB(sink, input, input.length + 1, 0); in testConsumeFromArray() 68 assertConsumeArrayThrowsIOOB(sink, input, input.length + 1, 1); in testConsumeFromArray() 125 DataSink sink, byte[] arr, int offset, int length) throws IOException { in assertConsumeArrayThrowsIOOB() argument 127 sink.consume(arr, offset, length); in assertConsumeArrayThrowsIOOB()
|
/tools/test/connectivity/acts/tests/google/tel/live/msim/ |
D | TelLiveMSIMSmsTest.py | 51 for length in self.message_lengths: 52 message_array = [rand_ascii_str(length)] 54 length, slot, slot) 59 length, slot, slot) 62 length, slot, 1-slot) 67 length, slot, 1-slot) 70 ads[0].log.info("SMS of length %s test succeeded", length)
|
/tools/metalava/src/main/java/com/android/tools/metalava/model/ |
D | AnnotationItem.kt | 353 … ANDROIDX_ANNOTATION_PREFIX + qualifiedName.substring(ANDROID_SUPPORT_ANNOTATION_PREFIX.length), in mapName() 510 "@" + source.substring("@android.annotation.".length) in shortenAnnotation() 513 "@" + source.substring("@android.support.annotation.".length) in shortenAnnotation() 516 "@" + source.substring("@androidx.annotation.".length) in shortenAnnotation() 665 val length = source.length in createList() constant 666 while (index < length) { in createList() 669 index = findEnd(source, index + 1, length, '}') in createList() 671 index = findEnd(source, index + 1, length, '"') in createList() 684 if (begin < length) { in createList() 685 addAttribute(list, source, begin, length) in createList() [all …]
|
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/ |
D | Asn1DerEncoder.java | 144 contentLen += serializedField.length; in toSequence() 152 … System.arraycopy(serializedField, 0, unencodedResult, index, serializedField.length); in toSequence() 153 index += serializedField.length; in toSequence() 202 int commonLength = Math.min(arr1.length, arr2.length); in compare() 209 return arr1.length - arr2.length; in compare() 217 List<AnnotatedField> result = new ArrayList<>(declaredFields.length); in getAnnotatedFields() 272 if (nodes.length < 2) { in toOid() 302 for (int i = 2; i < nodes.length; i++) { in toOid() 449 contentsLength += c.length; in createTag() 493 System.arraycopy(c, 0, result, contentsPosInResult, c.length); in createTag() [all …]
|