Home
last modified time | relevance | path

Searched refs:source (Results 1 – 25 of 78) sorted by relevance

1234

/tools/metalava/src/test/java/com/android/tools/metalava/
DApiFromTextTest.kt26 val source = """ in Loading a signature file and writing the API back out() constant
40 signatureSource = source, in Loading a signature file and writing the API back out()
41 api = source in Loading a signature file and writing the API back out()
74 val source = """ in Loading a signature file with alternate modifier order() constant
85 signatureSource = source, in Loading a signature file with alternate modifier order()
100 val source = """ in Test generics, superclasses and interfaces() constant
138 signatureSource = source, in Test generics, superclasses and interfaces()
139 api = source in Test generics, superclasses and interfaces()
145 val source = """ in Test constants() constant
169 signatureSource = source, in Test constants()
[all …]
DExtractAnnotationsTest.kt26 fun `Check java typedef extraction and warning about non-source retention of typedefs`() { in Check java typedef extraction and warning about non-source retention of typedefs()
182 fun `Include merged annotations in exported source annotations`() { in Include merged annotations in exported source annotations()
/tools/tradefederation/core/tests/src/com/android/tradefed/config/
DOptionCopierTest.java136 OptionSource source = new OptionSource(); in testCopyOptions_string() local
138 OptionCopier.copyOptions(source, dest); in testCopyOptions_string()
139 assertEquals(source.mMyOption, dest.mDestOption); in testCopyOptions_string()
145 OptionSource source = new OptionSource(); in testCopyOptions_int() local
147 OptionCopier.copyOptions(source, dest); in testCopyOptions_int()
148 assertEquals(source.mMyIntOption, dest.mDestIntOption); in testCopyOptions_int()
154 OptionSource source = new OptionSource(); in testCopyOptions_collection() local
155 source.mStringCollection.add("foo"); in testCopyOptions_collection()
158 OptionCopier.copyOptions(source, dest); in testCopyOptions_collection()
167 OptionSource source = new OptionSource(); in testCopyOptions_enum() local
[all …]
/tools/metalava/src/main/java/com/android/tools/lint/checks/infrastructure/
DClassName.kt24 class ClassName(source: String) {
29 val withoutComments = stripComments(source)
41 fun stripComments(source: String, stripLineComments: Boolean = true): String { in packageNameWithDefault()
42 val sb = StringBuilder(source.length) in packageNameWithDefault()
53 for (i in 0 until source.length) { in packageNameWithDefault()
54 val c = source[i] in packageNameWithDefault()
134 fun getPackage(source: String): String? { in getPackage()
135 val matcher = PACKAGE_PATTERN.matcher(source) in getPackage()
143 fun getClassName(source: String): String? { in getClassName()
144 val matcher = CLASS_PATTERN.matcher(source.replace('\n', ' ')) in getClassName()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/
DTextBackedAnnotationItem.kt26 source: String,
34 val index = source.indexOf("(")
36 source.substring(1) // Strip @
37 else source.substring(1, index)
43 else -> "@" + qualifiedName + source.substring(index)
50 source.substring(index + 1, source.lastIndexOf(')'))
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DCompressionResult.java37 private final CloseableByteSource source; field in CompressionResult
51 public CompressionResult(@Nonnull CloseableByteSource source, @Nonnull CompressionMethod method, in CompressionResult() argument
54 this.source = source; in CompressionResult()
75 return source; in getSource()
DStoredEntry.java194 private ProcessedAndRawByteSources source; field in StoredEntry
215 @Nullable ProcessedAndRawByteSources source) in StoredEntry() argument
232 source == null, in StoredEntry()
240 this.source = createSourceFromZip(cdh.getOffset()); in StoredEntry()
248 source, in StoredEntry()
250 this.source = source; in StoredEntry()
261 this.source.getProcessedByteSource().isEmpty(), in StoredEntry()
334 return source.getProcessedByteSource().openStream(); in open()
402 source.close(); in delete()
625 ProcessedAndRawByteSources oldSource = source; in replaceSourceFromZip()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DStreamUtilTest.java43 try (final InputStreamSource source = new ByteArrayInputStreamSource(contentBytes)) { in testGetByteArrayListFromSource() argument
44 final InputStream stream = source.createInputStream(); in testGetByteArrayListFromSource()
76 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetStringFromSource() argument
77 final InputStream stream = source.createInputStream(); in testGetStringFromSource()
89 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetBufferedReaderFromInputStream() argument
90 output = StreamUtil.getBufferedReaderFromStreamSrc(source); in testGetBufferedReaderFromInputStream()
104 final InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes()); in testCountLinesFromSource() local
105 assertEquals(3, StreamUtil.countLinesFromSource(source)); in testCountLinesFromSource()
123 final String source = "testtesttesttesttest"; in testCalculateMd5() local
125 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateMd5()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/compress/
DDeflateExecutionCompressor.java65 protected CompressionResult immediateCompress(@Nonnull CloseableByteSource source) in immediateCompress() argument
71 dos.write(source.read()); in immediateCompress()
75 if (result.size() >= source.size()) { in immediateCompress()
76 return new CompressionResult(source, CompressionMethod.STORE, source.size()); in immediateCompress()
DExecutorCompressor.java50 @Nonnull final CloseableByteSource source) { in compress()
54 future.set(immediateCompress(source)); in compress()
70 protected abstract CompressionResult immediateCompress(@Nonnull CloseableByteSource source) in immediateCompress() argument
DBestAndDefaultDeflateExecutorCompressor.java77 protected CompressionResult immediateCompress(@Nonnull CloseableByteSource source) in immediateCompress() argument
79 CompressionResult defaultResult = defaultDeflater.immediateCompress(source); in immediateCompress()
80 CompressionResult bestResult = bestDeflater.immediateCompress(source); in immediateCompress()
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/
DAsn1DerEncoder.java456 public static byte[] toDer(Object source, Asn1Type targetType, Asn1Type targetElementType) in toDer() argument
458 Class<?> sourceType = source.getClass(); in toDer()
460 ByteBuffer buf = ((Asn1OpaqueObject) source).getEncoded(); in toDer()
467 return encode(source); in toDer()
473 if (source instanceof ByteBuffer) { in toDer()
474 ByteBuffer buf = (ByteBuffer) source; in toDer()
477 } else if (source instanceof byte[]) { in toDer()
478 value = (byte[]) source; in toDer()
489 if (source instanceof Integer) { in toDer()
490 return toInteger((Integer) source); in toDer()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
DIonHeapInfoMetricCollector.java49 try (InputStreamSource source = new FileInputStreamSource(outputFile, true)) { in collectIonAudio() argument
54 source); in collectIonAudio() local
67 try (InputStreamSource source = new FileInputStreamSource(outputFile, true)) { in collectIonSystem() argument
72 source); in collectIonSystem() local
DPagetypeInfoMetricCollector.java41 try (InputStreamSource source = new FileInputStreamSource(outputFile, true)) { in collect() argument
46 source); in collect() local
DMemInfoMetricCollector.java41 try (InputStreamSource source = new FileInputStreamSource(outputFile, true)) { in collect() argument
46 source); in collect() local
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java281 private static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) { in sliceFromTo() argument
288 int capacity = source.capacity(); in sliceFromTo()
289 if (end > source.capacity()) { in sliceFromTo()
292 int originalLimit = source.limit(); in sliceFromTo()
293 int originalPosition = source.position(); in sliceFromTo()
295 source.position(0); in sliceFromTo()
296 source.limit(end); in sliceFromTo()
297 source.position(start); in sliceFromTo()
298 ByteBuffer result = source.slice(); in sliceFromTo()
299 result.order(source.order()); in sliceFromTo()
[all …]
DAndroidBinXmlParser.java792 private static ByteBuffer sliceFromTo(ByteBuffer source, long start, long end) { in sliceFromTo() argument
799 int capacity = source.capacity(); in sliceFromTo()
800 if (end > source.capacity()) { in sliceFromTo()
803 return sliceFromTo(source, (int) start, (int) end); in sliceFromTo()
812 private static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) { in sliceFromTo() argument
819 int capacity = source.capacity(); in sliceFromTo()
820 if (end > source.capacity()) { in sliceFromTo()
823 int originalLimit = source.limit(); in sliceFromTo()
824 int originalPosition = source.position(); in sliceFromTo()
826 source.position(0); in sliceFromTo()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/util/config/
DArgsOptionParserTest.java268 NonGlobalOptionSource source = new NonGlobalOptionSource(); in testNonGlobalOptionSource_alias() local
269 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_alias()
271 assertNull(source.mOption); in testNonGlobalOptionSource_alias()
273 assertTrue(source.mOption); in testNonGlobalOptionSource_alias()
275 assertFalse(source.mOption); in testNonGlobalOptionSource_alias()
282 NonGlobalOptionSource source = new NonGlobalOptionSource(); in testNonGlobalOptionSource_className() local
283 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_className()
285 assertNull(source.mOption); in testNonGlobalOptionSource_className()
286 parser.parse(new String[] {String.format("--%s:option", source.getClass().getName())}); in testNonGlobalOptionSource_className()
287 assertTrue(source.mOption); in testNonGlobalOptionSource_className()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/
DFileMetadataCollector.java56 public void testLogSaved(String dataName, LogDataType dataType, InputStreamSource source, in testLogSaved() argument
73 InputStreamSource source = in invocationEnded() local
77 stream = source.createInputStream(); in invocationEnded()
83 StreamUtil.cancel(source); in invocationEnded()
/tools/tradefederation/core/src/com/android/tradefed/util/
DStreamUtil.java58 public static String getStringFromSource(InputStreamSource source) throws IOException { in getStringFromSource() argument
59 final InputStream stream = source.createInputStream(); in getStringFromSource()
75 public static int countLinesFromSource(InputStreamSource source) throws IOException { in countLinesFromSource() argument
78 new BufferedReader(new InputStreamReader(source.createInputStream()))) { in countLinesFromSource()
93 public static ByteArrayList getByteArrayListFromSource(InputStreamSource source) in getByteArrayListFromSource() argument
95 final InputStream stream = source.createInputStream(); in getByteArrayListFromSource()
/tools/test/connectivity/acts/framework/acts/controllers/relay_lib/
Dhelpers.py24 def validate_key(key, dictionary, expected_type, source): argument
39 raise RelayConfigError(MISSING_KEY_ERR_MSG % (key, source, dictionary))
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DSnapshotInputStreamSourceTest.java50 InputStreamSource source = in testCancel() local
59 source.close(); in testCancel()
/tools/test/connectivity/acts/framework/acts/controllers/
Dchameleon_controller.py177 def scp(self, source, destination): argument
184 cmd = "scp root@{}:/{} {}".format(self.ip, source, destination)
188 self.log.exception("File not found {}".format(source))
/tools/apksig/src/main/java/com/android/apksig/
DApkVerifier.java610 private void mergeFrom(V1SchemeVerifier.Result source) { in mergeFrom() argument
611 mVerifiedUsingV1Scheme = source.verified; in mergeFrom()
612 mErrors.addAll(source.getErrors()); in mergeFrom()
613 mWarnings.addAll(source.getWarnings()); in mergeFrom()
614 for (V1SchemeVerifier.Result.SignerInfo signer : source.signers) { in mergeFrom()
617 for (V1SchemeVerifier.Result.SignerInfo signer : source.ignoredSigners) { in mergeFrom()
622 private void mergeFrom(ApkSigningBlockUtils.Result source) { in mergeFrom() argument
623 switch (source.signatureSchemeVersion) { in mergeFrom()
625 mVerifiedUsingV2Scheme = source.verified; in mergeFrom()
626 for (ApkSigningBlockUtils.Result.SignerInfo signer : source.signers) { in mergeFrom()
[all …]
/tools/tradefederation/core/
DREADME.md11 * source build/envsetup.sh
16 https://source.android.com/devices/tech/test_infra/tradefed/

1234