Home
last modified time | relevance | path

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

1234567

/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
60 signatureSource = source, in Handle lambdas as default values()
62 api = source in Handle lambdas as default values()
68 val source = """ in Invoking function with multiple parameters as parameter default value() constant
80 signatureSource = source, in Invoking function with multiple parameters as parameter default value()
82 api = source in Invoking function with multiple parameters as parameter default value()
88 val source = """ in Handle enum constants as default values() constant
[all …]
DRewriteAnnotationsTest.kt35 val source = File("stub-annotations") in Test copying private annotations from one of the stubs() constant
36 assertTrue(source.path, source.isDirectory) in Test copying private annotations from one of the stubs()
43 source.path, in Test copying private annotations from one of the stubs()
100 val source = temporaryFolder.newFolder() in Test stub-annotations containing unknown annotation() constant
101 File("stub-annotations").copyRecursively(source) in Test stub-annotations containing unknown annotation()
102 assertTrue(source.path, source.isDirectory) in Test stub-annotations containing unknown annotation()
123 File(source, "src/main/java/android/annotation/Unknown.java").writeText(fooSource) in Test stub-annotations containing unknown annotation()
130 source.path, in Test stub-annotations containing unknown annotation()
DTestUtils.kt25 fun java(to: String, @Language("JAVA") source: String): TestFile { in java()
26 return TestFiles.java(to, source.trimIndent()) in java()
29 fun java(@Language("JAVA") source: String): TestFile { in java()
30 return TestFiles.java(source.trimIndent()) in java()
33 fun kotlin(@Language("kotlin") source: String): TestFile { in kotlin()
34 return TestFiles.kotlin(source.trimIndent()) in kotlin()
37 fun kotlin(to: String, @Language("kotlin") source: String): TestFile { in kotlin()
38 return TestFiles.kotlin(to, source.trimIndent()) in kotlin()
/tools/platform-compat/javatest/android/processor/compat/changeid/
DChangeIdProcessorTest.java109 JavaFileObject[] source = { in testCompatConfigXmlOutput() local
160 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput()
168 JavaFileObject[] source = { in testCompatConfigXmlOutput_multiplePackages() local
208 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_multiplePackages()
219 JavaFileObject[] source = { in testCompatConfigXmlOutput_innerClass() local
245 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_innerClass()
253 JavaFileObject[] source = { in testCompatConfigXmlOutput_interface() local
277 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_interface()
285 JavaFileObject[] source = { in testCompatConfigXmlOutput_enum() local
310 .compile(ObjectArrays.concat(mAnnotations, source, JavaFileObject.class)); in testCompatConfigXmlOutput_enum()
[all …]
/tools/metalava/src/test/java/com/android/tools/metalava/stub/
DStubsTest.kt21 import com.android.tools.lint.checks.infrastructure.LintDetectorTest.source in <lambda>()
61 @Language("JAVA") source: String, in <lambda>()
75 stubFiles = arrayOf(java(source)), in <lambda>()
123 source = """ in <lambda>()
238 source = """ in <lambda>()
264 source = """ in <lambda>()
289 source = """ in <lambda>()
315 source = """ in <lambda>()
347 source = """ in <lambda>()
383 source = in <lambda>()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtilsLite.java277 private static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) { in sliceFromTo() argument
284 int capacity = source.capacity(); in sliceFromTo()
285 if (end > source.capacity()) { in sliceFromTo()
288 int originalLimit = source.limit(); in sliceFromTo()
289 int originalPosition = source.position(); in sliceFromTo()
291 source.position(0); in sliceFromTo()
292 source.limit(end); in sliceFromTo()
293 source.position(start); in sliceFromTo()
294 ByteBuffer result = source.slice(); in sliceFromTo()
295 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/metalava/src/main/java/com/android/tools/metalava/model/
DAnnotationItem.kt521 fun shortenAnnotation(source: String): String { in shortenAnnotation()
523 source == "@java.lang.Deprecated" -> "@Deprecated" in shortenAnnotation()
524 source.startsWith("android.annotation.", 1) -> { in shortenAnnotation()
525 "@" + source.substring("@android.annotation.".length) in shortenAnnotation()
527 source.startsWith(ANDROIDX_ANNOTATION_PREFIX, 1) -> { in shortenAnnotation()
528 "@" + source.substring("@androidx.annotation.".length) in shortenAnnotation()
530 else -> source in shortenAnnotation()
538 fun unshortenAnnotation(source: String): String { in unshortenAnnotation()
540 source == "@Deprecated" -> "@java.lang.Deprecated" in unshortenAnnotation()
542 source.startsWith("@SystemService") || 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/metalava/src/test/java/com/android/tools/metalava/model/psi/
DJavadocTest.kt28 @Language("JAVA") source: String, in checkStubs()
41 stubFiles = arrayOf(java(source)), in checkStubs()
145 source = """ in Relative documentation links in stubs()
246 source = """ in Rewrite relative documentation links in doc-stubs()
339 source = """ in Rewrite relative documentation links in doc-stubs 2()
416 source = """ in Rewrite relative documentation links in doc-stubs 3()
487 source = """ in Rewrite relative documentation links in doc-stubs but preserve custom link text()
584 source = """ in Rewrite relative documentation links in doc-stubs 4()
658 source = """ in Rewrite relative documentation links in doc-stubs 5()
743 source = """ in Check references to inherited field constants()
[all …]
/tools/metalava/src/main/java/com/android/tools/lint/checks/infrastructure/
DClassName.kt32 class ClassName(source: String, extension: String = DOT_JAVA) {
37 val withoutComments = stripComments(source, extension)
50 fun stripComments(source: String, extension: String, stripLineComments: Boolean = true): String { in packageNameWithDefault()
51 val sb = StringBuilder(source.length) in packageNameWithDefault()
64 for (c in source) { in packageNameWithDefault()
161 fun getPackage(source: String): String? { in getPackage()
162 val matcher = PACKAGE_PATTERN.matcher(source) in getPackage()
170 fun getClassName(source: String): String? { in getClassName()
171 val matcher = CLASS_PATTERN.matcher(source.replace('\n', ' ')) in getClassName()
179 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/treble/hacksaw/bind/
Dlocal.go52 func (p localBinder) BindReadOnly(source string, destination string) error {
54 source, err := filepath.EvalSymlinks(source)
62 err = p.mounter.Mount(source, destination,
67 err = p.mounter.Mount(source, destination,
72 func (p localBinder) BindReadWrite(source string, destination string) error {
74 source, err := filepath.EvalSymlinks(source)
82 err = p.mounter.Mount(source, destination,
/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/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 …]
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()
/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/test/connectivity/acts_tests/acts_contrib/test_utils/power/
Dplot_utils.py62 source = ColumnDataSource(
78 dt = DataTable(source=s2,
94 plot.line('x', 'y', source=source, line_width=2)
95 plot.circle('x', 'y', source=source, size=0.5, fill_color='color')
107 source.selected.js_on_change(
109 CustomJS(args=dict(source=source, mytable=dt),
DPowerGnssBaseTest.py83 source = ColumnDataSource(
101 source=s2, columns=columns, width=1300, height=60, editable=True)
114 plot.line('x0', 'y0', source=source, line_width=2)
115 plot.circle('x0', 'y0', source=source, size=0.5, fill_color='color')
122 source.callback = CustomJS(
/tools/loganalysis/javatests/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/metalava/src/main/java/com/android/tools/metalava/model/text/
DTextBackedAnnotationItem.kt28 source: String,
37 val index = source.indexOf("(")
39 source.substring(1) // Strip @
40 else source.substring(1, index)
47 else -> "@" + qualifiedName + source.substring(index)
54 source.substring(index + 1, source.lastIndexOf(')'))
DTextModifiers.kt53 annotationSources.forEach { source -> in <lambda>() method
54 val index = source.indexOf('(') in <lambda>()
55 val originalName = if (index == -1) source.substring(1) else source.substring(1, index) in <lambda>()
67 … DefaultAnnotationAttribute.createList(source.substring(index + 1, source.lastIndexOf(')'))) in <lambda>()
74 … override fun toSource(target: AnnotationTarget, showDefaultAttrs: Boolean): String = source in <lambda>()
/tools/acloud/
Dsetup.py45 def GenerateProto(source): argument
56 output = source.replace(".proto", "_pb2.py")
59 os.path.exists(source) and
60 os.path.getmtime(source) > os.path.getmtime(output)):
63 if not os.path.exists(source):
64 sys.stderr.write("Can't find required file: %s\n" % source)
74 protoc_command = [PROTOC, "-I%s" % ACLOUD_DIR, "--python_out=.", source]
/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/apksig/src/main/java/com/android/apksig/
DApkVerifier.java1251 private void mergeFrom(V1SchemeVerifier.Result source) { in mergeFrom() argument
1252 mVerifiedUsingV1Scheme = source.verified; in mergeFrom()
1253 mErrors.addAll(source.getErrors()); in mergeFrom()
1254 mWarnings.addAll(source.getWarnings()); in mergeFrom()
1255 for (V1SchemeVerifier.Result.SignerInfo signer : source.signers) { in mergeFrom()
1258 for (V1SchemeVerifier.Result.SignerInfo signer : source.ignoredSigners) { in mergeFrom()
1263 private void mergeFrom(ApkSigResult source) { in mergeFrom() argument
1264 switch (source.signatureSchemeVersion) { in mergeFrom()
1266 mSourceStampVerified = source.verified; in mergeFrom()
1267 if (!source.mSigners.isEmpty()) { in mergeFrom()
[all …]

1234567