summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysprop/Android.bp11
-rw-r--r--sysprop/exported_include/android_bluetooth_sysprop.h35
-rw-r--r--system/BUILD.gn1
-rw-r--r--system/bta/Android.bp12
-rw-r--r--system/btif/Android.bp6
-rw-r--r--system/profile/avrcp/Android.bp2
-rw-r--r--system/stack/Android.bp8
-rw-r--r--system/test/suite/Android.bp2
8 files changed, 62 insertions, 15 deletions
diff --git a/sysprop/Android.bp b/sysprop/Android.bp
index 4f848817f2..76750c9220 100644
--- a/sysprop/Android.bp
+++ b/sysprop/Android.bp
@@ -20,3 +20,14 @@ sysprop_library {
},
apex_available: ["com.android.btservices"],
}
+
+cc_library_static {
+ name: "libcom.android.sysprop.bluetooth.wrapped",
+ host_supported: true,
+ whole_static_libs: ["libcom.android.sysprop.bluetooth"],
+ export_include_dirs: ["exported_include"],
+ export_static_lib_headers: ["libcom.android.sysprop.bluetooth"],
+ visibility: ["//packages/modules/Bluetooth/system:__subpackages__"],
+ apex_available: ["com.android.btservices"],
+ min_sdk_version: "Tiramisu",
+}
diff --git a/sysprop/exported_include/android_bluetooth_sysprop.h b/sysprop/exported_include/android_bluetooth_sysprop.h
new file mode 100644
index 0000000000..3a3ccda8fe
--- /dev/null
+++ b/sysprop/exported_include/android_bluetooth_sysprop.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#ifndef TARGET_FLOSS
+
+#include <a2dp.sysprop.h>
+#include <avrcp.sysprop.h>
+#include <ble.sysprop.h>
+#include <bta.sysprop.h>
+#include <hfp.sysprop.h>
+#include <pan.sysprop.h>
+
+#define GET_SYSPROP(namespace, prop, default) \
+ android::sysprop::bluetooth::namespace ::prop().value_or(default)
+
+#else
+
+#define GET_SYSPROP(namespace, prop, default) default
+
+#endif
diff --git a/system/BUILD.gn b/system/BUILD.gn
index a28ca64bd3..02b92d245b 100644
--- a/system/BUILD.gn
+++ b/system/BUILD.gn
@@ -76,6 +76,7 @@ config("target_defaults") {
include_dirs = [
"//bt/system",
"//bt/flags/exported_include",
+ "//bt/sysprop/exported_include",
"//bt/system/linux_include",
"//bt/system/types",
"//bt/system/include",
diff --git a/system/bta/Android.bp b/system/bta/Android.bp
index 93f578c24b..3439372f87 100644
--- a/system/bta/Android.bp
+++ b/system/bta/Android.bp
@@ -139,7 +139,7 @@ cc_library_static {
"libbt-bta-core",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"liblc3",
],
shared_libs: [
@@ -202,7 +202,7 @@ cc_library_static {
"lib-bt-packets",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
],
apex_available: [
"com.android.btservices",
@@ -280,7 +280,7 @@ cc_test {
"libbtcore",
"libbtdevice",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libevent",
"libgmock",
],
@@ -336,7 +336,7 @@ cc_test {
"libbt_shim_ffi",
"libbtcore",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libgmock",
],
cflags: ["-Wno-unused-parameter"],
@@ -429,7 +429,7 @@ cc_test {
"libbtcore",
"libbtdevice",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libevent",
"libgmock",
],
@@ -1203,7 +1203,7 @@ cc_test {
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libevent",
"libgmock",
"libosi",
diff --git a/system/btif/Android.bp b/system/btif/Android.bp
index 56277c4b25..41ff9822ef 100644
--- a/system/btif/Android.bp
+++ b/system/btif/Android.bp
@@ -521,7 +521,7 @@ cc_test {
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
],
cflags: [
"-DBUILDCFG",
@@ -638,7 +638,7 @@ cc_test {
"libbtif-core",
"libc++fs",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libevent",
"libgmock",
"libstatslog_bt",
@@ -775,7 +775,7 @@ cc_test {
"libbtif-core",
"libc++fs",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libevent",
"libgmock",
"libstatslog_bt",
diff --git a/system/profile/avrcp/Android.bp b/system/profile/avrcp/Android.bp
index bd4380b4b8..34e3d1df48 100644
--- a/system/profile/avrcp/Android.bp
+++ b/system/profile/avrcp/Android.bp
@@ -31,7 +31,7 @@ cc_library_static {
"libosi",
],
whole_static_libs: [
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
],
shared_libs: [
"liblog",
diff --git a/system/stack/Android.bp b/system/stack/Android.bp
index 5f57faa8b7..ea6114872f 100644
--- a/system/stack/Android.bp
+++ b/system/stack/Android.bp
@@ -171,7 +171,7 @@ cc_library_static {
whole_static_libs: [
"libaptx_enc",
"libaptxhd_enc",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libldacBT_abr",
"libldacBT_enc",
],
@@ -324,7 +324,7 @@ cc_library_static {
"libbt-hci",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
],
shared_libs: [
"libPlatformProperties",
@@ -612,7 +612,7 @@ cc_fuzz {
target: {
android: {
static_libs: [
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
],
},
},
@@ -1548,7 +1548,7 @@ cc_test {
"libbt_shim_ffi",
"libbtdevice",
"libchrome",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libevent",
"libgmock",
"liblc3",
diff --git a/system/test/suite/Android.bp b/system/test/suite/Android.bp
index 1fd608b022..1fb71fb269 100644
--- a/system/test/suite/Android.bp
+++ b/system/test/suite/Android.bp
@@ -87,7 +87,7 @@ cc_defaults {
"libbtif",
"libbtif-core",
"libc++fs",
- "libcom.android.sysprop.bluetooth",
+ "libcom.android.sysprop.bluetooth.wrapped",
"libflatbuffers-cpp",
"libg722codec",
"libgmock",