Lines Matching refs:ctx
36 func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStruct {
37 return ctx.Config().Once(hiddenAPISingletonPathsKey, func() interface{} {
39 stubFlags: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-stub-flags.txt"),
40 flags: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-flags.csv"),
41 metadata: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-greylist.csv"),
55 func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) {
57 if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
61 stubFlagsRule(ctx)
64 if ctx.Config().FrameworksBaseDirExists(ctx) {
65 h.flags = flagsRule(ctx)
66 h.metadata = metadataRule(ctx)
68 h.flags = emptyFlagsRule(ctx)
74 func (h *hiddenAPISingleton) MakeVars(ctx android.MakeVarsContext) {
75 if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
79 ctx.Strict("INTERNAL_PLATFORM_HIDDENAPI_FLAGS", h.flags.String())
82 ctx.Strict("INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA", h.metadata.String())
88 func stubFlagsRule(ctx android.SingletonContext) {
97 …if inList("android.test.base", ctx.Config().BootJars()) && !ctx.Config().UnbundledBuildUsePrebuilt…
117 publicStubModules = append(publicStubModules, ctx.Config().ProductHiddenAPIStubs()...)
118 systemStubModules = append(systemStubModules, ctx.Config().ProductHiddenAPIStubsSystem()...)
119 testStubModules = append(testStubModules, ctx.Config().ProductHiddenAPIStubsTest()...)
120 if ctx.Config().IsEnvTrue("EMMA_INSTRUMENT") {
138 ctx.VisitAllModules(func(module android.Module) {
141 name := ctx.ModuleName(module)
162 pathList[i] = android.PathForOutput(ctx, "missing")
163 if ctx.Config().AllowMissingDependencies() {
166 ctx.Errorf("failed to find dex jar path for module %q",
176 outputPath := hiddenAPISingletonPaths(ctx).stubFlags
177 tempPath := android.PathForOutput(ctx, outputPath.Rel()+".tmp")
182 Tool(pctx.HostBinToolPath(ctx, "hiddenapi")).
193 rule.Build(pctx, ctx, "hiddenAPIStubFlagsFile", "hiddenapi stub flags")
198 func flagsRule(ctx android.SingletonContext) android.Path {
203 ctx.VisitAllModules(func(module android.Module) {
208 } else if ds, ok := module.(*Droidstubs); ok && ctx.ModuleName(module) == "hiddenapi-lists-docs" {
214 ctx.Errorf("failed to find removed_dex_api_filename from hiddenapi-lists-docs module")
220 outputPath := hiddenAPISingletonPaths(ctx).flags
221 tempPath := android.PathForOutput(ctx, outputPath.Rel()+".tmp")
223 stubFlags := hiddenAPISingletonPaths(ctx).stubFlags
226 Tool(android.PathForSource(ctx, "frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py")).
230 android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist.txt")).
234 android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-p.txt")).
236 android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-o.txt")).
238 android.PathForSource(ctx, "frameworks/base/config/hiddenapi-force-blacklist.txt")).
240 android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-packages.txt")).
245 rule.Build(pctx, ctx, "hiddenAPIFlagsFile", "hiddenapi flags")
252 func emptyFlagsRule(ctx android.SingletonContext) android.Path {
255 outputPath := hiddenAPISingletonPaths(ctx).flags
260 rule.Build(pctx, ctx, "emptyHiddenAPIFlagsFile", "empty hiddenapi flags")
267 func metadataRule(ctx android.SingletonContext) android.Path {
270 ctx.VisitAllModules(func(module android.Module) {
280 outputPath := hiddenAPISingletonPaths(ctx).metadata
283 Tool(android.PathForSource(ctx, "frameworks/base/tools/hiddenapi/merge_csv.py")).
288 rule.Build(pctx, ctx, "hiddenAPIGreylistMetadataFile", "hiddenapi greylist metadata")