Skip to content
Snippets Groups Projects
Commit 8fc34c4a authored by William Escande's avatar William Escande
Browse files

Sysprop: wrap usage because of Floss

Test: m Bluetooth | No-op change
Bug: 310741104
Change-Id: I95d113e90ba710d687722f846f52011950bf3f5d
parent 928cf290
No related branches found
No related tags found
No related merge requests found
...@@ -20,3 +20,14 @@ sysprop_library { ...@@ -20,3 +20,14 @@ sysprop_library {
}, },
apex_available: ["com.android.btservices"], 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",
}
/*
* 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
...@@ -76,6 +76,7 @@ config("target_defaults") { ...@@ -76,6 +76,7 @@ config("target_defaults") {
include_dirs = [ include_dirs = [
"//bt/system", "//bt/system",
"//bt/flags/exported_include", "//bt/flags/exported_include",
"//bt/sysprop/exported_include",
"//bt/system/linux_include", "//bt/system/linux_include",
"//bt/system/types", "//bt/system/types",
"//bt/system/include", "//bt/system/include",
......
...@@ -139,7 +139,7 @@ cc_library_static { ...@@ -139,7 +139,7 @@ cc_library_static {
"libbt-bta-core", "libbt-bta-core",
"libbt-platform-protos-lite", "libbt-platform-protos-lite",
"libbt_shim_bridge", "libbt_shim_bridge",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"liblc3", "liblc3",
], ],
shared_libs: [ shared_libs: [
...@@ -202,7 +202,7 @@ cc_library_static { ...@@ -202,7 +202,7 @@ cc_library_static {
"lib-bt-packets", "lib-bt-packets",
"libbt-platform-protos-lite", "libbt-platform-protos-lite",
"libbt_shim_bridge", "libbt_shim_bridge",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
], ],
apex_available: [ apex_available: [
"com.android.btservices", "com.android.btservices",
...@@ -280,7 +280,7 @@ cc_test { ...@@ -280,7 +280,7 @@ cc_test {
"libbtcore", "libbtcore",
"libbtdevice", "libbtdevice",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libevent", "libevent",
"libgmock", "libgmock",
], ],
...@@ -336,7 +336,7 @@ cc_test { ...@@ -336,7 +336,7 @@ cc_test {
"libbt_shim_ffi", "libbt_shim_ffi",
"libbtcore", "libbtcore",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libgmock", "libgmock",
], ],
cflags: ["-Wno-unused-parameter"], cflags: ["-Wno-unused-parameter"],
...@@ -429,7 +429,7 @@ cc_test { ...@@ -429,7 +429,7 @@ cc_test {
"libbtcore", "libbtcore",
"libbtdevice", "libbtdevice",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libevent", "libevent",
"libgmock", "libgmock",
], ],
...@@ -1203,7 +1203,7 @@ cc_test { ...@@ -1203,7 +1203,7 @@ cc_test {
"libbt_shim_bridge", "libbt_shim_bridge",
"libbt_shim_ffi", "libbt_shim_ffi",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libevent", "libevent",
"libgmock", "libgmock",
"libosi", "libosi",
......
...@@ -521,7 +521,7 @@ cc_test { ...@@ -521,7 +521,7 @@ cc_test {
"libbt_shim_bridge", "libbt_shim_bridge",
"libbt_shim_ffi", "libbt_shim_ffi",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
], ],
cflags: [ cflags: [
"-DBUILDCFG", "-DBUILDCFG",
...@@ -638,7 +638,7 @@ cc_test { ...@@ -638,7 +638,7 @@ cc_test {
"libbtif-core", "libbtif-core",
"libc++fs", "libc++fs",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libevent", "libevent",
"libgmock", "libgmock",
"libstatslog_bt", "libstatslog_bt",
...@@ -775,7 +775,7 @@ cc_test { ...@@ -775,7 +775,7 @@ cc_test {
"libbtif-core", "libbtif-core",
"libc++fs", "libc++fs",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libevent", "libevent",
"libgmock", "libgmock",
"libstatslog_bt", "libstatslog_bt",
......
...@@ -31,7 +31,7 @@ cc_library_static { ...@@ -31,7 +31,7 @@ cc_library_static {
"libosi", "libosi",
], ],
whole_static_libs: [ whole_static_libs: [
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
], ],
shared_libs: [ shared_libs: [
"liblog", "liblog",
......
...@@ -171,7 +171,7 @@ cc_library_static { ...@@ -171,7 +171,7 @@ cc_library_static {
whole_static_libs: [ whole_static_libs: [
"libaptx_enc", "libaptx_enc",
"libaptxhd_enc", "libaptxhd_enc",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libldacBT_abr", "libldacBT_abr",
"libldacBT_enc", "libldacBT_enc",
], ],
...@@ -324,7 +324,7 @@ cc_library_static { ...@@ -324,7 +324,7 @@ cc_library_static {
"libbt-hci", "libbt-hci",
"libbt-platform-protos-lite", "libbt-platform-protos-lite",
"libbt_shim_bridge", "libbt_shim_bridge",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
], ],
shared_libs: [ shared_libs: [
"libPlatformProperties", "libPlatformProperties",
...@@ -612,7 +612,7 @@ cc_fuzz { ...@@ -612,7 +612,7 @@ cc_fuzz {
target: { target: {
android: { android: {
static_libs: [ static_libs: [
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
], ],
}, },
}, },
...@@ -1548,7 +1548,7 @@ cc_test { ...@@ -1548,7 +1548,7 @@ cc_test {
"libbt_shim_ffi", "libbt_shim_ffi",
"libbtdevice", "libbtdevice",
"libchrome", "libchrome",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libevent", "libevent",
"libgmock", "libgmock",
"liblc3", "liblc3",
......
...@@ -87,7 +87,7 @@ cc_defaults { ...@@ -87,7 +87,7 @@ cc_defaults {
"libbtif", "libbtif",
"libbtif-core", "libbtif-core",
"libc++fs", "libc++fs",
"libcom.android.sysprop.bluetooth", "libcom.android.sysprop.bluetooth.wrapped",
"libflatbuffers-cpp", "libflatbuffers-cpp",
"libg722codec", "libg722codec",
"libgmock", "libgmock",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment