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

Commit f4454a99 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[BP CLEANUP] Format bpfmt -s in remaining files." am: 4714b592

parents 99a7f72d 4714b592
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -63,15 +63,15 @@ cc_library_shared {
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/types",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/types",
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth",
        "libbluetooth_core_rs",
        "libc++fs",
        "libbluetooth_core_rs_bridge",
        "libc++fs",
    ],
    shared_libs: [
        "android.hardware.bluetooth@1.0",
@@ -97,28 +97,28 @@ cc_library {
        "packages/modules/Bluetooth/system/types",
    ],
    static_libs: [
        "libbte",
        "lib-bt-packets",
        "lib-bt-packets-base",
        "libbt-bta-core",
        "libbt-common",
        "libbtdevice",
        "libbtif-core",
        "libbt-hci",
        "libbt-stack-core",
        "libbtcore",
        "libbtdevice",
        "libbte",
        "libbtif-core",
        "libosi",
        "lib-bt-packets",
        "lib-bt-packets-base",

        "libbluetooth-types",
        "libc++fs",
    ],
    cflags: [
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",
        "-Wall",
        "-Werror",
        "-Wextra",
        "-Wno-unused-parameter",
        "-fvisibility=default",
    ],
    sanitize: {
        scs: true,
@@ -137,8 +137,8 @@ android_app {
    defaults: ["bluetooth-module-sdk-version-defaults"],

    srcs: [
        "src/**/*.java",
        ":statslog-bluetooth-java-gen",
        "src/**/*.java",
    ],
    aaptflags: [
        "--custom-package",
@@ -151,15 +151,15 @@ android_app {
    jni_uses_platform_apis: true,
    libs: [
        "app-compat-annotations",
        "error_prone_annotations",
        "framework-annotations-lib",
        "framework-bluetooth-pre-jarjar",
        "framework-statsd.stubs.module_lib",
        "framework-tethering.stubs.module_lib",
        "framework-configinfrastructure",
        "framework-connectivity.stubs.module_lib",
        "framework-mediaprovider",
        "framework-statsd.stubs.module_lib",
        "framework-tethering.stubs.module_lib",
        "unsupportedappusage",
        "framework-annotations-lib",
        "error_prone_annotations",
    ],
    static_libs: [
        "android.hardware.radio-V1.0-java",
@@ -201,11 +201,11 @@ android_app {
        proguard_flags_files: ["proguard.flags"],
    },
    required: [
        "android.hardware.bluetooth@1.0",
        "android.hardware.bluetooth@1.1",
        "android.hardware.bluetooth.audio-V3-ndk",
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
        "android.hardware.bluetooth.audio-V3-ndk",
        "android.hardware.bluetooth@1.0",
        "android.hardware.bluetooth@1.1",
    ],
    apex_available: [
        "com.android.btservices",
+68 −67
Original line number Diff line number Diff line
@@ -42,10 +42,10 @@ cc_defaults {
    cpp_std: "c++17",
    cflags: [
        "-DEXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
        "-fvisibility=hidden",
        "-DLOG_NDEBUG=1",
        "-DGOOGLE_PROTOBUF_NO_RTTI",
        "-DLOG_NDEBUG=1",
        "-Wno-unused-result",
        "-fvisibility=hidden",
    ],
    conlyflags: [
        "-std=c99",
@@ -61,8 +61,8 @@ cc_defaults {
    target: {
        glibc: {
            cflags: [
                "-fprofile-instr-generate",
                "-fcoverage-mapping",
                "-fprofile-instr-generate",
            ],
        },
    },
@@ -79,8 +79,8 @@ cc_defaults {
    target: {
        glibc: {
            ldflags: [
                "-fprofile-instr-generate",
                "-fcoverage-mapping",
                "-fprofile-instr-generate",
            ],
        },
    },
@@ -90,21 +90,21 @@ cc_defaults {
    name: "gd_clang_tidy",
    tidy: true,
    tidy_checks: [
        "clang-analyzer-core.CallAndMessage",
        "clang-analyzer-optin.cplusplus.UninitializedObject",
        "-google*",
        "-performance*",
        "-bugprone*",
        "-cert-dcl21-cpp", // warning: overloaded returns a non-constant object instead of a constant object type
        "-cert-dcl59-cpp", // warning: do not use unnamed namespaces in header files
        "-cert-oop54-cpp", // warning: operator=() does not handle self-assignment properly
        "-cert-msc50-cpp", // warning: rand() has limited randomness; use C++11 random library instead
        "-cert-msc30-c", // warning: rand() has limited randomness; use C++11 random library instead
        "-cert-msc50-cpp", // warning: rand() has limited randomness; use C++11 random library instead
        "-cert-oop54-cpp", // warning: operator=() does not handle self-assignment properly
        "-google*",
        "-performance*",
        "clang-analyzer-core.CallAndMessage",
        "clang-analyzer-optin.cplusplus.UninitializedObject",
    ],
    tidy_checks_as_errors: [
        "cppcoreguidelines-pro-type-member-init",
        "clang-analyzer-core.CallAndMessage",
        "clang-analyzer-optin.cplusplus.UninitializedObject",
        "cppcoreguidelines-pro-type-member-init",
    ],
    tidy_flags: [
        "--header-filter=^.*packages/modules/Bluetooth/system/.*.h$",
@@ -130,8 +130,8 @@ cc_defaults {
    name: "gd_clang_tidy_ignore_android",
    tidy: true,
    tidy_checks: [
        "-android-cloexec-pipe2", //  warning: 'pipe2' should use O_CLOEXEC where possible
        "-android-cloexec-accept", // warning: prefer accept4() to accept() because accept4() allows SOCK_CLOEXEC
        "-android-cloexec-pipe2", //  warning: 'pipe2' should use O_CLOEXEC where possible
        "-android-cloexec-socket", // warning: 'pipe2' should use O_CLOEXEC where possible
    ],
}
@@ -139,8 +139,8 @@ cc_defaults {
cc_defaults {
    name: "libbluetooth_gd_defaults",
    defaults: [
        "gd_defaults",
        "gd_clang_file_coverage",
        "gd_defaults",
        "libchrome_support_defaults",
    ],
    host_supported: true,
@@ -167,13 +167,13 @@ cc_defaults {
            shared_libs: [
                "android.hardware.bluetooth@1.0",
                "android.hardware.bluetooth@1.1",
                "android.system.suspend.control-V1-ndk",
                "android.system.suspend-V1-ndk",
                "android.system.suspend.control-V1-ndk",
                "libbinder_ndk",
                "libcutils",
                "libhidlbase",
                "libutils",
                "libstatslog_bt",
                "libutils",
            ],
            whole_static_libs: [
                "android.hardware.bluetooth-V1-ndk",
@@ -181,8 +181,6 @@ cc_defaults {
        },
    },
    srcs: [
        "stack_manager.cc",
        "module.cc",
        ":BluetoothAttSources",
        ":BluetoothCommonSources",
        ":BluetoothCryptoToolboxSources",
@@ -191,15 +189,17 @@ cc_defaults {
        ":BluetoothHciSources",
        ":BluetoothIsoSources",
        ":BluetoothL2capSources",
        ":BluetoothLogRedactionSources",
        ":BluetoothMetricsSources",
        ":BluetoothNeighborSources",
        ":BluetoothOsSources",
        ":BluetoothPacketSources",
        ":BluetoothShimSources",
        ":BluetoothSecuritySources",
        ":BluetoothShimSources",
        ":BluetoothStorageSources",
        ":BluetoothSyspropsSources",
        ":BluetoothLogRedactionSources",
        "module.cc",
        "stack_manager.cc",
    ],
    generated_headers: [
        "BluetoothGeneratedBundlerSchema_h_bfbs",
@@ -270,23 +270,23 @@ cc_library {
cc_binary {
    name: "bluetooth_stack_with_facade",
    defaults: [
        "gd_defaults",
        "gd_clang_coverage_bin",
        "gd_defaults",
        "libchrome_support_defaults",
    ],
    host_supported: true,
    srcs: [
        "facade/facade_main.cc",
        "facade/grpc_root_server.cc",
        "facade/read_only_property_server.cc",
        "grpc/grpc_module.cc",
        ":BluetoothFacade_hci_hal",
        ":BluetoothFacade_hci_layer",
        ":BluetoothFacade_iso_layer",
        ":BluetoothFacade_l2cap_layer",
        ":BluetoothFacade_neighbor",
        ":BluetoothFacade_iso_layer",
        ":BluetoothFacade_security_layer",
        ":BluetoothFacade_shim_layer",
        "facade/facade_main.cc",
        "facade/grpc_root_server.cc",
        "facade/read_only_property_server.cc",
        "grpc/grpc_module.cc",
    ],
    generated_headers: [
        "BlueberryFacadeGeneratedStub_h",
@@ -305,11 +305,11 @@ cc_binary {
        "libbluetooth-dumpsys",
        "libbluetooth-protos",
        "libbluetooth_gd",
        "libflatbuffers-cpp",
        "libbluetooth_rust_interop",
        "libbt_callbacks_cxx",
        "libbt_shim_bridge",
        "libbt_shim_ffi",
        "libflatbuffers-cpp",
    ],
    shared_libs: [
        "libcrypto",
@@ -325,14 +325,14 @@ cc_binary {
                "android.hardware.bluetooth@1.0",
                "android.hardware.bluetooth@1.1",
                "libbinder_ndk",
                "libhidlbase",
                "libutils",
                "libcutils",
                "libhidlbase",
                "libstatslog_bt",
                "libutils",
            ],
            static_libs: [
                "android.system.suspend.control-V1-ndk",
                "android.system.suspend-V1-ndk",
                "android.system.suspend.control-V1-ndk",
            ],
        },
        host: {
@@ -351,11 +351,11 @@ cc_test {
    name: "bluetooth_test_gd_unit",
    test_suites: ["device-tests"],
    defaults: [
        "gd_defaults",
        "bluetooth_gtest_x86_asan_workaround",
        "gd_clang_coverage_bin",
        "gd_defaults",
        "libchrome_support_defaults",
        "mts_defaults",
        "bluetooth_gtest_x86_asan_workaround",
    ],
    host_supported: true,
    // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below
@@ -369,21 +369,21 @@ cc_test {
        host: {
            srcs: [
                ":BluetoothHalTestSources_hci_host",
                ":BluetoothOsTestSources_host",
                ":BluetoothHostTestingLogCapture",
                ":BluetoothHostTestingLogCaptureTest",
                ":BluetoothOsTestSources_host",
            ],
        },
        android: {
            srcs: [
                ":BluetoothHalTestSources_hci_android_hidl",
                ":BluetoothOsTestSources_android",
                ":BluetoothAndroidTestingLogCapture",
                ":BluetoothAndroidTestingLogCaptureTest",
                ":BluetoothHalTestSources_hci_android_hidl",
                ":BluetoothOsTestSources_android",
            ],
            static_libs: [
                "android.system.suspend.control-V1-ndk",
                "android.system.suspend-V1-ndk",
                "android.system.suspend.control-V1-ndk",
                "libstatslog_bt",
            ],
            shared_libs: [
@@ -392,14 +392,13 @@ cc_test {
                "libbinder_ndk",
                "libcutils",
                "libhidlbase",
                "libutils",
                "libstatssocket",
                "libutils",
            ],
        },
    },
    srcs: [
        "module_unittest.cc",
        "stack_manager_unittest.cc",
        ":BluetoothBtaaSources_linux_generic_tests",
        ":BluetoothCommonTestSources",
        ":BluetoothCryptoToolboxTestSources",
        ":BluetoothDumpsysTestSources",
@@ -409,10 +408,11 @@ cc_test {
        ":BluetoothMetricsTestSources",
        ":BluetoothOsTestSources",
        ":BluetoothPacketTestSources",
        ":BluetoothShimTestSources",
        ":BluetoothSecurityUnitTestSources",
        ":BluetoothShimTestSources",
        ":BluetoothStorageUnitTestSources",
        ":BluetoothBtaaSources_linux_generic_tests",
        "module_unittest.cc",
        "stack_manager_unittest.cc",
    ],
    generated_headers: [
        "BluetoothGeneratedBundlerSchema_h_bfbs",
@@ -426,14 +426,15 @@ cc_test {
        "libbluetooth-dumpsys-unittest",
        "libbluetooth-protos",
        "libbluetooth_gd_unit_tests",
        "libc++fs",
        "libflatbuffers-cpp",
        "libgmock",
        "libbluetooth_rust_interop",
        "libbt-platform-protos-lite",
        "libbt_callbacks_cxx",
        "libbt_shim_bridge",
        "libbt_shim_ffi",
        "libbt-platform-protos-lite",
        "libc++fs",
        "libflatbuffers-cpp",
        "libgmock",
    ],
    shared_libs: [
        "libcrypto",
@@ -448,11 +449,11 @@ cc_test {
    name: "bluetooth_packet_parser_test",
    test_suites: ["device-tests"],
    defaults: [
        "gd_defaults",
        "bluetooth_gtest_x86_asan_workaround",
        "gd_clang_coverage_bin",
        "gd_defaults",
        "libchrome_support_defaults",
        "mts_defaults",
        "bluetooth_gtest_x86_asan_workaround",
    ],
    include_dirs: ["packages/modules/Bluetooth/system/gd"],
    host_supported: true,
@@ -460,9 +461,9 @@ cc_test {
        unit_test: true,
    },
    srcs: [
        "hci/address.cc",
        ":BluetoothPacketSources",
        ":BluetoothPacketParserTestPacketTestSources",
        ":BluetoothPacketSources",
        "hci/address.cc",
    ],
    generated_headers: [
        "BluetoothPacketParserTestPacketPdlGen_h",
@@ -482,18 +483,18 @@ cc_test {
            shared_libs: [
                "android.hardware.bluetooth@1.0",
                "android.hardware.bluetooth@1.1",
                "libcutils",
                "libhidlbase",
                "libutils",
                "libcutils",
            ],
        },
        host_linux: {
            shared_libs: [
                "android.hardware.bluetooth@1.0",
                "android.hardware.bluetooth@1.1",
                "libcutils",
                "libhidlbase",
                "libutils",
                "libcutils",
            ],
        },
    },
@@ -510,13 +511,13 @@ cc_defaults {
    static_libs: [
        "libbluetooth-protos",
        "libbluetooth_gd_fuzzing",
        "libchrome",
        "libgmock",
        "libgtest",
        "libbluetooth_rust_interop",
        "libbt_callbacks_cxx",
        "libbt_shim_bridge",
        "libbt_shim_ffi",
        "libchrome",
        "libgmock",
        "libgtest",
    ],
    host_supported: true,
    generated_headers: [
@@ -542,8 +543,8 @@ cc_defaults {
                "libbinder_ndk",
                "libcutils",
                "libhidlbase",
                "libutils",
                "libstatslog_bt",
                "libutils",
            ],
        },
    },
@@ -553,9 +554,9 @@ cc_fuzz {
    name: "bluetooth_gd_fuzz_test",
    defaults: ["gd_fuzz_defaults"],
    srcs: [
        "fuzz_test.cc",
        ":BluetoothHciFuzzTestSources",
        ":BluetoothL2capFuzzTestSources",
        "fuzz_test.cc",
    ],
    fuzz_config: {
        cc: ["android-bluetooth-security@google.com"],
@@ -567,8 +568,8 @@ cc_fuzz {
    name: "bluetooth_gd_hci_layer_fuzz_test",
    defaults: ["gd_fuzz_defaults"],
    srcs: [
        "hci/fuzz/hci_layer_fuzz_test.cc",
        ":BluetoothHalFuzzSources",
        "hci/fuzz/hci_layer_fuzz_test.cc",
    ],
}

@@ -592,8 +593,8 @@ cc_benchmark {
    ],
    host_supported: true,
    srcs: [
        "benchmark.cc",
        ":BluetoothOsBenchmarkSources",
        "benchmark.cc",
    ],
    static_libs: [
        "libbluetooth_gd",
@@ -657,9 +658,9 @@ rust_library {
    proc_macros: ["libnum_derive"],
    rustlibs: [
        "libbytes",
        "liblog_rust",
        "libnum_traits",
        "libthiserror",
        "liblog_rust",
    ],
    apex_available: [
        "com.android.btservices",
@@ -683,9 +684,9 @@ rust_test_host {
    proc_macros: ["libnum_derive"],
    rustlibs: [
        "libbytes",
        "liblog_rust",
        "libnum_traits",
        "libthiserror",
        "liblog_rust",
    ],
}

@@ -720,9 +721,9 @@ rust_test_host {
    proc_macros: ["libnum_derive"],
    rustlibs: [
        "libbytes",
        "liblog_rust",
        "libnum_traits",
        "libthiserror",
        "liblog_rust",
    ],
}

@@ -740,16 +741,16 @@ genrule {
        "hci/hci_acl_manager.fbs",
        "hci/hci_controller.fbs",
        "l2cap/classic/l2cap_classic_module.fbs",
        "shim/dumpsys.fbs",
        "os/wakelock_manager.fbs",
        "shim/dumpsys.fbs",
    ],
    out: [
        "activity_attribution.bfbs",
        "init_flags.bfbs",
        "dumpsys.bfbs",
        "dumpsys_data.bfbs",
        "hci_acl_manager.bfbs",
        "hci_controller.bfbs",
        "init_flags.bfbs",
        "l2cap_classic_module.bfbs",
        "wakelock_manager.bfbs",
    ],
@@ -768,8 +769,8 @@ genrule {
        "hci/hci_acl_manager.fbs",
        "hci/hci_controller.fbs",
        "l2cap/classic/l2cap_classic_module.fbs",
        "shim/dumpsys.fbs",
        "os/wakelock_manager.fbs",
        "shim/dumpsys.fbs",
    ],
    out: [
        "activity_attribution_generated.h",
@@ -848,9 +849,9 @@ cc_defaults {
        darwin_x86_64: {
            include_dirs: ["external/python/cpython3/android/darwin_x86_64/pyconfig"],
            cflags: [
                "-DSOABI=\"cpython-38android-x86_64-darwin\"",
                "-Wno-deprecated-declarations",
                "-Wno-pointer-arith",
                "-DSOABI=\"cpython-38android-x86_64-darwin\"",
            ],
            suffix: ".cpython-38android-x86_64-darwin",
        },
@@ -895,16 +896,16 @@ cc_defaults {
cc_library_host_shared {
    name: "bluetooth_packets_python3",
    defaults: [
        "gd_defaults",
        "bluetooth_py3_native_extension_defaults",
        "gd_defaults",
    ],
    srcs: [
        "common/strings.cc",
        "packet/python3_module.cc",
        "l2cap/fcs.cc",
        ":BluetoothPacketSources",
        "common/strings.cc",
        "hci/address.cc",
        "hci/class_of_device.cc",
        "l2cap/fcs.cc",
        "packet/python3_module.cc",

    ],
    generated_headers: [
+130 −128

File changed.

Preview size limit exceeded, changes collapsed.

+10 −10
Original line number Diff line number Diff line
@@ -13,36 +13,36 @@ cc_defaults {
    include_dirs: [
        "packages/modules/Bluetooth/system/",
        "packages/modules/Bluetooth/system/include/",
        "packages/modules/Bluetooth/system/types/",
        "packages/modules/Bluetooth/system/internal_include/",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/stack/test",
        "packages/modules/Bluetooth/system/types/",
    ],
    static_libs: [
        "libbt-stack",
        "libbt-stack-core",
        "libbte",
        "libFraunhoferAAC",
        "libbluetooth-dumpsys",
        "libbluetooth_gd",
        "libbt-audio-hal-interface",
        "libbtcore",
        "libbt-bta",
        "libbt-bta-core",
        "libbt-common",
        "libbt-hci",
        "libbt-protos-lite",
        "libbt-sbc-decoder",
        "libbt-sbc-encoder",
        "libbt-stack",
        "libbt-stack-core",
        "libbtcore",
        "libbtdevice",
        "libbte",
        "libbtif",
        "libbluetooth_core_rs",
        "libbtif-core",
        "libbt-hci",
        "libbtdevice",
        "libg722codec",
        "liblc3",
        "libopus",
        "libosi",
        "libudrv-uipc",
        "libbt-protos-lite",
        "libbluetooth-dumpsys",
        "libbluetooth_gd",
    ],
    shared_libs: [
        "libbinder",