Home
last modified time | relevance | path

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

123456789

/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()
47 val source = """ in Handle lambdas as default values() constant
61 signatureSource = source, in Handle lambdas as default values()
63 api = source in Handle lambdas as default values()
69 val source = """ in Invoking function with multiple parameters as parameter default value() constant
82 signatureSource = source, in Invoking function with multiple parameters as parameter default value()
84 api = source in Invoking function with multiple parameters as parameter default value()
90 val source = """ in Handle enum constants as default values() constant
[all …]
/tools/metalava/src/test/java/com/android/tools/metalava/stub/
DStubsTest.kt54 @Language("JAVA") source: String, in <lambda>()
69 stubs = arrayOf(source), in <lambda>()
118 source = """ in <lambda>()
227 source = """ in <lambda>()
253 source = """ in <lambda>()
278 source = """ in <lambda>()
304 source = """ in <lambda>()
336 source = """ in <lambda>()
371 source = in <lambda>()
417 source = """ in <lambda>()
[all …]
/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 …]
DArgsOptionParserTest.java286 NonGlobalOptionSource source = new NonGlobalOptionSource(); in testNonGlobalOptionSource_alias() local
287 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_alias()
289 assertNull(source.mOption); in testNonGlobalOptionSource_alias()
291 assertTrue(source.mOption); in testNonGlobalOptionSource_alias()
293 assertFalse(source.mOption); in testNonGlobalOptionSource_alias()
300 NonGlobalOptionSource source = new NonGlobalOptionSource(); in testNonGlobalOptionSource_className() local
301 ArgsOptionParser parser = new ArgsOptionParser(source); in testNonGlobalOptionSource_className()
303 assertNull(source.mOption); in testNonGlobalOptionSource_className()
304 parser.parse(new String[] {String.format("--%s:option", source.getClass().getName())}); in testNonGlobalOptionSource_className()
305 assertTrue(source.mOption); in testNonGlobalOptionSource_className()
[all …]
/tools/platform-compat/javatest/android/processor/compat/changeid/
DChangeIdProcessorTest.java88 JavaFileObject[] source = { in testCompatConfigXmlOutput() local
121 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput()
129 JavaFileObject[] source = { in testCompatConfigXmlOutput_multiplePackages() local
169 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_multiplePackages()
180 JavaFileObject[] source = { in testCompatConfigXmlOutput_innerClass() local
206 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_innerClass()
214 JavaFileObject[] source = { in testCompatConfigXmlOutput_interface() local
238 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_interface()
246 JavaFileObject[] source = { in testCompatConfigXmlOutput_enum() local
271 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_enum()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/
DAnnotationItem.kt544 fun shortenAnnotation(source: String): String { in shortenAnnotation()
546 source == "@java.lang.Deprecated" -> "@Deprecated" in shortenAnnotation()
547 source.startsWith("android.annotation.", 1) -> { in shortenAnnotation()
548 "@" + source.substring("@android.annotation.".length) in shortenAnnotation()
550 source.startsWith(ANDROID_SUPPORT_ANNOTATION_PREFIX, 1) -> { in shortenAnnotation()
551 "@" + source.substring("@android.support.annotation.".length) in shortenAnnotation()
553 source.startsWith(ANDROIDX_ANNOTATION_PREFIX, 1) -> { in shortenAnnotation()
554 "@" + source.substring("@androidx.annotation.".length) in shortenAnnotation()
556 else -> source in shortenAnnotation()
564 fun unshortenAnnotation(source: String): String { in unshortenAnnotation()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/
DAsn1DerEncoder.java502 public static byte[] toDer(Object source, Asn1Type targetType, Asn1Type targetElementType) in toDer() argument
504 Class<?> sourceType = source.getClass(); in toDer()
506 ByteBuffer buf = ((Asn1OpaqueObject) source).getEncoded(); in toDer()
513 return encode(source); in toDer()
520 if (source instanceof ByteBuffer) { in toDer()
521 ByteBuffer buf = (ByteBuffer) source; in toDer()
524 } else if (source instanceof byte[]) { in toDer()
525 value = (byte[]) source; in toDer()
536 if (source instanceof Integer) { in toDer()
537 return toInteger((Integer) source); in toDer()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java315 private static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) { in sliceFromTo() argument
322 int capacity = source.capacity(); in sliceFromTo()
323 if (end > source.capacity()) { in sliceFromTo()
326 int originalLimit = source.limit(); in sliceFromTo()
327 int originalPosition = source.position(); in sliceFromTo()
329 source.position(0); in sliceFromTo()
330 source.limit(end); in sliceFromTo()
331 source.position(start); in sliceFromTo()
332 ByteBuffer result = source.slice(); in sliceFromTo()
333 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/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()
78 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetStringFromSource() argument
79 final InputStream stream = source.createInputStream(); in testGetStringFromSource()
92 try (InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes())) { in testGetBufferedReaderFromInputStream() argument
93 output = StreamUtil.getBufferedReaderFromStreamSrc(source); in testGetBufferedReaderFromInputStream()
108 final InputStreamSource source = new ByteArrayInputStreamSource(contents.getBytes()); in testCountLinesFromSource() local
109 assertEquals(3, StreamUtil.countLinesFromSource(source)); in testCountLinesFromSource()
141 final String source = getLargeText(); in testCalculateCrc32() local
143 ByteArrayInputStream inputSource = new ByteArrayInputStream(source.getBytes()); in testCalculateCrc32()
[all …]
/tools/metalava/src/test/java/com/android/tools/metalava/model/psi/
DJavadocTest.kt27 @Language("JAVA") source: String, in checkStubs()
41 stubs = arrayOf(source), in checkStubs()
146 source = """ in Relative documentation links in stubs()
245 source = """ in Rewrite relative documentation links in doc-stubs()
336 source = """ in Rewrite relative documentation links in doc-stubs 2()
413 source = """ in Rewrite relative documentation links in doc-stubs 3()
510 source = """ in Rewrite relative documentation links in doc-stubs 4()
584 source = """ in Rewrite relative documentation links in doc-stubs 5()
670 source = """ in Check references to inherited field constants()
727 source = """ in Handle @attr references()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
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 …]
DZFile.java1341 ProcessedAndRawByteSources source = entry.getSource(); in writeEntry() local
1342 ByteSource rawContents = source.getRawByteSource(); in writeEntry()
1655 CloseableByteSource source = tracker.fromStream(stream); in makeStoredEntry() local
1656 long crc32 = source.hash(Hashing.crc32()).padToLong(); in makeStoredEntry()
1667 source.size(), in makeStoredEntry()
1683 createSources(mayCompress, source, compressInfo, newFileData)); in makeStoredEntry()
1700 @Nonnull CloseableByteSource source, in createSources() argument
1705 ListenableFuture<CompressionResult> result = compressor.compress(source); in createSources()
1730 return new ProcessedAndRawByteSources(source, compressedByteSource); in createSources()
1733 CompressionMethod.STORE, source.size())); in createSources()
[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/apksig/src/main/java/com/android/apksig/
DApkVerifier.java634 private void mergeFrom(V1SchemeVerifier.Result source) { in mergeFrom() argument
635 mVerifiedUsingV1Scheme = source.verified; in mergeFrom()
636 mErrors.addAll(source.getErrors()); in mergeFrom()
637 mWarnings.addAll(source.getWarnings()); in mergeFrom()
638 for (V1SchemeVerifier.Result.SignerInfo signer : source.signers) { in mergeFrom()
641 for (V1SchemeVerifier.Result.SignerInfo signer : source.ignoredSigners) { in mergeFrom()
646 private void mergeFrom(ApkSigningBlockUtils.Result source) { in mergeFrom() argument
647 switch (source.signatureSchemeVersion) { in mergeFrom()
649 mVerifiedUsingV2Scheme = source.verified; in mergeFrom()
650 for (ApkSigningBlockUtils.Result.SignerInfo signer : source.signers) { in mergeFrom()
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/sampling/engine/
Dassembly_line_test.py99 builder.source(first_source)
102 builder.source(second_source)
112 builder.source(dummy_source, input_stream=input_stream)
121 builder.source(dummy_source)
130 return_value = builder.source(mock.Mock())
149 builder.source(dummy_transformer).build()
161 builder.source(dummy_source)
173 builder.source(dummy_source)
183 builder.source(mock.Mock())
192 builder.source(mock.Mock()).build()
[all …]
/tools/metalava/src/main/java/com/android/tools/lint/checks/infrastructure/
DClassName.kt24 class ClassName(source: String) {
29 val withoutComments = stripComments(source)
42 fun stripComments(source: String, stripLineComments: Boolean = true): String { in packageNameWithDefault()
43 val sb = StringBuilder(source.length) in packageNameWithDefault()
54 for (c in source) { 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()
152 if (groupStart == 0 || source[groupStart - 1] != '.' && source[groupStart - 1] != ':') { in getClassName()
/tools/trebuchet/trebuchet/traceutils/src/
DTraceUtils.kt27 fun validateSrcDest(source: File, destDir: File) { in <lambda>()
28 if (!source.exists()) { in <lambda>()
29 throw IllegalArgumentException("No such file '$source'") in <lambda>()
73 var next = reader.source.next() in copy()
76 next = reader.source.next() in copy()
80 fun extract(source: File, destDir: File) { in extract()
81 validateSrcDest(source, destDir) in extract()
84 findTraces(InputStreamAdapter(source), onlyKnownFormats = false) { in extract()
101 val source = File(args[0]) in main() constant
103 extract(source, destDir) in main()
/tools/metalava/
DREADME.md7 Metalava is a metadata generator intended for the Android source tree, used for
16 * Extracting source level annotations into external annotations file (such as
43 metalava extracts metadata from source code to generate artifacts such as the
77 * Ability to read in an existing android.jar file instead of from source, which
146 not just nullness annotations found in the source code and annotations merged
153 of the source code). This means that the documentation tool itself does not
154 need to be able to figure out which parts of the source code is included in
166 but not versa). It also lets you diff directly on a source tree; it does not
186 Some of these take advantage of looking at the source code which wasn't
275 javadoc, which meant that most of the source tree was opaque. Therefore, as
[all …]
/tools/test/openhst/resources/
Ddevice_config.common.ascii_proto2 source: "LOGCAT"
13 source: "/dev/kmsg"
24 source: "/sdcard/captured_dsp_audio.wav"
29 source: "LOGCAT"
35 source: "LOGCAT"
41 source: "LOGCAT"
47 source: "LOGCAT"
54 source: "LOGCAT"
60 source: "LOGCAT"
66 source: "LOGCAT"
/tools/metalava/src/main/java/com/android/tools/metalava/
DRewriteAnnotations.kt51 fun modifyAnnotationSources(codebase: Codebase?, source: File, target: File, pkg: String = "") { in <lambda>()
52 val fileName = source.name in <lambda>()
65 source.readText(UTF_8).replace( in <lambda>()
70 } else if (source.isDirectory) { in <lambda>()
72 source.listFiles()?.forEach { in <lambda>()
79 fun copyAnnotations(codebase: Codebase, source: File, target: File, pkg: String = "") { in <lambda>()
80 val fileName = source.name in <lambda>()
92 source.copyTo(target) in <lambda>()
93 } else if (source.isDirectory) { in <lambda>()
95 source.listFiles()?.forEach { in <lambda>()
/tools/test/connectivity/acts/framework/acts/test_utils/power/
Dplot_utils.py78 source = ColumnDataSource(
94 dt = DataTable(source=s2,
111 plot.line('x', 'y', source=source, line_width=2)
112 plot.circle('x', 'y', source=source, size=0.5, fill_color='color')
118 source.selected.js_on_change(
120 CustomJS(args=dict(source=source, mytable=dt),
/tools/tradefederation/core/common_util/com/android/tradefed/config/
DOptionDef.java29 public final String source; field in OptionDef
32 public OptionDef(String optionName, String optionValue, String source) { in OptionDef() argument
33 this(optionName, null, optionValue, source, null); in OptionDef()
36 public OptionDef(String optionName, String optionKey, String optionValue, String source) { in OptionDef() argument
37 this(optionName, optionKey, optionValue, source, null); in OptionDef()
41 String optionName, String optionKey, String optionValue, String source, String type) { in OptionDef() argument
45 this.source = source; in OptionDef()
/tools/apkzlib/src/test/resources/testData/packaging/text-files/
Drfc2460.txt176 a source node and a destination node.
346 the source and destination nodes. The Hop-by-Hop Options header,
354 ICMP Parameter Problem message to the source of the packet, with an
625 The Routing header is used by an IPv6 source to list one or more
904 case of a source node S sending a packet to destination node D, using
961 The Fragment header is used by an IPv6 source to send a packet larger
963 IPv4, fragmentation in IPv6 is performed only by source nodes, not by
995 path to its destination, a source node may divide the packet into
999 For every packet that is to be fragmented, the source node generates
1016 including transit time from source to destination and time spent
[all …]
/tools/tradefederation/contrib/src/com/android/media/tests/
DCameraPerformanceTest.java201 String source; // "android.hardware.camera2.cts.PerformanceTest#testSingleCapture:327" field in CameraPerformanceTest.CtsMetric
218 String source, in CtsMetric() argument
224 this.source = source; in CtsMetric()
254 public String getTestMethodNameInSource(String source) { in getTestMethodNameInSource() argument
255 Matcher m = SOURCE_REGEX.matcher(source); in getTestMethodNameInSource()
257 return source; in getTestMethodNameInSource()
477 String source = parser.getAttributeValue(null, SOURCE_ATTR); in parseToCtsMetrics() local
489 return new CtsMetric(mTestMethod, source, message, type, unit, kpiValue); in parseToCtsMetrics()

123456789