soong: Add support to set vendor tag with client package name
* OEMs like OnePlus and Nothing detect camera package name to unlock features like 48mp.
Change-Id: I5e56a66900c389d9b31aaabe4eef1d84ff2b59bf
diff --git a/build/soong/Android.bp b/build/soong/Android.bp
index 4b4bb8c..0e11799 100644
--- a/build/soong/Android.bp
+++ b/build/soong/Android.bp
@@ -380,6 +380,57 @@
}
soong_config_module_type {
+ name: "uses_nothing_camera",
+ module_type: "cc_defaults",
+ config_namespace: "blissGlobalVars",
+ bool_variables: ["uses_nothing_camera"],
+ properties: ["cppflags"],
+}
+
+uses_nothing_camera {
+ name: "uses_nothing_camera_defaults",
+ soong_config_variables: {
+ uses_nothing_camera: {
+ cppflags: ["-DUSES_NOTHING_CAMERA"],
+ },
+ },
+}
+
+soong_config_module_type {
+ name: "uses_oplus_camera",
+ module_type: "cc_defaults",
+ config_namespace: "blissGlobalVars",
+ bool_variables: ["uses_oplus_camera"],
+ properties: ["cppflags"],
+}
+
+uses_oplus_camera {
+ name: "uses_oplus_camera_defaults",
+ soong_config_variables: {
+ uses_oplus_camera: {
+ cppflags: ["-DUSES_OPLUS_CAMERA"],
+ },
+ },
+}
+
+soong_config_module_type {
+ name: "uses_oppo_camera",
+ module_type: "cc_defaults",
+ config_namespace: "blissGlobalVars",
+ bool_variables: ["uses_oppo_camera"],
+ properties: ["cppflags"],
+}
+
+uses_oppo_camera {
+ name: "uses_oppo_camera_defaults",
+ soong_config_variables: {
+ uses_oppo_camera: {
+ cppflags: ["-DUSES_OPPO_CAMERA"],
+ },
+ },
+}
+
+soong_config_module_type {
name: "health_charging_control",
module_type: "cc_defaults",
config_namespace: "blissGlobalVars",
diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk
index fdb1bdb..dae7183 100644
--- a/config/BoardConfigSoong.mk
+++ b/config/BoardConfigSoong.mk
@@ -53,7 +53,11 @@
target_health_charging_control_supports_toggle \
camera_needs_client_info_lib \
camera_needs_client_info_lib_oplus \
- needs_camera_boottime
+ needs_camera_boottime \
+ uses_nothing_camera \
+ uses_oplus_camera \
+ uses_oppo_camera
+
SOONG_CONFIG_NAMESPACES += blissNvidiaVars
SOONG_CONFIG_blissNvidiaVars += \
@@ -93,6 +97,9 @@
SOONG_CONFIG_blissGlobalVars_camera_needs_client_info_lib := $(TARGET_CAMERA_NEEDS_CLIENT_INFO_LIB)
SOONG_CONFIG_blissGlobalVars_camera_needs_client_info_lib_oplus := $(TARGET_CAMERA_NEEDS_CLIENT_INFO_LIB_OPLUS)
SOONG_CONFIG_blissGlobalVars_needs_camera_boottime := $(TARGET_CAMERA_BOOTTIME_TIMESTAMP)
+SOONG_CONFIG_blissGlobalVars_uses_nothing_camera := $(TARGET_USES_NOTHING_CAMERA)
+SOONG_CONFIG_blissGlobalVars_uses_oplus_camera := $(TARGET_USES_OPLUS_CAMERA)
+SOONG_CONFIG_blissGlobalVars_uses_oppo_camera := $(TARGET_USES_OPPO_CAMERA)
# Set default values
BOOTLOADER_MESSAGE_OFFSET ?= 0