diff options
author | 2023-11-13 16:17:11 -0800 | |
---|---|---|
committer | 2023-11-14 15:14:17 -0800 | |
commit | 8fc34c4a4dd6505f7e7571e434291c830025a4b6 (patch) | |
tree | bf5bea66c8327b58b57cc321580168bf5c85094c /sysprop | |
parent | 928cf290c8fabf4fba347c6c142bb190452502d6 (diff) |
Sysprop: wrap usage because of Floss
Test: m Bluetooth | No-op change
Bug: 310741104
Change-Id: I95d113e90ba710d687722f846f52011950bf3f5d
Diffstat (limited to 'sysprop')
-rw-r--r-- | sysprop/Android.bp | 11 | ||||
-rw-r--r-- | sysprop/exported_include/android_bluetooth_sysprop.h | 35 |
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 |