You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
821 B
38 lines
821 B
package display
|
|
|
|
import (
|
|
"android/soong/android"
|
|
"android/soong/cc"
|
|
|
|
"github.com/google/blueprint/proptools"
|
|
)
|
|
|
|
func init() {
|
|
android.RegisterModuleType("display_go_defaults", display_DefaultsFactory)
|
|
}
|
|
|
|
func display_DefaultsFactory() android.Module {
|
|
module := cc.DefaultsFactory()
|
|
android.AddLoadHook(module, display_Defaults)
|
|
return module
|
|
}
|
|
|
|
func display_Defaults(ctx android.LoadHookContext) {
|
|
type props struct {
|
|
Enabled *bool
|
|
}
|
|
p := &props{}
|
|
p.Enabled = display_globalDefaults(ctx)
|
|
ctx.AppendProperties(p)
|
|
}
|
|
|
|
func display_globalDefaults(ctx android.LoadHookContext) *bool {
|
|
var module_enabled *bool
|
|
|
|
if android.ExistentPathForSource(ctx, "vendor/qcom/sm8150/codeaurora/commonsys-intf/display/Android.bp").Valid() == false {
|
|
module_enabled = proptools.BoolPtr(false)
|
|
}
|
|
|
|
return module_enabled
|
|
}
|