summaryrefslogtreecommitdiff
path: root/java/base.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/base.go')
-rw-r--r--java/base.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/base.go b/java/base.go
index 94daf37fc..fe92b4754 100644
--- a/java/base.go
+++ b/java/base.go
@@ -267,6 +267,9 @@ type DeviceProperties struct {
// Only for libraries created by a sysprop_library module, SyspropPublicStub is the name of the
// public stubs library.
SyspropPublicStub string `blueprint:"mutated"`
+
+ HiddenAPIPackageProperties
+ HiddenAPIFlagFileProperties
}
// Device properties that can be overridden by overriding module (e.g. override_android_app)
@@ -564,6 +567,20 @@ func (j *Module) addHostAndDeviceProperties() {
)
}
+// provideHiddenAPIPropertyInfo populates a HiddenAPIPropertyInfo from hidden API properties and
+// makes it available through the hiddenAPIPropertyInfoProvider.
+func (j *Module) provideHiddenAPIPropertyInfo(ctx android.ModuleContext) {
+ hiddenAPIInfo := newHiddenAPIPropertyInfo()
+
+ // Populate with flag file paths from the properties.
+ hiddenAPIInfo.extractFlagFilesFromProperties(ctx, &j.deviceProperties.HiddenAPIFlagFileProperties)
+
+ // Populate with package rules from the properties.
+ hiddenAPIInfo.extractPackageRulesFromProperties(&j.deviceProperties.HiddenAPIPackageProperties)
+
+ ctx.SetProvider(hiddenAPIPropertyInfoProvider, hiddenAPIInfo)
+}
+
func (j *Module) OutputFiles(tag string) (android.Paths, error) {
switch tag {
case "":