Merge "vendor: add HEALTHD_USE_BATTERY_INFO option" into android-9.0
diff --git a/build/soong/android/variable.go b/build/soong/android/variable.go
index 75da6a4..0569d20 100644
--- a/build/soong/android/variable.go
+++ b/build/soong/android/variable.go
@@ -1,10 +1,14 @@
 package android
 type Product_variables struct {
+	Healthd_use_battery_info struct {
+		Cflags []string
+	}
 	TargetNeedsHWCOnFirstRef struct {
 		Cflags []string
 	}
 }
 
 type ProductVariables struct {
+	Healthd_use_battery_info  *bool `json:",omitempty"`
 	TargetNeedsHWCOnFirstRef  *bool `json:",omitempty"`
 }
diff --git a/build/soong/soong_config.mk b/build/soong/soong_config.mk
index 09c4b47..24564a0 100644
--- a/build/soong/soong_config.mk
+++ b/build/soong/soong_config.mk
@@ -3,6 +3,7 @@
 _contents := $(_contents)    "Omnirom": {$(newline)
 
 # See build/core/soong_config.mk for the add_json_* functions you can use here.
+$(call add_json_bool, Healthd_use_battery_info, $(filter true,$(HEALTHD_USE_BATTERY_INFO)))
 $(call add_json_bool, TargetNeedsHWCOnFirstRef, $(filter true,$(TARGET_NEEDS_HWC_ONFIRSTREF)))
 
 # This causes the build system to strip out the last comma in our nested struct, to keep the JSON valid.