Add DeviceConfig and OncePer objects
Add DeviceConfig to store per-device configuration information. Put a
OncePer object inside Config and DeviceConfig, which computes a value
once per key per object to allow build logic to store arbitrary
per-build or per-device computed values.
Change-Id: I1a38b426f29d223ef5e803e0d4d9604500de2fd2
diff --git a/android/module.go b/android/module.go
index bf9dfaa..03c06b4 100644
--- a/android/module.go
+++ b/android/module.go
@@ -56,6 +56,7 @@
Darwin() bool
Debug() bool
AConfig() Config
+ DeviceConfig() DeviceConfig
}
type BaseContext interface {
@@ -535,6 +536,10 @@
return a.config
}
+func (a *androidBaseContextImpl) DeviceConfig() DeviceConfig {
+ return DeviceConfig{a.config.deviceConfig}
+}
+
func (a *androidModuleContext) Proprietary() bool {
return a.module.base().commonProperties.Proprietary
}