Move hiddenapi singleton rules to Soong

Move the rules that build hiddenapi-stubs-flags.txt,
hiddenapi-flags.csv and hiddenapi-greylist.csv into Soong.

Bug: 123645297
Test: m checkbuild
Test: m UNSAFE_DISABLE_HIDDEN_API_FLAGS=true
Change-Id: I90bf58710f6153ee8565994f799d3ec5699bc7fa
diff --git a/android/config.go b/android/config.go
index 92010fc..63788b7 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1022,14 +1022,14 @@
 	return c.productVariables.EnforceSystemCertificateWhitelist
 }
 
-func (c *config) HiddenAPIStubFlags() string {
-	return String(c.productVariables.HiddenAPIStubFlags)
+func (c *config) ProductHiddenAPIStubs() []string {
+	return c.productVariables.ProductHiddenAPIStubs
 }
 
-func (c *config) HiddenAPIFlags() string {
-	return String(c.productVariables.HiddenAPIFlags)
+func (c *config) ProductHiddenAPIStubsSystem() []string {
+	return c.productVariables.ProductHiddenAPIStubsSystem
 }
 
-func (c *config) HiddenAPIExtraAppUsageJars() []string {
-	return c.productVariables.HiddenAPIExtraAppUsageJars
+func (c *config) ProductHiddenAPIStubsTest() []string {
+	return c.productVariables.ProductHiddenAPIStubsTest
 }
diff --git a/android/variable.go b/android/variable.go
index f38cf25..dc880b8 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -278,10 +278,9 @@
 	EnforceSystemCertificate          *bool    `json:",omitempty"`
 	EnforceSystemCertificateWhitelist []string `json:",omitempty"`
 
-	// TODO(ccross): move these to a Singleton in Soong
-	HiddenAPIStubFlags         *string  `json:",omitempty"`
-	HiddenAPIFlags             *string  `json:",omitempty"`
-	HiddenAPIExtraAppUsageJars []string `json:",omitempty"`
+	ProductHiddenAPIStubs       []string `json:",omitempty"`
+	ProductHiddenAPIStubsSystem []string `json:",omitempty"`
+	ProductHiddenAPIStubsTest   []string `json:",omitempty"`
 }
 
 func boolPtr(v bool) *bool {