diff options
Diffstat (limited to 'java/app.go')
-rw-r--r-- | java/app.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/java/app.go b/java/app.go index abd78b7ed..87685449a 100644 --- a/java/app.go +++ b/java/app.go @@ -1471,7 +1471,23 @@ func (a *AndroidTest) FixTestConfig(ctx android.ModuleContext, testConfig androi return testConfig } +func (a *AndroidTestHelperApp) DepsMutator(ctx android.BottomUpMutatorContext) { + if len(a.ApexProperties.Apex_available) == 0 && ctx.Config().IsEnvTrue("EMMA_API_MAPPER") { + // Instrument the android_test_helper target to log potential API calls at the run time. + // Contact android-xts-infra team before using the environment var EMMA_API_MAPPER. + ctx.AddVariationDependencies(nil, staticLibTag, "apimapper-helper-device-lib") + a.setApiMapper(true) + } + a.AndroidApp.DepsMutator(ctx) +} + func (a *AndroidTest) DepsMutator(ctx android.BottomUpMutatorContext) { + if len(a.ApexProperties.Apex_available) == 0 && ctx.Config().IsEnvTrue("EMMA_API_MAPPER") { + // Instrument the android_test_helper target to log potential API calls at the run time. + // Contact android-xts-infra team before using the environment var EMMA_API_MAPPER. + ctx.AddVariationDependencies(nil, staticLibTag, "apimapper-helper-device-lib") + a.setApiMapper(true) + } a.AndroidApp.DepsMutator(ctx) } |