zenfone6: Build some CAF BT components

Change-Id: I45909006a5937876987d9aeac74f89cb60d141be
diff --git a/device.mk b/device.mk
index 63ca2c3..8a92cf9 100755
--- a/device.mk
+++ b/device.mk
@@ -60,6 +60,16 @@
     $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/29/etc/audio_policy_configuration.xml \
     $(LOCAL_PATH)/audio/audio_policy_volumes_ZS630KL.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/29/etc/audio_policy_volumes_ZS630KL.xml
 
+# Bluetooth
+PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/commonsys/packages/apps/Bluetooth
+PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/commonsys/system/bt/conf
+
+PRODUCT_PACKAGE_OVERLAYS += vendor/qcom/opensource/commonsys-intf/bluetooth/overlay/qva
+
+PRODUCT_PACKAGES += BluetoothExt
+PRODUCT_PACKAGES += libbluetooth_qti
+PRODUCT_PACKAGES += vendor.qti.hardware.bluetooth_dun-V1.0-java
+
 # Boot control
 PRODUCT_PACKAGES += \
     android.hardware.boot@1.0-impl.recovery \
diff --git a/omni.dependencies b/omni.dependencies
index adadc64..4caa653 100644
--- a/omni.dependencies
+++ b/omni.dependencies
@@ -16,5 +16,17 @@
      "repository": "android_vendor_qcom_opensource_fm-commonsys",
      "target_path": "vendor/qcom/opensource/fm-commonsys",
      "revision": "android-11"
-   }
+   },
+   {
+    "remote": "omnirom",
+    "repository": "android_vendor_qcom_opensource_packages_apps_Bluetooth",
+    "target_path": "vendor/qcom/opensource/commonsys/packages/apps/Bluetooth",
+    "revision": "android-11"
+  },
+  {
+    "remote": "omnirom",
+    "repository": "android_vendor_qcom_opensource_bluetooth-commonsys-intf",
+    "target_path": "vendor/qcom/opensource/commonsys-intf/bluetooth",
+    "revision": "android-11"
+  }
 ]
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
deleted file mode 100644
index 68b18d8..0000000
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2014, The Linux Foundation. All rights reserved.
-
-     Redistribution and use in source and binary forms, with or without
-     modification, are permitted (subject to the limitations in the
-     disclaimer below) provided that the following conditions are met:
-
-        * Redistributions of source code must retain the above copyright
-          notice, this list of conditions and the following disclaimer.
-        * Redistributions in binary form must reproduce the above
-          copyright notice, this list of conditions and the following
-          disclaimer in the documentation and/or other materials provided
-          with the distribution.
-        * Neither the name of the Linux Foundation nor the names of its
-          contributors may be used to endorse or promote products derived
-          from this software without specific prior written permission.
-
-     NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
-     GRANTED BY THIS LICENSE.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-     HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-     WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-     BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-     OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-     IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<resources>
-    <bool name="profile_supported_avrcp_controller">true</bool>
-    <bool name="profile_supported_sap">true</bool>
-    <bool name="profile_supported_hid_device">false</bool>
-    <bool name="profile_supported_ba">true</bool>
-</resources>
diff --git a/proprietary-files-product.txt b/proprietary-files-product.txt
index 4216c31..e80f225 100644
--- a/proprietary-files-product.txt
+++ b/proprietary-files-product.txt
@@ -5,12 +5,8 @@
 product/lib/vendor.qti.hardware.alarm@1.0.so
 
 # Bluetooth
-product/lib64/com.qualcomm.qti.bluetooth_audio@1.0.so
 product/lib64/vendor.qti.hardware.audiohalext@1.0.so
-product/lib64/vendor.qti.hardware.btconfigstore@1.0.so
-product/lib/com.qualcomm.qti.bluetooth_audio@1.0.so
 product/lib/vendor.qti.hardware.audiohalext@1.0.so
-product/lib/vendor.qti.hardware.btconfigstore@1.0.so
 
 # Camera
 -product/framework/vendor.qti.hardware.sensorscalibrate-V1.0-java.jar
diff --git a/proprietary-files.txt b/proprietary-files.txt
index ddb2ea2..1c67c2f 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -24,10 +24,6 @@
 etc/bluetooth/interop_database.conf
 etc/permissions/audiosphere.xml
 -framework/audiosphere.jar
-lib/libbluetooth_qti.so
-lib64/libbluetooth_qti.so
-product/lib64/libaptX_encoder.so|df1c89d7af1bb35808d5fe3496b04ba066c10cbc
-product/lib64/libaptXHD_encoder.so|e13fa70c97caaa24d061678bdee608eb8850a69e
 
 # Camera
 lib/DataSet/ispDB/ASUS_UNDI.bin
diff --git a/system.prop b/system.prop
index cc3c1f6..eea0529 100644
--- a/system.prop
+++ b/system.prop
@@ -78,7 +78,7 @@
 
 #system prop for Bluetooth SOC type
 vendor.bluetooth.soc=cherokee
-#ro.bluetooth.library_name=libbluetooth_qti.so
+ro.bluetooth.library_name=libbluetooth_qti.so
 persist.vendor.btstack.enable.splita2dp=true
 persist.vendor.btstack.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac
 persist.vendor.btstack.aac_frm_ctl.enabled=true