omni: Move Lineage Health HAL to select()
Change-Id: Ie7f29e75d812fff0faf27f9c82ca432a78c199fb
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/config/Android.bp b/config/Android.bp
index c94ae49..5b5fe8a 100644
--- a/config/Android.bp
+++ b/config/Android.bp
@@ -62,54 +62,6 @@
}
soong_config_module_type {
- name: "health_charging_control",
- module_type: "cc_defaults",
- config_namespace: "omniGlobalVars",
- bool_variables: [
- "target_health_charging_control_supports_toggle",
- "target_health_charging_control_supports_bypass",
- "target_health_charging_control_supports_deadline",
- "target_health_charging_control_supports_limit",
- ],
- value_variables: [
- "target_health_charging_control_charging_path",
- "target_health_charging_control_charging_enabled",
- "target_health_charging_control_charging_disabled",
- "target_health_charging_control_deadline_path",
- ],
- properties: ["cppflags"],
-}
-health_charging_control {
- name: "health_charging_control_defaults",
- soong_config_variables: {
- target_health_charging_control_supports_toggle: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE"],
- },
- target_health_charging_control_supports_bypass: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS"],
- },
- target_health_charging_control_supports_deadline: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE"],
- },
- target_health_charging_control_supports_limit: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT"],
- },
- target_health_charging_control_charging_path: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_PATH=\"%s\""],
- },
- target_health_charging_control_charging_enabled: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_ENABLED=\"%s\""],
- },
- target_health_charging_control_charging_disabled: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_DISABLED=\"%s\""],
- },
- target_health_charging_control_deadline_path: {
- cppflags: ["-DHEALTH_CHARGING_CONTROL_DEADLINE_PATH=\"%s\""],
- },
- },
-}
-
-soong_config_module_type {
name: "power_libperfmgr",
module_type: "cc_defaults",
config_namespace: "omniGlobalVars",
diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk
index d40bc17..bb5f382 100644
--- a/config/BoardConfigSoong.mk
+++ b/config/BoardConfigSoong.mk
@@ -29,13 +29,6 @@
additional_gralloc_10_usage_bits \
camera_override_format_from_reserved \
target_create_device_symlinks \
- target_health_charging_control_charging_enabled \
- target_health_charging_control_charging_disabled \
- target_health_charging_control_deadline_path \
- target_health_charging_control_supports_bypass \
- target_health_charging_control_supports_deadline \
- target_health_charging_control_supports_limit \
- target_health_charging_control_supports_toggle \
target_init_vendor_lib \
target_power_libperfmgr_mode_extension_lib \
target_surfaceflinger_udfps_lib \
@@ -53,11 +46,6 @@
target_camera_needs_client_info \
target_enforce_ab_ota_partition_list
-ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH),)
-SOONG_CONFIG_omniGlobalVars += \
- target_health_charging_control_charging_path
-endif
-
SOONG_CONFIG_NAMESPACES += omniQcomVars
SOONG_CONFIG_omniQcomVars += \
healthd_enable_tricolor_led \
@@ -92,12 +80,6 @@
# Set default values
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
-TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED ?= 1
-TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED ?= 0
-TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS ?= true
-TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE ?= false
-TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT ?= false
-TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE ?= true
TARGET_INIT_VENDOR_LIB ?= vendor_init
TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB ?= libperfmgr-ext
TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib
@@ -112,16 +94,6 @@
# Soong value variables
SOONG_CONFIG_omniGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)
-ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH),)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_charging_path := $(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH)
-endif
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_charging_enabled := $(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_charging_disabled := $(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_deadline_path := $(TARGET_HEALTH_CHARGING_CONTROL_DEADLINE_PATH)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_bypass := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_deadline := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_limit := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT)
-SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_toggle := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE)
SOONG_CONFIG_omniGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
SOONG_CONFIG_omniGlobalVars_target_power_libperfmgr_mode_extension_lib := $(TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB)
SOONG_CONFIG_omniGlobalVars_target_surfaceflinger_udfps_lib := $(TARGET_SURFACEFLINGER_UDFPS_LIB)
@@ -141,3 +113,29 @@
ifeq ($(ROM_BUILDTYPE),WEEKLY)
SOONG_CONFIG_omniGlobalVars_useWeeklyBuild := true
endif
+
+# Lineage Health HAL
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH is deprecated, please migrate to soong_config_set,lineage_health,charging_control_charging_path)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_DEADLINE_PATH),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_DEADLINE_PATH is deprecated, please migrate to soong_config_set,lineage_health,charging_control_deadline_path)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED is deprecated, please migrate to soong_config_set,lineage_health,charging_control_charging_enabled)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED is deprecated, please migrate to soong_config_set,lineage_health,charging_control_charging_disabled)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS is deprecated, please migrate to soong_config_set,lineage_health,charging_control_supports_bypass)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE is deprecated, please migrate to soong_config_set,lineage_health,charging_control_supports_deadline)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT is deprecated, please migrate to soong_config_set,lineage_health,charging_control_supports_limit)
+endif
+ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE),)
+ $(error TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE is deprecated, please migrate to soong_config_set,lineage_health,charging_control_supports_toggle)
+endif