diff options
author | Scott Lobdell <slobdell@google.com> | 2021-03-11 19:08:45 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-03-16 00:44:22 +0000 |
commit | 85534c36f81cf1557ddaa01605199bfc3a9fd76c (patch) | |
tree | f9b65ea011ac58731bc866a621f526ea8fa7e39f /java/hiddenapi_singleton.go | |
parent | 5989878a55d2d34a1a8e5e16bb37349c4949758b (diff) | |
parent | edc1fc38c73698499b37c40435b25ef2a5ade887 (diff) |
Merge SP1A.210311.001
Change-Id: I28e9aad9ed4dd91092fd24efb136f0aac7bdb68e
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index 6341a3406..82e8b3f75 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -217,10 +217,6 @@ func stubFlagsRule(ctx android.SingletonContext) { var bootDexJars android.Paths - // Get the configured non-updatable and updatable boot jars. - nonUpdatableBootJars := ctx.Config().NonUpdatableBootJars() - updatableBootJars := ctx.Config().UpdatableBootJars() - ctx.VisitAllModules(func(module android.Module) { // Collect dex jar paths for the modules listed above. if j, ok := module.(UsesLibraryDependency); ok { @@ -235,11 +231,6 @@ func stubFlagsRule(ctx android.SingletonContext) { // Collect dex jar paths for modules that had hiddenapi encode called on them. if h, ok := module.(hiddenAPIIntf); ok { if jar := h.bootDexJar(); jar != nil { - if !isModuleInConfiguredList(ctx, module, nonUpdatableBootJars) && - !isModuleInConfiguredList(ctx, module, updatableBootJars) { - return - } - bootDexJars = append(bootDexJars, jar) } } @@ -291,8 +282,8 @@ func stubFlagsRule(ctx android.SingletonContext) { // there too. // // TODO(b/179354495): Avoid having to perform this type of check or if necessary dedup it. -func isModuleInConfiguredList(ctx android.SingletonContext, module android.Module, configuredBootJars android.ConfiguredJarList) bool { - name := ctx.ModuleName(module) +func isModuleInConfiguredList(ctx android.BaseModuleContext, module android.Module, configuredBootJars android.ConfiguredJarList) bool { + name := ctx.OtherModuleName(module) // Strip a prebuilt_ prefix so that this can match a prebuilt module that has not been renamed. name = android.RemoveOptionalPrebuiltPrefix(name) @@ -305,11 +296,11 @@ func isModuleInConfiguredList(ctx android.SingletonContext, module android.Modul // It is an error if the module is not an ApexModule. if _, ok := module.(android.ApexModule); !ok { - ctx.Errorf("module %q configured in boot jars does not support being added to an apex", module) + ctx.ModuleErrorf("is configured in boot jars but does not support being added to an apex") return false } - apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo) + apexInfo := ctx.OtherModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo) // Now match the apex part of the boot image configuration. requiredApex := configuredBootJars.Apex(index) @@ -433,6 +424,7 @@ func metadataRule(ctx android.SingletonContext) android.Path { rule.Command(). BuiltTool("merge_csv"). + Flag("--key_field signature"). FlagWithOutput("--output=", outputPath). Inputs(metadataCSV) @@ -544,6 +536,7 @@ func (h *hiddenAPIIndexSingleton) GenerateBuildActions(ctx android.SingletonCont rule := android.NewRuleBuilder(pctx, ctx) rule.Command(). BuiltTool("merge_csv"). + Flag("--key_field signature"). FlagWithArg("--header=", "signature,file,startline,startcol,endline,endcol,properties"). FlagWithOutput("--output=", hiddenAPISingletonPaths(ctx).index). Inputs(indexes) |