Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d5c31fb authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "Sysprop: wrap usage because of Floss" into main

parents c9e456a0 8fc34c4a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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",
}
+35 −0
Original line number Diff line number Diff line
/*
 * 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
+1 −0
Original line number Diff line number Diff line
@@ -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",
+6 −6
Original line number Diff line number Diff line
@@ -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",
+3 −3
Original line number Diff line number Diff line
@@ -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",
Loading