summaryrefslogtreecommitdiff
path: root/sysprop
diff options
context:
space:
mode:
Diffstat (limited to 'sysprop')
-rw-r--r--sysprop/Android.bp11
-rw-r--r--sysprop/exported_include/android_bluetooth_sysprop.h35
2 files changed, 46 insertions, 0 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