diff options
author | 2022-09-14 16:37:12 +0100 | |
---|---|---|
committer | 2022-09-14 16:37:12 +0100 | |
commit | 887efdd779ecf6b264ea1ca510e47ef74d66f03c (patch) | |
tree | e0dd635e4afb3e82bcab3dc28ccced2870d5e4cf /java/bootclasspath_fragment.go | |
parent | af70518189374b3a18ccc3cf4d9500fcce5e29df (diff) |
Separate hidden API flag info for sdk from platform_bootclasspath
Previously, the sdk snapshot and platform_bootclasspath both used the
HiddenAPIInfo/Provider to retrieve the hidden API related information
they needed. This change separates them by adding a new
HiddenAPIInfoForSdk/Provider that is used to provide the information
needed by the sdk snapshot. This allows a follow up change to generate
different information for the sdk and for the platform depending on the
target build release of the sdk snapshot.
Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I30cea6cf8dae1be467b7063430d6197e5baa684b
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r-- | java/bootclasspath_fragment.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index c884621a7..919181dbe 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -905,6 +905,14 @@ func (b *BootclasspathFragmentModule) produceHiddenAPIOutput(ctx android.ModuleC EncodedBootDexFilesByModule: encodedBootDexFilesByModule, } + flagFilesByCategory := input.FlagFilesByCategory + + // Make the information available for the sdk snapshot. + ctx.SetProvider(HiddenAPIInfoForSdkProvider, HiddenAPIInfoForSdk{ + FlagFilesByCategory: flagFilesByCategory, + HiddenAPIFlagOutput: flagOutput, + }) + return output } @@ -1069,7 +1077,7 @@ func (b *bootclasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx andro // Get the hidden API information from the module. mctx := ctx.SdkModuleContext() - hiddenAPIInfo := mctx.OtherModuleProvider(module, HiddenAPIInfoProvider).(HiddenAPIInfo) + hiddenAPIInfo := mctx.OtherModuleProvider(module, HiddenAPIInfoForSdkProvider).(HiddenAPIInfoForSdk) b.Flag_files_by_category = hiddenAPIInfo.FlagFilesByCategory // Copy all the generated file paths. |