/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 …]
|
D | ZFileTest.java | 191 assertTrue(ze.getCompressedSize() < wikiData.length); in compressedFilesReadableByJavaZip() 199 assertTrue(ze.getCompressedSize() < rfcData.length); in compressedFilesReadableByJavaZip() 207 assertTrue(ze.getCompressedSize() == lenaData.length); in compressedFilesReadableByJavaZip() 320 int totalSize = (int) zipFile.length(); 333 int newTotalSize = (int) zipFile.length(); 360 int totalSize = (int) zipFile.length(); 374 int newTotalSize = (int) zipFile.length(); 402 int totalSize = (int) zipFile.length(); 425 int newTotalSize = (int) zipFile.length(); 453 int totalSize = (int) zipFile.length(); [all …]
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/ |
D | ZFile.java | 505 long rafSize = raf.length(); in ZFile() 717 if (lastToRead > raf.length()) { in readEocd() 718 lastToRead = Ints.checkedCast(raf.length()); in readEocd() 722 directFullyRead(raf.length() - lastToRead, last); in readEocd() 739 for (int endIdx = last.length - MIN_EOCD_SIZE; endIdx >= 0 && foundEocdSignature == -1; in readEocd() 755 ByteBuffer.wrap(last, foundEocdSignature, last.length - foundEocdSignature); in readEocd() 759 eocdStart = Ints.checkedCast(raf.length() - lastToRead + foundEocdSignature); in readEocd() 765 if (eocdStart + eocd.getEocdSize() != raf.length()) { in readEocd() 771 + raf.length() in readEocd() 889 Preconditions.checkArgument(end <= raf.length(), "end > raf.length()"); in directOpen() [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/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/apksig/src/main/java/com/android/apksig/internal/apk/ |
D | ApkSigningBlockUtils.java | 404 StringBuilder sb = new StringBuilder(value.length * 2); in toHex() 405 int len = value.length; in toHex() 464 MessageDigest[] mds = new MessageDigest[digestAlgorithmsArray.length]; in computeOneMbChunkContentDigests() 465 byte[][] digestsOfChunks = new byte[digestAlgorithmsArray.length][]; in computeOneMbChunkContentDigests() 466 int[] digestOutputSizes = new int[digestAlgorithmsArray.length]; in computeOneMbChunkContentDigests() 467 for (int i = 0; i < digestAlgorithmsArray.length; i++) { in computeOneMbChunkContentDigests() 502 for (int i = 0; i < mds.length; i++) { in computeOneMbChunkContentDigests() 510 for (int i = 0; i < digestAlgorithmsArray.length; i++) { in computeOneMbChunkContentDigests() 531 for (int i = 0; i < digestAlgorithmsArray.length; i++) { in computeOneMbChunkContentDigests() 637 mdSink.consume(chunkContentPrefix, 0, chunkContentPrefix.length); in run() [all …]
|
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/ |
D | Javadoc.kt | 138 doc.length - 2 in mergeDocumentation() 145 else returnTag.textRange.startOffset + returnTag.name.length + 1 in mergeDocumentation() 166 else -> doc.length - 2 // "*/ in mergeDocumentation() 174 else parameter.textRange.startOffset + parameter.name.length + 1 in mergeDocumentation() 183 } else firstTag?.textRange?.startOffset ?: doc.length - 2 in mergeDocumentation() 292 val length = html.length in getBodyContents() constant 314 loop@ while (offset < length) { in getBodyContents() 319 if (offset == length) { in getBodyContents() 344 offset = length in getBodyContents() 353 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() 307 if (sb.length > 2) { in appendExpression()
|
/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/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() 327 val sb = StringBuilder(s.length) in markRecent() 349 val length = type.length in markRecent() constant 351 length in markRecent() 367 length in markRecent() 380 val oldLength = s.length in markRecent() 382 val newLength = s.length in markRecent() [all …]
|
D | ApiFile.java | 368 type = type.substring(0, type.length() - 3); in processKotlinTypeSuffix() 373 type = type.substring(0, type.length() - 1); in processKotlinTypeSuffix() 376 type = type.substring(0, type.length() - 1); in processKotlinTypeSuffix() 711 return Long.valueOf(val.substring(0, val.length() - 1)); in parseValue() 747 return javaUnescapeString(val.substring(1, val.length() - 1)); in parseValue() 892 if (token.length() > 1) { in parseParameterList() 893 sb.append(token, 0, token.length() - 1); in parseParameterList() 894 token = Character.toString(token.charAt(token.length() - 1)); in parseParameterList() 997 while (mPos < mBuf.length && isSpace(mBuf[mPos])) { in eatWhitespace() 1008 if (mPos + 1 < mBuf.length) { in eatComment() [all …]
|
D | TextTypeParameterItem.kt | 71 val length = typeParameterString.length in create() constant 72 var nameEnd = length in create() 73 for (i in 0 until length) { in create() 107 var start = index + "extends ".length in bounds() 108 val length = s.length in bounds() constant 109 for (i in start until length) { in bounds() 126 if (start < length) { in bounds() 127 add(list, typeString, start, length) in bounds()
|
/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/tradefederation/core/common_util/com/android/tradefed/util/ |
D | FileUtil.java | 363 int overflowLength = prefix.length() + 19 - FILESYSTEM_FILENAME_MAX_LENGTH; in internalCreateTempFile() 366 overflowLength += suffix.length(); in internalCreateTempFile() 373 if (suffix.length() >= overflowLength) { in internalCreateTempFile() 375 overflowLength -= suffix.length(); in internalCreateTempFile() 376 suffix = suffix.substring(temp, suffix.length()); in internalCreateTempFile() 378 overflowLength -= suffix.length(); in internalCreateTempFile() 384 prefix = prefix.substring(0, prefix.length() - overflowLength); in internalCreateTempFile() 580 public static String readStringFromFile(File sourceFile, long startOffset, long length) in readStringFromFile() argument 586 long fileLength = sourceFile.length(); in readStringFromFile() 588 if (length <= 0 || fileLength <= startOffset + length) { in readStringFromFile() [all …]
|
/tools/test/connectivity/acts_tests/tests/google/tel/live/ |
D | TelLiveSmsTest.py | 117 for length in self.message_lengths: 118 message_array = [rand_ascii_str(length)] 121 ads[0].log.warning("SMS of length %s test failed", length) 124 ads[0].log.info("SMS of length %s test succeeded", length) 142 for length in long_message_lengths: 143 message_array = [rand_ascii_str(length)] 146 ads[0].log.warning("SMS of length %s test failed", length) 149 ads[0].log.info("SMS of length %s test succeeded", length) 162 for length in self.message_lengths: 163 message_array = [("Test Message", rand_ascii_str(length), None)] [all …]
|
/tools/apkzlib/src/test/resources/testData/packaging/text-files/ |
D | rfc2460.txt | 98 more efficient forwarding, less stringent limits on the length 233 in the length count.) 459 number of type-length-value (TLV) encoded "options", of the following 471 Option Data Variable-length field. Option-Type-specific 542 of 8 octets in length. These padding options must be recognized by 552 not have length and value fields. 606 Options Variable-length field, of length such that the 659 type-specific data Variable-length field, of format determined by 660 the Routing Type, and of length such that the 1094 the length of this fragment packet only (excluding the length [all …]
|
/tools/apksig/src/apksigner/java/com/android/apksigner/ |
D | ApkSignerTool.java | 72 if ((params.length == 0) || ("--help".equals(params[0])) || ("-h".equals(params[0]))) { in main() 83 sign(Arrays.copyOfRange(params, 1, params.length)); in main() 86 verify(Arrays.copyOfRange(params, 1, params.length)); in main() 89 rotate(Arrays.copyOfRange(params, 1, params.length)); in main() 92 lineage(Arrays.copyOfRange(params, 1, params.length)); in main() 112 if (params.length == 0) { in sign() 244 if (params.length > 0) { in sign() 251 if (params.length < 1) { in sign() 253 } else if (params.length > 1) { in sign() 362 if (params.length == 0) { in verify() [all …]
|
/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 …]
|
/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 …]
|
/tools/tradefederation/core/src/com/android/tradefed/config/ |
D | ConfigurationFactory.java | 173 int pathStartIndex = getConfigPrefix().length(); in transform() 175 int pathEndIndex = pathName.length() - extension.length(); in transform() 520 if (arrayArgs.length == 0) { in createConfigurationFromArgs() 524 List<String> listArgs = new ArrayList<String>(arrayArgs.length); in createConfigurationFromArgs() 559 if (arrayArgs.length == 0) { in createPartialConfigurationFromArgs() 563 List<String> listArgs = new ArrayList<String>(arrayArgs.length); in createPartialConfigurationFromArgs() 662 List<String> listArgs = new ArrayList<String>(arrayArgs.length); in createGlobalConfigurationFromArgs() 683 if (arrayArgs.length == 0) { in internalCreateGlobalConfigurationFromArgs() 829 args, new ArrayList<String>(args.length), null, null); in printHelpForConfig() 976 String[] reorderedArgsArray = new String[args.length]; in reorderArgs() [all …]
|
/tools/metalava/src/main/java/com/android/tools/metalava/model/ |
D | AnnotationItem.kt | 365 … ANDROIDX_ANNOTATION_PREFIX + qualifiedName.substring(ANDROID_SUPPORT_ANNOTATION_PREFIX.length), in mapName() 548 "@" + source.substring("@android.annotation.".length) in shortenAnnotation() 551 "@" + source.substring("@android.support.annotation.".length) in shortenAnnotation() 554 "@" + source.substring("@androidx.annotation.".length) in shortenAnnotation() 747 val length = source.length in createList() constant 748 while (index < length) { in createList() 751 index = findEnd(source, index + 1, length, '}') in createList() 753 index = findEnd(source, index + 1, length, '"') in createList() 766 if (begin < length) { in createList() 767 addAttribute(list, source, begin, length) in createList() [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/apksig/src/main/java/com/android/apksig/internal/util/ |
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()
|
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()
|
/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()
|