Separate monolithic hidden API processing from hiddenAPIFlagFileInfo

The hiddenAPIFlagFileInfo was being used for both the input and output
of bootclasspath_fragment and platform_bootclasspath and also to pass
information around to various hidden API rule methods. Supporting
multiple different uses in this way made it hard to reason about.

This change creates a separate structure for use by the
platform_bootclasspath. Follow up changes will split out other
functionality into separate types.

Bug: 179354495
Test: m com.android.art com.android.ipsec com.android.os.statsd com.android.conscrypt
      - verify that this does not change the contents of the apex files
Change-Id: Ia5c5f65ae5645486c42819c669a8601588217f88
This commit is contained in:
Paul Duffin
2021-05-21 16:58:23 +01:00
parent c1cc3b9678
commit 438eb57a27
6 changed files with 138 additions and 37 deletions

View File

@@ -651,7 +651,7 @@ type bootclasspathFragmentSdkMemberProperties struct {
Core_platform_stub_libs []string
// Flag files by *hiddenAPIFlagFileCategory
Flag_files_by_category map[*hiddenAPIFlagFileCategory]android.Paths
Flag_files_by_category FlagFilesByCategory
// The path to the generated stub-flags.csv file.
Stub_flags_path android.OptionalPath
@@ -689,7 +689,7 @@ func (b *bootclasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx andro
// Get the flag file information from the module.
mctx := ctx.SdkModuleContext()
flagFileInfo := mctx.OtherModuleProvider(module, hiddenAPIFlagFileInfoProvider).(hiddenAPIFlagFileInfo)
b.Flag_files_by_category = flagFileInfo.categoryToPaths
b.Flag_files_by_category = flagFileInfo.FlagFilesByCategory
// Copy all the generated file paths.
b.Stub_flags_path = pathsToOptionalPath(flagFileInfo.StubFlagsPaths)