1package display 2 3import ( 4 "android/soong/android" 5 "android/soong/cc" 6 7 "github.com/google/blueprint/proptools" 8) 9 10func init() { 11 android.RegisterModuleType("display_go_defaults", display_DefaultsFactory) 12} 13 14func display_DefaultsFactory() android.Module { 15 module := cc.DefaultsFactory() 16 android.AddLoadHook(module, display_Defaults) 17 return module 18} 19 20func display_Defaults(ctx android.LoadHookContext) { 21 type props struct { 22 Enabled *bool 23 } 24 p := &props{} 25 p.Enabled = display_globalDefaults(ctx) 26 ctx.AppendProperties(p) 27} 28 29func display_globalDefaults(ctx android.LoadHookContext) *bool { 30 var module_enabled *bool 31 32 if android.ExistentPathForSource(ctx, "vendor/qcom/sm8150/codeaurora/commonsys-intf/display/Android.bp").Valid() == false { 33 module_enabled = proptools.BoolPtr(false) 34 } 35 36 return module_enabled 37} 38