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
This commit is contained in:
@@ -56,6 +56,7 @@ type androidBaseContext interface {
|
||||
Darwin() bool
|
||||
Debug() bool
|
||||
AConfig() Config
|
||||
DeviceConfig() DeviceConfig
|
||||
}
|
||||
|
||||
type BaseContext interface {
|
||||
@@ -535,6 +536,10 @@ func (a *androidBaseContextImpl) AConfig() Config {
|
||||
return a.config
|
||||
}
|
||||
|
||||
func (a *androidBaseContextImpl) DeviceConfig() DeviceConfig {
|
||||
return DeviceConfig{a.config.deviceConfig}
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) Proprietary() bool {
|
||||
return a.module.base().commonProperties.Proprietary
|
||||
}
|
||||
|
Reference in New Issue
Block a user