Bluetooth: BT_Vendor: Fix the build error in BT vendor
* Reason
(1) Originally, the macro "FM_OVER_UART" is always defined in BT vendor lib.
(2) If the macro is enabled, "FM_VND_OP_POWER_CTRL" should also be handled.
(3) However, "FM_VND_OP_POWER_CTRL" is specific with QC value-added feature, in which the valud should be defined in Fluroi
(4) "FM_VND_OP_POWER_CTRL" isn't defined. This results into the build error.
* Resolution
(1) Define "FM_OVER_UART" conditionally through the new setting "ENABLE_FM_OVER_UART".
(2) By default, "ENABLE_FM_OVER_UART" is un-defined. To enable the feature, set it as "true" in "BoardConfig.mk".
Change-Id: Ieadfe3438bc3cbabe9f8d4ced6cc64d0603067ad
Signed-off-by: Yanfei Zhou <zyanfei@codeaurora.org>
diff --git a/libbt-vendor/Android.mk b/libbt-vendor/Android.mk
index 8d3f9d4..ad9671c 100644
--- a/libbt-vendor/Android.mk
+++ b/libbt-vendor/Android.mk
@@ -30,8 +30,11 @@
src/hw_ar3k.c \
src/bt_vendor_persist.cpp
-#Disable this flag in case if FM over UART support not needed
+# By default, "ENABLE_FM_OVER_UART" is un-defined.
+# To enable the feature, set it as "true" in "BoardConfig.mk".
+ifeq ($(ENABLE_FM_OVER_UART), true)
LOCAL_CFLAGS := -DFM_OVER_UART
+endif
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
LOCAL_CFLAGS += -DPANIC_ON_SOC_CRASH