summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAyushi Khopkar <ayushi.khopkar@ittiam.com>2021-06-24 20:24:03 +0530
committerAyushi Khopkar <ayushi.khopkar@ittiam.com>2021-09-09 12:53:12 +0530
commita37d3df9f842e6aae13637f06e59fde75db2ad41 (patch)
treef60c25141739649136bff1aa5b8405f8e78751e5
parentf3ea9e1c94348e8a134c9f73f9aa118f450629ea (diff)
downloadplatform_hardware_interfaces-a37d3df9f842e6aae13637f06e59fde75db2ad41.tar.gz
platform_hardware_interfaces-a37d3df9f842e6aae13637f06e59fde75db2ad41.tar.bz2
platform_hardware_interfaces-a37d3df9f842e6aae13637f06e59fde75db2ad41.zip
Added cc_defaults for android.hardware.bluetooth@1.0-impl
Created a new library - android.hardware.bluetooth@1.0-impl-test, that shall be used for testing by bluetoothV1.0_fuzzer Test: Build android.hardware.bluetooth@1.0-impl Test: Build android.hardware.bluetooth@1.0-impl-test Bug: 187131546 Change-Id: If67bf4ff59fc446dfa0548ecb8f67359717f6cc9
-rw-r--r--bluetooth/1.0/default/Android.bp24
-rw-r--r--bluetooth/1.0/default/vendor_interface.cc4
2 files changed, 25 insertions, 3 deletions
diff --git a/bluetooth/1.0/default/Android.bp b/bluetooth/1.0/default/Android.bp
index ee368fd6eb..84a49cf0a7 100644
--- a/bluetooth/1.0/default/Android.bp
+++ b/bluetooth/1.0/default/Android.bp
@@ -22,9 +22,8 @@ package {
default_applicable_licenses: ["hardware_interfaces_license"],
}
-cc_library {
- name: "android.hardware.bluetooth@1.0-impl",
- defaults: ["hidl_defaults"],
+cc_defaults {
+ name: "android.hardware.bluetooth@1.0-defaults",
vendor: true,
relative_install_path: "hw",
srcs: [
@@ -47,6 +46,25 @@ cc_library {
],
}
+cc_library {
+ name: "android.hardware.bluetooth@1.0-impl",
+ defaults: [
+ "hidl_defaults",
+ "android.hardware.bluetooth@1.0-defaults",
+ ],
+}
+
+cc_library {
+ name: "android.hardware.bluetooth@1.0-impl-test",
+ defaults: [
+ "hidl_defaults",
+ "android.hardware.bluetooth@1.0-defaults",
+ ],
+ cflags: [
+ "-DBT_FUZZER",
+ ],
+}
+
cc_library_static {
name: "android.hardware.bluetooth-async",
vendor: true,
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index d809313db6..1d15dd6f11 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -27,7 +27,11 @@
#include "h4_protocol.h"
#include "mct_protocol.h"
+#ifdef BT_FUZZER
+static const char* VENDOR_LIBRARY_NAME = "libbt-vendor-fuzz.so";
+#else
static const char* VENDOR_LIBRARY_NAME = "libbt-vendor.so";
+#endif
static const char* VENDOR_LIBRARY_SYMBOL_NAME =
"BLUETOOTH_VENDOR_LIB_INTERFACE";