Make hiddenAPIFlagFileCategory an int

hiddenAPIFlagFileCategory used to contain function pointers, and is
used in a provider. Providers must be serializable for incremental
soong support, so the function pointers must be removed.

Refactor hiddenAPIFlagFileCategory into a simple int.

Bug: 322069292
Test: m nothing --no-skip-soong-tests
Change-Id: I2bd50fa1b59979f30869b405314cbef16ee345f1
This commit is contained in:
Cole Faust
2024-01-23 17:52:13 -08:00
parent 5376892762
commit 22e8abcaa6
4 changed files with 101 additions and 105 deletions

View File

@@ -155,7 +155,7 @@ func TestPlatformBootclasspath_Fragments(t *testing.T) {
info, _ := android.SingletonModuleProvider(result, pbcp, java.MonolithicHiddenAPIInfoProvider)
for _, category := range java.HiddenAPIFlagFileCategories {
name := category.PropertyName
name := category.PropertyName()
message := fmt.Sprintf("category %s", name)
filename := strings.ReplaceAll(name, "_", "-")
expected := []string{fmt.Sprintf("%s.txt", filename), fmt.Sprintf("bar-%s.txt", filename)}