• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package java
16
17import (
18	"fmt"
19	"path/filepath"
20	"sort"
21	"strconv"
22	"strings"
23
24	"android/soong/android"
25	"android/soong/java/config"
26
27	"github.com/google/blueprint/pathtools"
28)
29
30func init() {
31	android.RegisterPreSingletonType("sdk_versions", sdkPreSingletonFactory)
32	android.RegisterSingletonType("sdk", sdkSingletonFactory)
33	android.RegisterMakeVarsProvider(pctx, sdkMakeVars)
34}
35
36var sdkVersionsKey = android.NewOnceKey("sdkVersionsKey")
37var sdkFrameworkAidlPathKey = android.NewOnceKey("sdkFrameworkAidlPathKey")
38var nonUpdatableFrameworkAidlPathKey = android.NewOnceKey("nonUpdatableFrameworkAidlPathKey")
39var apiFingerprintPathKey = android.NewOnceKey("apiFingerprintPathKey")
40
41type sdkContext interface {
42	// sdkVersion returns sdkSpec that corresponds to the sdk_version property of the current module
43	sdkVersion() sdkSpec
44	// systemModules returns the system_modules property of the current module, or an empty string if it is not set.
45	systemModules() string
46	// minSdkVersion returns sdkSpec that corresponds to the min_sdk_version property of the current module,
47	// or from sdk_version if it is not set.
48	minSdkVersion() sdkSpec
49	// targetSdkVersion returns the sdkSpec that corresponds to the target_sdk_version property of the current module,
50	// or from sdk_version if it is not set.
51	targetSdkVersion() sdkSpec
52}
53
54func UseApiFingerprint(ctx android.BaseModuleContext) bool {
55	if ctx.Config().UnbundledBuild() &&
56		!ctx.Config().UnbundledBuildUsePrebuiltSdks() &&
57		ctx.Config().IsEnvTrue("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT") {
58		return true
59	}
60	return false
61}
62
63// sdkKind represents a particular category of an SDK spec like public, system, test, etc.
64type sdkKind int
65
66const (
67	sdkInvalid sdkKind = iota
68	sdkNone
69	sdkCore
70	sdkCorePlatform
71	sdkPublic
72	sdkSystem
73	sdkTest
74	sdkModule
75	sdkSystemServer
76	sdkPrivate
77)
78
79// String returns the string representation of this sdkKind
80func (k sdkKind) String() string {
81	switch k {
82	case sdkPrivate:
83		return "private"
84	case sdkNone:
85		return "none"
86	case sdkPublic:
87		return "public"
88	case sdkSystem:
89		return "system"
90	case sdkTest:
91		return "test"
92	case sdkCore:
93		return "core"
94	case sdkCorePlatform:
95		return "core_platform"
96	case sdkModule:
97		return "module"
98	case sdkSystemServer:
99		return "system_server"
100	default:
101		return "invalid"
102	}
103}
104
105// sdkVersion represents a specific version number of an SDK spec of a particular kind
106type sdkVersion int
107
108const (
109	// special version number for a not-yet-frozen SDK
110	sdkVersionCurrent sdkVersion = sdkVersion(android.FutureApiLevel)
111	// special version number to be used for SDK specs where version number doesn't
112	// make sense, e.g. "none", "", etc.
113	sdkVersionNone sdkVersion = sdkVersion(0)
114)
115
116// isCurrent checks if the sdkVersion refers to the not-yet-published version of an sdkKind
117func (v sdkVersion) isCurrent() bool {
118	return v == sdkVersionCurrent
119}
120
121// isNumbered checks if the sdkVersion refers to the published (a.k.a numbered) version of an sdkKind
122func (v sdkVersion) isNumbered() bool {
123	return !v.isCurrent() && v != sdkVersionNone
124}
125
126// String returns the string representation of this sdkVersion.
127func (v sdkVersion) String() string {
128	if v.isCurrent() {
129		return "current"
130	} else if v.isNumbered() {
131		return strconv.Itoa(int(v))
132	}
133	return "(no version)"
134}
135
136// asNumberString directly converts the numeric value of this sdk version as a string.
137// When isNumbered() is true, this method is the same as String(). However, for sdkVersionCurrent
138// and sdkVersionNone, this returns 10000 and 0 while String() returns "current" and "(no version"),
139// respectively.
140func (v sdkVersion) asNumberString() string {
141	return strconv.Itoa(int(v))
142}
143
144// sdkSpec represents the kind and the version of an SDK for a module to build against
145type sdkSpec struct {
146	kind    sdkKind
147	version sdkVersion
148	raw     string
149}
150
151func (s sdkSpec) String() string {
152	return fmt.Sprintf("%s_%s", s.kind, s.version)
153}
154
155// valid checks if this sdkSpec is well-formed. Note however that true doesn't mean that the
156// specified SDK actually exists.
157func (s sdkSpec) valid() bool {
158	return s.kind != sdkInvalid
159}
160
161// specified checks if this sdkSpec is well-formed and is not "".
162func (s sdkSpec) specified() bool {
163	return s.valid() && s.kind != sdkPrivate
164}
165
166// whether the API surface is managed and versioned, i.e. has .txt file that
167// get frozen on SDK freeze and changes get reviewed by API council.
168func (s sdkSpec) stable() bool {
169	if !s.specified() {
170		return false
171	}
172	switch s.kind {
173	case sdkNone:
174		// there is nothing to manage and version in this case; de facto stable API.
175		return true
176	case sdkCore, sdkPublic, sdkSystem, sdkModule, sdkSystemServer:
177		return true
178	case sdkCorePlatform, sdkTest, sdkPrivate:
179		return false
180	default:
181		panic(fmt.Errorf("unknown sdkKind=%v", s.kind))
182	}
183	return false
184}
185
186// prebuiltSdkAvailableForUnbundledBuilt tells whether this sdkSpec can have a prebuilt SDK
187// that can be used for unbundled builds.
188func (s sdkSpec) prebuiltSdkAvailableForUnbundledBuild() bool {
189	// "", "none", and "core_platform" are not available for unbundled build
190	// as we don't/can't have prebuilt stub for the versions
191	return s.kind != sdkPrivate && s.kind != sdkNone && s.kind != sdkCorePlatform
192}
193
194// forPdkBuild converts this sdkSpec into another sdkSpec that is for the PDK builds.
195func (s sdkSpec) forPdkBuild(ctx android.EarlyModuleContext) sdkSpec {
196	// For PDK builds, use the latest SDK version instead of "current" or ""
197	if s.kind == sdkPrivate || s.kind == sdkPublic {
198		kind := s.kind
199		if kind == sdkPrivate {
200			// We don't have prebuilt SDK for private APIs, so use the public SDK
201			// instead. This looks odd, but that's how it has been done.
202			// TODO(b/148271073): investigate the need for this.
203			kind = sdkPublic
204		}
205		version := sdkVersion(LatestSdkVersionInt(ctx))
206		return sdkSpec{kind, version, s.raw}
207	}
208	return s
209}
210
211// usePrebuilt determines whether prebuilt SDK should be used for this sdkSpec with the given context.
212func (s sdkSpec) usePrebuilt(ctx android.EarlyModuleContext) bool {
213	if s.version.isCurrent() {
214		// "current" can be built from source and be from prebuilt SDK
215		return ctx.Config().UnbundledBuildUsePrebuiltSdks()
216	} else if s.version.isNumbered() {
217		// sanity check
218		if s.kind != sdkPublic && s.kind != sdkSystem && s.kind != sdkTest {
219			panic(fmt.Errorf("prebuilt SDK is not not available for sdkKind=%q", s.kind))
220			return false
221		}
222		// numbered SDKs are always from prebuilt
223		return true
224	}
225	// "", "none", "core_platform" fall here
226	return false
227}
228
229// effectiveVersion converts an sdkSpec into the concrete sdkVersion that the module
230// should use. For modules targeting an unreleased SDK (meaning it does not yet have a number)
231// it returns android.FutureApiLevel(10000).
232func (s sdkSpec) effectiveVersion(ctx android.EarlyModuleContext) (sdkVersion, error) {
233	if !s.valid() {
234		return s.version, fmt.Errorf("invalid sdk version %q", s.raw)
235	}
236	if ctx.Config().IsPdkBuild() {
237		s = s.forPdkBuild(ctx)
238	}
239	if s.version.isNumbered() {
240		return s.version, nil
241	}
242	return sdkVersion(ctx.Config().DefaultAppTargetSdkInt()), nil
243}
244
245// effectiveVersionString converts an sdkSpec into the concrete version string that the module
246// should use. For modules targeting an unreleased SDK (meaning it does not yet have a number)
247// it returns the codename (P, Q, R, etc.)
248func (s sdkSpec) effectiveVersionString(ctx android.EarlyModuleContext) (string, error) {
249	ver, err := s.effectiveVersion(ctx)
250	if err == nil && int(ver) == ctx.Config().DefaultAppTargetSdkInt() {
251		return ctx.Config().DefaultAppTargetSdk(), nil
252	}
253	return ver.String(), err
254}
255
256func (s sdkSpec) defaultJavaLanguageVersion(ctx android.EarlyModuleContext) javaVersion {
257	sdk, err := s.effectiveVersion(ctx)
258	if err != nil {
259		ctx.PropertyErrorf("sdk_version", "%s", err)
260	}
261	if sdk <= 23 {
262		return JAVA_VERSION_7
263	} else if sdk <= 29 {
264		return JAVA_VERSION_8
265	} else {
266		return JAVA_VERSION_9
267	}
268}
269
270func sdkSpecFrom(str string) sdkSpec {
271	switch str {
272	// special cases first
273	case "":
274		return sdkSpec{sdkPrivate, sdkVersionNone, str}
275	case "none":
276		return sdkSpec{sdkNone, sdkVersionNone, str}
277	case "core_platform":
278		return sdkSpec{sdkCorePlatform, sdkVersionNone, str}
279	default:
280		// the syntax is [kind_]version
281		sep := strings.LastIndex(str, "_")
282
283		var kindString string
284		if sep == 0 {
285			return sdkSpec{sdkInvalid, sdkVersionNone, str}
286		} else if sep == -1 {
287			kindString = ""
288		} else {
289			kindString = str[0:sep]
290		}
291		versionString := str[sep+1 : len(str)]
292
293		var kind sdkKind
294		switch kindString {
295		case "":
296			kind = sdkPublic
297		case "core":
298			kind = sdkCore
299		case "system":
300			kind = sdkSystem
301		case "test":
302			kind = sdkTest
303		case "module":
304			kind = sdkModule
305		case "system_server":
306			kind = sdkSystemServer
307		default:
308			return sdkSpec{sdkInvalid, sdkVersionNone, str}
309		}
310
311		var version sdkVersion
312		if versionString == "current" {
313			version = sdkVersionCurrent
314		} else if i, err := strconv.Atoi(versionString); err == nil {
315			version = sdkVersion(i)
316		} else {
317			return sdkSpec{sdkInvalid, sdkVersionNone, str}
318		}
319
320		return sdkSpec{kind, version, str}
321	}
322}
323
324func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep {
325	sdkVersion := sdkContext.sdkVersion()
326	if !sdkVersion.valid() {
327		ctx.PropertyErrorf("sdk_version", "invalid version %q", sdkVersion.raw)
328		return sdkDep{}
329	}
330
331	if ctx.Config().IsPdkBuild() {
332		sdkVersion = sdkVersion.forPdkBuild(ctx)
333	}
334
335	if sdkVersion.usePrebuilt(ctx) {
336		dir := filepath.Join("prebuilts", "sdk", sdkVersion.version.String(), sdkVersion.kind.String())
337		jar := filepath.Join(dir, "android.jar")
338		// There's no aidl for other SDKs yet.
339		// TODO(77525052): Add aidl files for other SDKs too.
340		public_dir := filepath.Join("prebuilts", "sdk", sdkVersion.version.String(), "public")
341		aidl := filepath.Join(public_dir, "framework.aidl")
342		jarPath := android.ExistentPathForSource(ctx, jar)
343		aidlPath := android.ExistentPathForSource(ctx, aidl)
344		lambdaStubsPath := android.PathForSource(ctx, config.SdkLambdaStubsPath)
345
346		if (!jarPath.Valid() || !aidlPath.Valid()) && ctx.Config().AllowMissingDependencies() {
347			return sdkDep{
348				invalidVersion: true,
349				bootclasspath:  []string{fmt.Sprintf("sdk_%s_%s_android", sdkVersion.kind, sdkVersion.version.String())},
350			}
351		}
352
353		if !jarPath.Valid() {
354			ctx.PropertyErrorf("sdk_version", "invalid sdk version %q, %q does not exist", sdkVersion.raw, jar)
355			return sdkDep{}
356		}
357
358		if !aidlPath.Valid() {
359			ctx.PropertyErrorf("sdk_version", "invalid sdk version %q, %q does not exist", sdkVersion.raw, aidl)
360			return sdkDep{}
361		}
362
363		var systemModules string
364		if sdkVersion.defaultJavaLanguageVersion(ctx).usesJavaModules() {
365			systemModules = "sdk_public_" + sdkVersion.version.String() + "_system_modules"
366		}
367
368		return sdkDep{
369			useFiles:      true,
370			jars:          android.Paths{jarPath.Path(), lambdaStubsPath},
371			aidl:          android.OptionalPathForPath(aidlPath.Path()),
372			systemModules: systemModules,
373		}
374	}
375
376	toModule := func(modules []string, res string, aidl android.Path) sdkDep {
377		return sdkDep{
378			useModule:          true,
379			bootclasspath:      append(modules, config.DefaultLambdaStubsLibrary),
380			systemModules:      "core-current-stubs-system-modules",
381			java9Classpath:     modules,
382			frameworkResModule: res,
383			aidl:               android.OptionalPathForPath(aidl),
384		}
385	}
386
387	// Ensures that the specificed system SDK version is one of BOARD_SYSTEMSDK_VERSIONS (for vendor apks)
388	// or PRODUCT_SYSTEMSDK_VERSIONS (for other apks or when BOARD_SYSTEMSDK_VERSIONS is not set)
389	if sdkVersion.kind == sdkSystem && sdkVersion.version.isNumbered() {
390		allowed_versions := ctx.DeviceConfig().PlatformSystemSdkVersions()
391		if ctx.DeviceSpecific() || ctx.SocSpecific() {
392			if len(ctx.DeviceConfig().SystemSdkVersions()) > 0 {
393				allowed_versions = ctx.DeviceConfig().SystemSdkVersions()
394			}
395		}
396		if len(allowed_versions) > 0 && !android.InList(sdkVersion.version.String(), allowed_versions) {
397			ctx.PropertyErrorf("sdk_version", "incompatible sdk version %q. System SDK version should be one of %q",
398				sdkVersion.raw, allowed_versions)
399		}
400	}
401
402	switch sdkVersion.kind {
403	case sdkPrivate:
404		return sdkDep{
405			useDefaultLibs:     true,
406			frameworkResModule: "framework-res",
407		}
408	case sdkNone:
409		systemModules := sdkContext.systemModules()
410		if systemModules == "" {
411			ctx.PropertyErrorf("sdk_version",
412				`system_modules is required to be set to a non-empty value when sdk_version is "none", did you mean sdk_version: "core_platform"?`)
413		} else if systemModules == "none" {
414			return sdkDep{
415				noStandardLibs: true,
416			}
417		}
418
419		return sdkDep{
420			useModule:      true,
421			noStandardLibs: true,
422			systemModules:  systemModules,
423			bootclasspath:  []string{systemModules},
424		}
425	case sdkCorePlatform:
426		return sdkDep{
427			useDefaultLibs:     true,
428			frameworkResModule: "framework-res",
429			noFrameworksLibs:   true,
430		}
431	case sdkPublic:
432		return toModule([]string{"android_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx))
433	case sdkSystem:
434		return toModule([]string{"android_system_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx))
435	case sdkTest:
436		return toModule([]string{"android_test_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx))
437	case sdkCore:
438		return toModule([]string{"core.current.stubs"}, "", nil)
439	case sdkModule:
440		// TODO(146757305): provide .apk and .aidl that have more APIs for modules
441		return toModule([]string{"android_module_lib_stubs_current"}, "framework-res", nonUpdatableFrameworkAidlPath(ctx))
442	case sdkSystemServer:
443		// TODO(146757305): provide .apk and .aidl that have more APIs for modules
444		return toModule([]string{"android_system_server_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx))
445	default:
446		panic(fmt.Errorf("invalid sdk %q", sdkVersion.raw))
447	}
448}
449
450func sdkPreSingletonFactory() android.Singleton {
451	return sdkPreSingleton{}
452}
453
454type sdkPreSingleton struct{}
455
456func (sdkPreSingleton) GenerateBuildActions(ctx android.SingletonContext) {
457	sdkJars, err := ctx.GlobWithDeps("prebuilts/sdk/*/public/android.jar", nil)
458	if err != nil {
459		ctx.Errorf("failed to glob prebuilts/sdk/*/public/android.jar: %s", err.Error())
460	}
461
462	var sdkVersions []int
463	for _, sdkJar := range sdkJars {
464		dir := filepath.Base(filepath.Dir(filepath.Dir(sdkJar)))
465		v, err := strconv.Atoi(dir)
466		if scerr, ok := err.(*strconv.NumError); ok && scerr.Err == strconv.ErrSyntax {
467			continue
468		} else if err != nil {
469			ctx.Errorf("invalid sdk jar %q, %s, %v", sdkJar, err.Error())
470		}
471		sdkVersions = append(sdkVersions, v)
472	}
473
474	sort.Ints(sdkVersions)
475
476	ctx.Config().Once(sdkVersionsKey, func() interface{} { return sdkVersions })
477}
478
479func LatestSdkVersionInt(ctx android.EarlyModuleContext) int {
480	sdkVersions := ctx.Config().Get(sdkVersionsKey).([]int)
481	latestSdkVersion := 0
482	if len(sdkVersions) > 0 {
483		latestSdkVersion = sdkVersions[len(sdkVersions)-1]
484	}
485	return latestSdkVersion
486}
487
488func sdkSingletonFactory() android.Singleton {
489	return sdkSingleton{}
490}
491
492type sdkSingleton struct{}
493
494func (sdkSingleton) GenerateBuildActions(ctx android.SingletonContext) {
495	if ctx.Config().UnbundledBuildUsePrebuiltSdks() || ctx.Config().IsPdkBuild() {
496		return
497	}
498
499	createSdkFrameworkAidl(ctx)
500	createNonUpdatableFrameworkAidl(ctx)
501	createAPIFingerprint(ctx)
502}
503
504// Create framework.aidl by extracting anything that implements android.os.Parcelable from the SDK stubs modules.
505func createSdkFrameworkAidl(ctx android.SingletonContext) {
506	stubsModules := []string{
507		"android_stubs_current",
508		"android_test_stubs_current",
509		"android_system_stubs_current",
510	}
511
512	combinedAidl := sdkFrameworkAidlPath(ctx)
513	tempPath := combinedAidl.ReplaceExtension(ctx, "aidl.tmp")
514
515	rule := createFrameworkAidl(stubsModules, tempPath, ctx)
516
517	commitChangeForRestat(rule, tempPath, combinedAidl)
518
519	rule.Build(pctx, ctx, "framework_aidl", "generate framework.aidl")
520}
521
522// Creates a version of framework.aidl for the non-updatable part of the platform.
523func createNonUpdatableFrameworkAidl(ctx android.SingletonContext) {
524	stubsModules := []string{"android_module_lib_stubs_current"}
525
526	combinedAidl := nonUpdatableFrameworkAidlPath(ctx)
527	tempPath := combinedAidl.ReplaceExtension(ctx, "aidl.tmp")
528
529	rule := createFrameworkAidl(stubsModules, tempPath, ctx)
530
531	commitChangeForRestat(rule, tempPath, combinedAidl)
532
533	rule.Build(pctx, ctx, "framework_non_updatable_aidl", "generate framework_non_updatable.aidl")
534}
535
536func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx android.SingletonContext) *android.RuleBuilder {
537	stubsJars := make([]android.Paths, len(stubsModules))
538
539	ctx.VisitAllModules(func(module android.Module) {
540		// Collect dex jar paths for the modules listed above.
541		if j, ok := module.(Dependency); ok {
542			name := ctx.ModuleName(module)
543			if i := android.IndexList(name, stubsModules); i != -1 {
544				stubsJars[i] = j.HeaderJars()
545			}
546		}
547	})
548
549	var missingDeps []string
550
551	for i := range stubsJars {
552		if stubsJars[i] == nil {
553			if ctx.Config().AllowMissingDependencies() {
554				missingDeps = append(missingDeps, stubsModules[i])
555			} else {
556				ctx.Errorf("failed to find dex jar path for module %q", stubsModules[i])
557			}
558		}
559	}
560
561	rule := android.NewRuleBuilder()
562	rule.MissingDeps(missingDeps)
563
564	var aidls android.Paths
565	for _, jars := range stubsJars {
566		for _, jar := range jars {
567			aidl := android.PathForOutput(ctx, "aidl", pathtools.ReplaceExtension(jar.Base(), "aidl"))
568
569			rule.Command().
570				Text("rm -f").Output(aidl)
571			rule.Command().
572				BuiltTool(ctx, "sdkparcelables").
573				Input(jar).
574				Output(aidl)
575
576			aidls = append(aidls, aidl)
577		}
578	}
579
580	rule.Command().
581		Text("rm -f").Output(path)
582	rule.Command().
583		Text("cat").
584		Inputs(aidls).
585		Text("| sort -u >").
586		Output(path)
587
588	return rule
589}
590
591func sdkFrameworkAidlPath(ctx android.PathContext) android.OutputPath {
592	return ctx.Config().Once(sdkFrameworkAidlPathKey, func() interface{} {
593		return android.PathForOutput(ctx, "framework.aidl")
594	}).(android.OutputPath)
595}
596
597func nonUpdatableFrameworkAidlPath(ctx android.PathContext) android.OutputPath {
598	return ctx.Config().Once(nonUpdatableFrameworkAidlPathKey, func() interface{} {
599		return android.PathForOutput(ctx, "framework_non_updatable.aidl")
600	}).(android.OutputPath)
601}
602
603// Create api_fingerprint.txt
604func createAPIFingerprint(ctx android.SingletonContext) {
605	out := ApiFingerprintPath(ctx)
606
607	rule := android.NewRuleBuilder()
608
609	rule.Command().
610		Text("rm -f").Output(out)
611	cmd := rule.Command()
612
613	if ctx.Config().PlatformSdkCodename() == "REL" {
614		cmd.Text("echo REL >").Output(out)
615	} else if ctx.Config().IsPdkBuild() {
616		// TODO: get this from the PDK artifacts?
617		cmd.Text("echo PDK >").Output(out)
618	} else if !ctx.Config().UnbundledBuildUsePrebuiltSdks() {
619		in, err := ctx.GlobWithDeps("frameworks/base/api/*current.txt", nil)
620		if err != nil {
621			ctx.Errorf("error globbing API files: %s", err)
622		}
623
624		cmd.Text("cat").
625			Inputs(android.PathsForSource(ctx, in)).
626			Text("| md5sum | cut -d' ' -f1 >").
627			Output(out)
628	} else {
629		// Unbundled build
630		// TODO: use a prebuilt api_fingerprint.txt from prebuilts/sdk/current.txt once we have one
631		cmd.Text("echo").
632			Flag(ctx.Config().PlatformPreviewSdkVersion()).
633			Text(">").
634			Output(out)
635	}
636
637	rule.Build(pctx, ctx, "api_fingerprint", "generate api_fingerprint.txt")
638}
639
640func ApiFingerprintPath(ctx android.PathContext) android.OutputPath {
641	return ctx.Config().Once(apiFingerprintPathKey, func() interface{} {
642		return android.PathForOutput(ctx, "api_fingerprint.txt")
643	}).(android.OutputPath)
644}
645
646func sdkMakeVars(ctx android.MakeVarsContext) {
647	if ctx.Config().UnbundledBuildUsePrebuiltSdks() || ctx.Config().IsPdkBuild() {
648		return
649	}
650
651	ctx.Strict("FRAMEWORK_AIDL", sdkFrameworkAidlPath(ctx).String())
652	ctx.Strict("API_FINGERPRINT", ApiFingerprintPath(ctx).String())
653}
654