summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2023-10-24 16:32:56 -0700
committer Henri Chataing <henrichataing@google.com> 2023-10-24 17:56:33 -0700
commit8701b3aee2871d67b61bc35c8c2a51d3840cecc1 (patch)
tree63f6a2f0507782b96eea4814e4b490eb6b58fc77
parent21315a571f24bf5f10ee9ba87a142a2b3bcd6fa7 (diff)
system: Remove legacy trace_level variables
Bug: 305066880 Test: m com.android.btservices Change-Id: I67379769f13c3af24fc7d05ebd55df06c7bb3243
-rw-r--r--system/bta/av/bta_av_main.cc2
-rw-r--r--system/bta/hd/bta_hd_int.h1
-rw-r--r--system/bta/sys/bta_sys.h7
-rw-r--r--system/bta/sys/bta_sys_main.cc5
-rw-r--r--system/bta/test/bta_av_test.cc4
-rw-r--r--system/bta/test/bta_hh_test.cc3
-rw-r--r--system/btif/Android.bp1
-rw-r--r--system/btif/BUILD.gn3
-rw-r--r--system/btif/co/bta_av_co.cc2
-rw-r--r--system/btif/src/bluetooth.cc7
-rw-r--r--system/btif/src/profile_log_levels.cc142
-rw-r--r--system/btif/src/profile_log_levels.h26
-rw-r--r--system/btif/test/btif_core_test.cc3
-rw-r--r--system/btif/test/btif_hf_client_service_test.cc1
-rw-r--r--system/btif/test/btif_hh_test.cc3
-rw-r--r--system/btif/test/btif_rc_test.cc3
-rw-r--r--system/internal_include/bt_trace.h6
-rw-r--r--system/main/shim/btm_api.h12
-rw-r--r--system/main/shim/l2c_api.h12
-rw-r--r--system/stack/Android.bp1
-rw-r--r--system/stack/a2dp/a2dp_api.cc33
-rw-r--r--system/stack/a2dp/a2dp_int.h1
-rw-r--r--system/stack/acl/btm_acl.cc16
-rw-r--r--system/stack/avct/avct_api.cc31
-rw-r--r--system/stack/avct/avct_int.h1
-rw-r--r--system/stack/avdt/avdt_api.cc29
-rw-r--r--system/stack/avdt/avdt_int.h21
-rw-r--r--system/stack/avrc/avrc_int.h1
-rw-r--r--system/stack/avrc/avrc_sdp.cc33
-rw-r--r--system/stack/bnep/bnep_api.cc23
-rw-r--r--system/stack/bnep/bnep_int.h1
-rw-r--r--system/stack/btm/btm_int_types.h7
-rw-r--r--system/stack/btm/btm_sec_int_types.h6
-rw-r--r--system/stack/fuzzers/l2cap_fuzzer.cc1
-rw-r--r--system/stack/fuzzers/smp_fuzzer.cc1
-rw-r--r--system/stack/hid/hidd_api.cc20
-rw-r--r--system/stack/hid/hidd_int.h1
-rw-r--r--system/stack/hid/hidh_api.cc18
-rw-r--r--system/stack/hid/hidh_int.h1
-rw-r--r--system/stack/include/a2dp_api.h23
-rw-r--r--system/stack/include/avct_api.h23
-rw-r--r--system/stack/include/avdt_api.h23
-rw-r--r--system/stack/include/avrc_api.h23
-rw-r--r--system/stack/include/bnep_api.h12
-rw-r--r--system/stack/include/btm_api.h12
-rw-r--r--system/stack/include/hidd_api.h12
-rw-r--r--system/stack/include/hidh_api.h12
-rw-r--r--system/stack/include/l2c_api.h12
-rw-r--r--system/stack/include/pan_api.h12
-rw-r--r--system/stack/include/port_api.h12
-rw-r--r--system/stack/include/sdp_api.h12
-rw-r--r--system/stack/include/smp_api.h12
-rw-r--r--system/stack/l2cap/l2c_api.cc16
-rw-r--r--system/stack/l2cap/l2c_int.h1
-rw-r--r--system/stack/l2cap/l2c_main.cc6
-rw-r--r--system/stack/pan/pan_api.cc25
-rw-r--r--system/stack/pan/pan_int.h1
-rw-r--r--system/stack/rfcomm/port_api.cc22
-rw-r--r--system/stack/rfcomm/rfc_int.h1
-rw-r--r--system/stack/sdp/sdp_api.cc16
-rw-r--r--system/stack/sdp/sdp_db.cc4
-rw-r--r--system/stack/sdp/sdp_main.cc2
-rw-r--r--system/stack/sdp/sdpint.h1
-rw-r--r--system/stack/smp/smp_api.cc31
-rw-r--r--system/stack/smp/smp_int.h1
-rw-r--r--system/stack/smp/smp_utils.cc2
-rw-r--r--system/stack/test/btm/stack_btm_test.cc2
-rw-r--r--system/stack/test/fuzzers/a2dp/a2dpFuzzFunctions.h6
-rw-r--r--system/stack/test/fuzzers/sdp/sdpFuzzFunctions.h5
-rw-r--r--system/stack/test/fuzzers/sdp/sdpFuzzHelpers.h3
-rw-r--r--system/stack/test/rfcomm/stack_rfcomm_test.cc1
-rw-r--r--system/stack/test/sdp/stack_sdp_utils_test.cc3
-rw-r--r--system/stack/test/stack_acl_test.cc1
-rw-r--r--system/stack/test/stack_avdtp_test.cc3
-rw-r--r--system/stack/test/stack_l2cap_test.cc3
-rw-r--r--system/test/Android.bp12
-rw-r--r--system/test/common/btif_trace_level.cc20
-rw-r--r--system/test/headless/headless.cc5
-rw-r--r--system/test/headless/log.cc13
-rw-r--r--system/test/headless/log.h2
-rw-r--r--system/test/headless/scan/scan.cc2
-rw-r--r--system/test/mock/mock_a2dp_api.cc4
-rw-r--r--system/test/mock/mock_stack_a2dp_api.cc4
-rw-r--r--system/test/mock/mock_stack_acl.cc5
-rw-r--r--system/test/mock/mock_stack_acl.h9
-rw-r--r--system/test/mock/mock_stack_avct_api.cc4
-rw-r--r--system/test/mock/mock_stack_avdt_api.cc4
-rw-r--r--system/test/mock/mock_stack_avrc_sdp.cc6
-rw-r--r--system/test/mock/mock_stack_avrc_sdp.h11
-rw-r--r--system/test/mock/mock_stack_bnep_api.cc4
-rw-r--r--system/test/mock/mock_stack_hidd_api.cc4
-rw-r--r--system/test/mock/mock_stack_hidh.cc4
-rw-r--r--system/test/mock/mock_stack_l2cap_api.cc5
-rw-r--r--system/test/mock/mock_stack_l2cap_api.h9
-rw-r--r--system/test/mock/mock_stack_pan_api.cc5
-rw-r--r--system/test/mock/mock_stack_pan_api.h9
-rw-r--r--system/test/mock/mock_stack_rfcomm_port_api.cc4
-rw-r--r--system/test/mock/mock_stack_sdp_api.cc6
-rw-r--r--system/test/mock/mock_stack_sdp_api.h9
-rw-r--r--system/test/mock/mock_stack_smp_api.cc4
-rw-r--r--system/test/stub/legacy_trace.cc31
101 files changed, 4 insertions, 1036 deletions
diff --git a/system/bta/av/bta_av_main.cc b/system/bta/av/bta_av_main.cc
index f409317000..3cd1a6b195 100644
--- a/system/bta/av/bta_av_main.cc
+++ b/system/bta/av/bta_av_main.cc
@@ -1524,8 +1524,6 @@ const char* bta_av_evt_code(uint16_t evt_code) {
}
void bta_debug_av_dump(int fd) {
- if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return;
-
dprintf(fd, "\nBTA AV State:\n");
dprintf(fd, " State Machine State: %s\n", bta_av_st_code(bta_av_cb.state));
dprintf(fd, " SDP A2DP source handle: %d\n", bta_av_cb.sdp_a2dp_handle);
diff --git a/system/bta/hd/bta_hd_int.h b/system/bta/hd/bta_hd_int.h
index db8070debf..ae0ead6d01 100644
--- a/system/bta/hd/bta_hd_int.h
+++ b/system/bta/hd/bta_hd_int.h
@@ -137,7 +137,6 @@ typedef struct {
typedef struct {
tBTA_HD_CBACK* p_cback;
uint32_t sdp_handle;
- uint8_t trace_level;
uint8_t state;
RawAddress bd_addr;
bool use_report_id;
diff --git a/system/bta/sys/bta_sys.h b/system/bta/sys/bta_sys.h
index 70f65c53b1..211d719087 100644
--- a/system/bta/sys/bta_sys.h
+++ b/system/bta/sys/bta_sys.h
@@ -225,13 +225,6 @@ typedef struct {
} tBTA_SYS_REG;
/*****************************************************************************
- * Global data
- ****************************************************************************/
-
-/* trace level */
-extern uint8_t appl_trace_level;
-
-/*****************************************************************************
* Macros
****************************************************************************/
/* Calculate start of event enumeration; id is top 8 bits of event */
diff --git a/system/bta/sys/bta_sys_main.cc b/system/bta/sys/bta_sys_main.cc
index 35807dddfd..5dcfd45cbc 100644
--- a/system/bta/sys/bta_sys_main.cc
+++ b/system/bta/sys/bta_sys_main.cc
@@ -45,11 +45,6 @@ void BTIF_dm_on_hw_error();
/* system manager control block definition */
tBTA_SYS_CB bta_sys_cb;
-/* trace level */
-/* TODO Hard-coded trace levels - Needs to be configurable */
-uint8_t appl_trace_level = APPL_INITIAL_TRACE_LEVEL;
-uint8_t btif_trace_level = BT_TRACE_LEVEL_WARNING;
-
/*******************************************************************************
*
* Function bta_sys_init
diff --git a/system/bta/test/bta_av_test.cc b/system/bta/test/bta_av_test.cc
index dcc34bab3b..45694bcefe 100644
--- a/system/bta/test/bta_av_test.cc
+++ b/system/bta/test/bta_av_test.cc
@@ -51,17 +51,13 @@ struct alarm_t {
int any_value;
};
-extern uint8_t appl_trace_level;
-
class BtaAvTest : public testing::Test {
protected:
void SetUp() override {
reset_mock_function_count_map();
bluetooth::common::InitFlags::SetAllForTesting();
- appl_trace_level = BT_TRACE_LEVEL_VERBOSE;
}
void TearDown() override {
- LOG_INFO("appl_trace_level:%hhu", appl_trace_level);
}
};
diff --git a/system/bta/test/bta_hh_test.cc b/system/bta/test/bta_hh_test.cc
index 618f56507b..b9b2b552c1 100644
--- a/system/bta/test/bta_hh_test.cc
+++ b/system/bta/test/bta_hh_test.cc
@@ -25,9 +25,6 @@
#include "test/common/mock_functions.h"
#include "test/mock/mock_osi_allocator.h"
-uint8_t appl_trace_level = 0;
-uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
-
namespace {
std::array<uint8_t, 32> data32 = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
diff --git a/system/btif/Android.bp b/system/btif/Android.bp
index fd797ae26f..afc4b57a94 100644
--- a/system/btif/Android.bp
+++ b/system/btif/Android.bp
@@ -118,7 +118,6 @@ cc_library_static {
"src/btif_profile_storage.cc",
"src/btif_rc.cc",
"src/btif_vc.cc",
- "src/profile_log_levels.cc",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
diff --git a/system/btif/BUILD.gn b/system/btif/BUILD.gn
index 87d19502cd..466ef9476e 100644
--- a/system/btif/BUILD.gn
+++ b/system/btif/BUILD.gn
@@ -33,9 +33,6 @@ static_library("btif") {
# HAL layer
"src/bluetooth.cc",
- # Initializing core library
- "src/profile_log_levels.cc",
-
# BTIF implementation
"src/btif_a2dp.cc",
diff --git a/system/btif/co/bta_av_co.cc b/system/btif/co/bta_av_co.cc
index c620ba922c..b1d672e877 100644
--- a/system/btif/co/bta_av_co.cc
+++ b/system/btif/co/bta_av_co.cc
@@ -1736,8 +1736,6 @@ void BtaAvCo::DebugDump(int fd) {
}
}
- if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return;
-
dprintf(fd, "\nA2DP Peers State:\n");
dprintf(fd, " Active peer: %s\n",
(active_peer_ != nullptr)
diff --git a/system/btif/src/bluetooth.cc b/system/btif/src/bluetooth.cc
index fb0ac35ea7..a09eba551e 100644
--- a/system/btif/src/bluetooth.cc
+++ b/system/btif/src/bluetooth.cc
@@ -98,7 +98,6 @@
#include "osi/include/osi.h"
#include "osi/include/stack_power_telemetry.h"
#include "osi/include/wakelock.h"
-#include "profile_log_levels.h"
#include "stack/btm/btm_sco_hfp_hal.h"
#include "stack/gatt/connection_manager.h"
#include "stack/include/a2dp_api.h"
@@ -460,12 +459,6 @@ static void start_profiles() {
HID_HostInit();
#endif
bta_ar_init();
-
- // initialize profile-specific logging levels
- const auto stack_config = stack_config_get_interface();
- if (stack_config->get_trace_config_enabled()) {
- load_levels_from_config(stack_config->get_all());
- }
}
static void stop_profiles() {
diff --git a/system/btif/src/profile_log_levels.cc b/system/btif/src/profile_log_levels.cc
deleted file mode 100644
index e829aa2d9e..0000000000
--- a/system/btif/src/profile_log_levels.cc
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2022 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.
- */
-
-#define LOG_TAG "bt_bte"
-
-#include <base/logging.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include "a2dp_api.h"
-#include "avdt_api.h"
-#include "avrc_api.h"
-#include "bta_api.h"
-#include "btm_api.h"
-#include "l2c_api.h"
-#include "osi/include/config.h"
-#include "osi/include/log.h"
-#include "port_api.h"
-#include "sdp_api.h"
-#include "stack_config.h"
-#if (BNEP_INCLUDED == TRUE)
-#include "bnep_api.h"
-#endif
-#if (PAN_INCLUDED == TRUE)
-#include "pan_api.h"
-#endif
-#if (HID_HOST_INCLUDED == TRUE)
-#include "hidh_api.h"
-#endif
-#if (HID_DEV_INCLUDED == TRUE)
-#include "hidd_api.h"
-#endif
-
-#include "gd/common/init_flags.h"
-#include "smp_api.h"
-
-#ifndef DEFAULT_CONF_TRACE_LEVEL
-#define DEFAULT_CONF_TRACE_LEVEL BT_TRACE_LEVEL_WARNING
-#endif
-
-static uint8_t BTAPP_SetTraceLevel(uint8_t new_level);
-static uint8_t BTIF_SetTraceLevel(uint8_t new_level);
-static uint8_t BTU_SetTraceLevel(uint8_t new_level) { return new_level; }
-
-/* make sure list is order by increasing layer id!!! */
-static tBTTRC_FUNC_MAP bttrc_set_level_map[] = {
- {BTTRC_ID_STK_BTU, BTTRC_ID_STK_HCI, BTU_SetTraceLevel, "TRC_HCI",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_L2CAP, BTTRC_ID_STK_L2CAP, L2CA_SetTraceLevel, "TRC_L2CAP",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_RFCOMM, BTTRC_ID_STK_RFCOMM_DATA, PORT_SetTraceLevel,
- "TRC_RFCOMM", DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_AVCT, BTTRC_ID_STK_AVCT, AVCT_SetTraceLevel, "TRC_AVCT",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_AVDT, BTTRC_ID_STK_AVDT, AVDT_SetTraceLevel, "TRC_AVDT",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_AVRC, BTTRC_ID_STK_AVRC, AVRC_SetTraceLevel, "TRC_AVRC",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_A2DP, BTTRC_ID_STK_A2DP, A2DP_SetTraceLevel, "TRC_A2D",
- DEFAULT_CONF_TRACE_LEVEL},
-#if (BNEP_INCLUDED == TRUE)
- {BTTRC_ID_STK_BNEP, BTTRC_ID_STK_BNEP, BNEP_SetTraceLevel, "TRC_BNEP",
- DEFAULT_CONF_TRACE_LEVEL},
-#endif
- {BTTRC_ID_STK_BTM_ACL, BTTRC_ID_STK_BTM_SEC, BTM_SetTraceLevel, "TRC_BTM",
- DEFAULT_CONF_TRACE_LEVEL},
-#if (HID_HOST_INCLUDED == TRUE)
- {BTTRC_ID_STK_HID, BTTRC_ID_STK_HID, HID_HostSetTraceLevel, "TRC_HID_HOST",
- DEFAULT_CONF_TRACE_LEVEL},
-#endif
-#if (PAN_INCLUDED == TRUE)
- {BTTRC_ID_STK_PAN, BTTRC_ID_STK_PAN, PAN_SetTraceLevel, "TRC_PAN",
- DEFAULT_CONF_TRACE_LEVEL},
-#endif
- {BTTRC_ID_STK_SDP, BTTRC_ID_STK_SDP, SDP_SetTraceLevel, "TRC_SDP",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_STK_SMP, BTTRC_ID_STK_SMP, SMP_SetTraceLevel, "TRC_SMP",
- DEFAULT_CONF_TRACE_LEVEL},
-#if (HID_DEV_INCLUDED == TRUE)
- {BTTRC_ID_STK_HIDD, BTTRC_ID_STK_HIDD, HID_DevSetTraceLevel, "TRC_HID_DEV",
- DEFAULT_CONF_TRACE_LEVEL},
-#endif
-
- /* LayerIDs for BTA, currently everything maps onto appl_trace_level.
- */
- {BTTRC_ID_BTA_ACC, BTTRC_ID_BTAPP, BTAPP_SetTraceLevel, "TRC_BTAPP",
- DEFAULT_CONF_TRACE_LEVEL},
- {BTTRC_ID_BTA_ACC, BTTRC_ID_BTAPP, BTIF_SetTraceLevel, "TRC_BTIF",
- DEFAULT_CONF_TRACE_LEVEL},
-
- {0, 0, NULL, NULL, DEFAULT_CONF_TRACE_LEVEL}};
-
-/* this function should go into BTAPP_DM for example */
-static uint8_t BTAPP_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) appl_trace_level = new_level;
-
- return appl_trace_level;
-}
-
-static uint8_t BTIF_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) btif_trace_level = new_level;
-
- return btif_trace_level;
-}
-
-void load_levels_from_config(const config_t* config) {
- CHECK(config != NULL);
-
- for (tBTTRC_FUNC_MAP* functions = &bttrc_set_level_map[0];
- functions->trc_name; ++functions) {
- int value = config_get_int(*config, CONFIG_DEFAULT_SECTION,
- functions->trc_name, -1);
- if (value != -1) {
- functions->trace_level = value;
- }
- if (bluetooth::common::InitFlags::GetDefaultLogLevel() >= LOG_TAG_VERBOSE) {
- LOG_INFO("Enable logging for %s because all debug logs are enabled",
- functions->trc_name);
- functions->trace_level = BT_TRACE_LEVEL_VERBOSE;
- }
- LOG_INFO("BTE_InitTraceLevels -- %s : Level %d", functions->trc_name,
- functions->trace_level);
- if (functions->p_f) functions->p_f(functions->trace_level);
- }
-}
diff --git a/system/btif/src/profile_log_levels.h b/system/btif/src/profile_log_levels.h
deleted file mode 100644
index 6084be41b3..0000000000
--- a/system/btif/src/profile_log_levels.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2022 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
-
-#include "osi/include/config.h"
-
-/*
- Sets log levels for each profile based on bt_stack.conf, and the
- INIT_logging_debug_enabled_for_all flag. Only the latter can be (easily)
- changed at runtime.
-*/
-void load_levels_from_config(const config_t* config);
diff --git a/system/btif/test/btif_core_test.cc b/system/btif/test/btif_core_test.cc
index 94f8c0dc02..c60cfb3aa3 100644
--- a/system/btif/test/btif_core_test.cc
+++ b/system/btif/test/btif_core_test.cc
@@ -37,9 +37,6 @@
void set_hal_cbacks(bt_callbacks_t* callbacks);
-uint8_t appl_trace_level = BT_TRACE_LEVEL_DEBUG;
-uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
-
const tBTA_AG_RES_DATA tBTA_AG_RES_DATA::kEmpty = {};
module_t bt_utils_module;
diff --git a/system/btif/test/btif_hf_client_service_test.cc b/system/btif/test/btif_hf_client_service_test.cc
index 2798bf17fe..f5e562ac21 100644
--- a/system/btif/test/btif_hf_client_service_test.cc
+++ b/system/btif/test/btif_hf_client_service_test.cc
@@ -39,7 +39,6 @@ int get_default_hf_client_features() {
#endif
}
-uint8_t btif_trace_level = BT_TRACE_LEVEL_WARNING;
tBTA_STATUS BTA_HfClientEnable(tBTA_HF_CLIENT_CBACK* p_cback,
tBTA_HF_CLIENT_FEAT features,
const char* p_service_name) {
diff --git a/system/btif/test/btif_hh_test.cc b/system/btif/test/btif_hh_test.cc
index b7d5e1ae2c..9650f9df97 100644
--- a/system/btif/test/btif_hh_test.cc
+++ b/system/btif/test/btif_hh_test.cc
@@ -39,9 +39,6 @@ using namespace std::chrono_literals;
void set_hal_cbacks(bt_callbacks_t* callbacks);
-uint8_t appl_trace_level = BT_TRACE_LEVEL_DEBUG;
-uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
-
module_t bt_utils_module;
module_t gd_controller_module;
module_t gd_shim_module;
diff --git a/system/btif/test/btif_rc_test.cc b/system/btif/test/btif_rc_test.cc
index d986a256dd..b45581ceb7 100644
--- a/system/btif/test/btif_rc_test.cc
+++ b/system/btif/test/btif_rc_test.cc
@@ -82,9 +82,6 @@ int AVRC_BldResponse_ = 0;
int AVRC_BldCmd_ = 0;
} // namespace
-uint8_t appl_trace_level = BT_TRACE_LEVEL_WARNING;
-uint8_t btif_trace_level = BT_TRACE_LEVEL_WARNING;
-
const RawAddress kDeviceAddress({0x11, 0x22, 0x33, 0x44, 0x55, 0x66});
bool avrcp_absolute_volume_is_enabled() { return true; }
diff --git a/system/internal_include/bt_trace.h b/system/internal_include/bt_trace.h
index 18aeac7f0d..0fcb65fd1b 100644
--- a/system/internal_include/bt_trace.h
+++ b/system/internal_include/bt_trace.h
@@ -250,8 +250,6 @@ static const char BTE_LOGMSG_MODULE[] = "bte_logmsg_module";
#define SMP_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_WARNING
#endif
-extern uint8_t btif_trace_level;
-
typedef uint8_t tBTTRC_LAYER_ID;
typedef uint8_t(tBTTRC_SET_TRACE_LEVEL)(uint8_t);
@@ -263,10 +261,6 @@ typedef struct {
uint8_t trace_level;
} tBTTRC_FUNC_MAP;
-/* External declaration for appl_trace_level here to avoid to add the
- * declaration in all the files using APPL_TRACExxx macros */
-extern uint8_t appl_trace_level;
-
#ifdef __cplusplus
}
#endif
diff --git a/system/main/shim/btm_api.h b/system/main/shim/btm_api.h
index 1899c1b0af..e2831fefff 100644
--- a/system/main/shim/btm_api.h
+++ b/system/main/shim/btm_api.h
@@ -835,18 +835,6 @@ void BTM_VendorSpecificCommand(uint16_t opcode, uint8_t param_len,
/*******************************************************************************
*
- * Function BTM_SetTraceLevel
- *
- * Description This function sets the trace level for BTM. If called with
- * a value of 0xFF, it simply returns the current trace level.
- *
- * Returns The new or current trace level
- *
- ******************************************************************************/
-uint8_t BTM_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
- *
* Function BTM_WritePageTimeout
*
* Description Send HCI Wite Page Timeout.
diff --git a/system/main/shim/l2c_api.h b/system/main/shim/l2c_api.h
index 5e74daf9dd..884582c550 100644
--- a/system/main/shim/l2c_api.h
+++ b/system/main/shim/l2c_api.h
@@ -258,18 +258,6 @@ bool L2CA_SetIdleTimeoutByBdAddr(const RawAddress& bd_addr, uint16_t timeout,
/*******************************************************************************
*
- * Function L2CA_SetTraceLevel
- *
- * Description This function sets the trace level for L2CAP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t L2CA_SetTraceLevel(uint8_t trace_level);
-
-/*******************************************************************************
- *
* Function L2CA_FlushChannel
*
* Description This function flushes none, some or all buffers queued up
diff --git a/system/stack/Android.bp b/system/stack/Android.bp
index 3c29221e92..956e407401 100644
--- a/system/stack/Android.bp
+++ b/system/stack/Android.bp
@@ -1663,7 +1663,6 @@ cc_test {
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSdp",
- ":TestStubLegacyTrace",
"hid/hidd_api.cc",
"hid/hidd_conn.cc",
"hid/hidh_api.cc",
diff --git a/system/stack/a2dp/a2dp_api.cc b/system/stack/a2dp/a2dp_api.cc
index 13d9e6ae8c..90040d93d4 100644
--- a/system/stack/a2dp/a2dp_api.cc
+++ b/system/stack/a2dp/a2dp_api.cc
@@ -339,33 +339,6 @@ tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, const RawAddress& bd_addr,
}
/******************************************************************************
- *
- * Function A2DP_SetTraceLevel
- *
- * Description Sets the trace level for A2D. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the A2DP tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t A2DP_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) a2dp_cb.trace_level = new_level;
-
- return (a2dp_cb.trace_level);
-}
-
-/******************************************************************************
* Function A2DP_BitsSet
*
* Description Check the given num for the number of bits set
@@ -395,12 +368,6 @@ void A2DP_Init(void) {
memset(&a2dp_cb, 0, sizeof(tA2DP_CB));
a2dp_cb.avdt_sdp_ver = AVDT_VERSION;
-
-#if defined(A2DP_INITIAL_TRACE_LEVEL)
- a2dp_cb.trace_level = A2DP_INITIAL_TRACE_LEVEL;
-#else
- a2dp_cb.trace_level = BT_TRACE_LEVEL_NONE;
-#endif
}
uint16_t A2DP_GetAvdtpVersion() { return a2dp_cb.avdt_sdp_ver; }
diff --git a/system/stack/a2dp/a2dp_int.h b/system/stack/a2dp/a2dp_int.h
index 0a718e195e..fd0e2bf655 100644
--- a/system/stack/a2dp/a2dp_int.h
+++ b/system/stack/a2dp/a2dp_int.h
@@ -50,7 +50,6 @@ typedef struct {
typedef struct {
tA2DP_FIND_CB find; /* find service control block */
- uint8_t trace_level;
uint16_t avdt_sdp_ver; /* AVDTP version */
} tA2DP_CB;
diff --git a/system/stack/acl/btm_acl.cc b/system/stack/acl/btm_acl.cc
index fb26469539..128d5b419a 100644
--- a/system/stack/acl/btm_acl.cc
+++ b/system/stack/acl/btm_acl.cc
@@ -2167,22 +2167,6 @@ tBTM_STATUS btm_remove_acl(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
return BTM_SUCCESS;
}
-/*******************************************************************************
- *
- * Function BTM_SetTraceLevel
- *
- * Description This function sets the trace level for BTM. If called with
- * a value of 0xFF, it simply returns the current trace level.
- *
- * Returns The new or current trace level
- *
- ******************************************************************************/
-uint8_t BTM_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) btm_cb.trace_level = new_level;
-
- return (btm_cb.trace_level);
-}
-
void btm_cont_rswitch_from_handle(uint16_t hci_handle) {
tACL_CONN* p = internal_.acl_get_connection_from_handle(hci_handle);
if (p == nullptr) {
diff --git a/system/stack/avct/avct_api.cc b/system/stack/avct/avct_api.cc
index fa2d335ac0..5c1d629098 100644
--- a/system/stack/avct/avct_api.cc
+++ b/system/stack/avct/avct_api.cc
@@ -41,7 +41,6 @@
/* Control block for AVCT */
tAVCT_CB avct_cb;
-uint8_t avct_trace_level = AVCT_INITIAL_TRACE_LEVEL;
/*******************************************************************************
*
@@ -74,8 +73,6 @@ void AVCT_Register() {
L2CA_Register2(AVCT_BR_PSM, avct_l2c_br_appl, true /*enable_snoop*/,
&ertm_info, kAvrcBrMtu, AVCT_MIN_BROWSE_MTU,
BTA_SEC_AUTHENTICATE);
-
- avct_cb.trace_level = avct_trace_level;
}
/*******************************************************************************
@@ -424,31 +421,3 @@ uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg) {
}
return result;
}
-
-/******************************************************************************
- *
- * Function AVCT_SetTraceLevel
- *
- * Description Sets the trace level for AVCT. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the AVCT tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t AVCT_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) {
- avct_cb.trace_level = avct_trace_level = new_level;
- }
- return avct_trace_level;
-}
diff --git a/system/stack/avct/avct_int.h b/system/stack/avct/avct_int.h
index d9fab428fe..a495e96d97 100644
--- a/system/stack/avct/avct_int.h
+++ b/system/stack/avct/avct_int.h
@@ -133,7 +133,6 @@ typedef struct {
tAVCT_LCB lcb[AVCT_NUM_LINKS]; /* link control blocks */
tAVCT_BCB bcb[AVCT_NUM_LINKS]; /* browse control blocks */
tAVCT_CCB ccb[AVCT_NUM_CONN]; /* connection control blocks */
- uint8_t trace_level; /* trace level */
} tAVCT_CB;
/*****************************************************************************
diff --git a/system/stack/avdt/avdt_api.cc b/system/stack/avdt/avdt_api.cc
index 8fcba62ede..04016e3fd0 100644
--- a/system/stack/avdt/avdt_api.cc
+++ b/system/stack/avdt/avdt_api.cc
@@ -995,36 +995,7 @@ uint16_t AVDT_GetL2CapChannel(uint8_t handle) {
return (lcid);
}
-/******************************************************************************
- *
- * Function AVDT_SetTraceLevel
- *
- * Description Sets the trace level for AVDT. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the AVDT tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t AVDT_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) avdtp_cb.SetTraceLevel(new_level);
-
- return avdtp_cb.TraceLevel();
-}
-
void stack_debug_avdtp_api_dump(int fd) {
- if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return;
-
dprintf(fd, "\nAVDTP Stack State:\n");
dprintf(fd, " AVDTP signalling L2CAP channel MTU: %d\n",
avdtp_cb.rcb.ctrl_mtu);
diff --git a/system/stack/avdt/avdt_int.h b/system/stack/avdt/avdt_int.h
index acfc89d9ee..a3f949d139 100644
--- a/system/stack/avdt/avdt_int.h
+++ b/system/stack/avdt/avdt_int.h
@@ -735,8 +735,7 @@ class AvdtpCb {
: p_conf_cback(nullptr),
p_ccb_act(nullptr),
p_scb_act(nullptr),
- p_conn_cback(nullptr),
- trace_level_(0) {}
+ p_conn_cback(nullptr) {}
void Reset() {
rcb.Reset();
@@ -748,7 +747,6 @@ class AvdtpCb {
p_ccb_act = nullptr;
p_scb_act = nullptr;
p_conn_cback = nullptr;
- trace_level_ = 0;
}
AvdtpRcb rcb; // Registration control block
@@ -780,23 +778,6 @@ class AvdtpCb {
}
return 0; // Not found
}
-
- /**
- * Get the current trace level used for logging.
- *
- * @return the current trace level
- */
- uint8_t TraceLevel() const { return trace_level_; }
-
- /**
- * Set the current trace level used for logging.
- *
- * @param trace_level the trace level to set. Should be in the range [1, 6].
- */
- void SetTraceLevel(uint8_t trace_level) { trace_level_ = trace_level; }
-
- private:
- uint8_t trace_level_; /* trace level */
};
/*****************************************************************************
diff --git a/system/stack/avrc/avrc_int.h b/system/stack/avrc/avrc_int.h
index fd30965f4c..5582f05c8a 100644
--- a/system/stack/avrc/avrc_int.h
+++ b/system/stack/avrc/avrc_int.h
@@ -151,7 +151,6 @@ typedef struct {
tAVRC_FIND_CBACK find_cback; /* sdp discovery callback */
tSDP_DISCOVERY_DB* p_db; /* pointer to discovery database */
uint16_t service_uuid; /* service UUID to search */
- uint8_t trace_level;
} tAVRC_CB;
/******************************************************************************
diff --git a/system/stack/avrc/avrc_sdp.cc b/system/stack/avrc/avrc_sdp.cc
index 8f1428677a..18065390a3 100644
--- a/system/stack/avrc/avrc_sdp.cc
+++ b/system/stack/avrc/avrc_sdp.cc
@@ -370,33 +370,6 @@ uint16_t AVRC_RemoveRecord(uint32_t sdp_handle) {
return (result ? AVRC_SUCCESS : AVRC_FAIL);
}
-/******************************************************************************
- *
- * Function AVRC_SetTraceLevel
- *
- * Description Sets the trace level for AVRC. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the AVRC tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t AVRC_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) avrc_cb.trace_level = new_level;
-
- return (avrc_cb.trace_level);
-}
-
/*******************************************************************************
*
* Function AVRC_Init
@@ -410,10 +383,4 @@ uint8_t AVRC_SetTraceLevel(uint8_t new_level) {
******************************************************************************/
void AVRC_Init(void) {
memset(&avrc_cb, 0, sizeof(tAVRC_CB));
-
-#if defined(AVRC_INITIAL_TRACE_LEVEL)
- avrc_cb.trace_level = AVRC_INITIAL_TRACE_LEVEL;
-#else
- avrc_cb.trace_level = BT_TRACE_LEVEL_NONE;
-#endif
}
diff --git a/system/stack/bnep/bnep_api.cc b/system/stack/bnep/bnep_api.cc
index cd0d266006..39fadd4a1f 100644
--- a/system/stack/bnep/bnep_api.cc
+++ b/system/stack/bnep/bnep_api.cc
@@ -51,12 +51,6 @@ using bluetooth::Uuid;
******************************************************************************/
void BNEP_Init(void) {
memset(&bnep_cb, 0, sizeof(tBNEP_CB));
-
-#if defined(BNEP_INITIAL_TRACE_LEVEL)
- bnep_cb.trace_level = BNEP_INITIAL_TRACE_LEVEL;
-#else
- bnep_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
}
/*******************************************************************************
@@ -636,20 +630,3 @@ tBNEP_RESULT BNEP_SetMulticastFilters(uint16_t handle, uint16_t num_filters,
return (BNEP_SUCCESS);
}
-
-/*******************************************************************************
- *
- * Function BNEP_SetTraceLevel
- *
- * Description This function sets the trace level for BNEP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t BNEP_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) bnep_cb.trace_level = new_level;
-
- return (bnep_cb.trace_level);
-}
-
diff --git a/system/stack/bnep/bnep_int.h b/system/stack/bnep/bnep_int.h
index 1e8d61e918..9205f901f3 100644
--- a/system/stack/bnep/bnep_int.h
+++ b/system/stack/bnep/bnep_int.h
@@ -154,7 +154,6 @@ typedef struct {
tL2CAP_APPL_INFO reg_info;
bool profile_registered; /* true when we got our BD addr */
- uint8_t trace_level;
} tBNEP_CB;
diff --git a/system/stack/btm/btm_int_types.h b/system/stack/btm/btm_int_types.h
index 652de66713..b2a38f4775 100644
--- a/system/stack/btm/btm_int_types.h
+++ b/system/stack/btm/btm_int_types.h
@@ -156,7 +156,6 @@ typedef struct tBTM_CB {
uint16_t disc_handle{0}; /* for legacy devices */
uint8_t disc_reason{0}; /* for legacy devices */
- uint8_t trace_level;
bool is_inquiry{false}; /* true, if inquiry is in progess */
fixed_queue_t* sec_pending_q{nullptr}; /* pending sequrity requests in
@@ -195,12 +194,6 @@ typedef struct tBTM_CB {
acl_cb_ = {};
neighbor = {};
-#if defined(BTM_INITIAL_TRACE_LEVEL)
- trace_level = BTM_INITIAL_TRACE_LEVEL;
-#else
- trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
-
/* Initialize BTM component structures */
btm_inq_vars.Init(); /* Inquiry Database and Structures */
sco_cb.Init(); /* SCO Database and Structures (If included) */
diff --git a/system/stack/btm/btm_sec_int_types.h b/system/stack/btm/btm_sec_int_types.h
index 4a5ab037f9..5fdc4df5f0 100644
--- a/system/stack/btm/btm_sec_int_types.h
+++ b/system/stack/btm/btm_sec_int_types.h
@@ -177,7 +177,6 @@ typedef struct tBTM_SEC_CB {
RawAddress connecting_bda;
DEV_CLASS connecting_dc;
- uint8_t trace_level;
fixed_queue_t* sec_pending_q{nullptr}; /* pending sequrity requests in
tBTM_SEC_QUEUE_ENTRY format */
@@ -199,11 +198,6 @@ typedef struct tBTM_SEC_CB {
pairing_timer = alarm_new("btm.pairing_timer");
execution_wait_timer = alarm_new("btm.execution_wait_timer");
-#if defined(BTM_INITIAL_TRACE_LEVEL)
- trace_level = BTM_INITIAL_TRACE_LEVEL;
-#else
- trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
security_mode = initial_security_mode;
pairing_bda = RawAddress::kAny;
sec_dev_rec = list_new([](void* ptr) {
diff --git a/system/stack/fuzzers/l2cap_fuzzer.cc b/system/stack/fuzzers/l2cap_fuzzer.cc
index 0e30305e52..01d7d7de30 100644
--- a/system/stack/fuzzers/l2cap_fuzzer.cc
+++ b/system/stack/fuzzers/l2cap_fuzzer.cc
@@ -46,7 +46,6 @@ static void ConsumeData(const uint8_t* data, size_t size) {
}
tBTM_CB btm_cb;
-uint8_t appl_trace_level;
bt_status_t do_in_main_thread(base::Location const&,
base::OnceCallback<void()>) {
diff --git a/system/stack/fuzzers/smp_fuzzer.cc b/system/stack/fuzzers/smp_fuzzer.cc
index 076bf8dae1..6a23254f45 100644
--- a/system/stack/fuzzers/smp_fuzzer.cc
+++ b/system/stack/fuzzers/smp_fuzzer.cc
@@ -178,7 +178,6 @@ void Fuzz(const uint8_t* data, size_t size) {
SMP_Init(BTM_SEC_MODE_SP);
SMP_Register(smp_callback);
- SMP_SetTraceLevel(BT_TRACE_LEVEL_DEBUG);
SMP_ClearLocScOobData();
auto is_br = fdp.ConsumeBool();
diff --git a/system/stack/hid/hidd_api.cc b/system/stack/hid/hidd_api.cc
index c4ddf21c3d..1bf08f77bf 100644
--- a/system/stack/hid/hidd_api.cc
+++ b/system/stack/hid/hidd_api.cc
@@ -57,29 +57,9 @@ tHID_DEV_CTB hd_cb;
*
******************************************************************************/
void HID_DevInit(void) {
- uint8_t log_level = hd_cb.trace_level;
-
LOG_VERBOSE("%s", __func__);
memset(&hd_cb, 0, sizeof(tHID_DEV_CTB));
- hd_cb.trace_level = log_level;
-}
-
-/*******************************************************************************
- *
- * Function HID_DevSetTraceLevel
- *
- * Description This function sets the trace level for HID Dev. If called
-*with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t HID_DevSetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) hd_cb.trace_level = new_level;
-
- return (hd_cb.trace_level);
}
/*******************************************************************************
diff --git a/system/stack/hid/hidd_int.h b/system/stack/hid/hidd_int.h
index b647853e72..2d862afcdf 100644
--- a/system/stack/hid/hidd_int.h
+++ b/system/stack/hid/hidd_int.h
@@ -60,7 +60,6 @@ typedef struct dev_ctb {
FLOW_SPEC in_qos;
bool reg_flag;
- uint8_t trace_level;
bool allow_incoming;
diff --git a/system/stack/hid/hidh_api.cc b/system/stack/hid/hidh_api.cc
index 3638862183..7aecb0a78c 100644
--- a/system/stack/hid/hidh_api.cc
+++ b/system/stack/hid/hidh_api.cc
@@ -246,25 +246,7 @@ static void hidh_search_callback(UNUSED_ATTR const RawAddress& bd_addr,
*
******************************************************************************/
void HID_HostInit(void) {
- uint8_t log_level = hh_cb.trace_level;
memset(&hh_cb, 0, sizeof(tHID_HOST_CTB));
- hh_cb.trace_level = log_level;
-}
-
-/*******************************************************************************
- *
- * Function HID_HostSetTraceLevel
- *
- * Description This function sets the trace level for HID Host. If called
- * with 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t HID_HostSetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) hh_cb.trace_level = new_level;
-
- return (hh_cb.trace_level);
}
/*******************************************************************************
diff --git a/system/stack/hid/hidh_int.h b/system/stack/hid/hidh_int.h
index ca5142b9fb..a39ec14971 100644
--- a/system/stack/hid/hidh_int.h
+++ b/system/stack/hid/hidh_int.h
@@ -60,7 +60,6 @@ typedef struct host_ctb {
tSDP_DISCOVERY_DB* p_sdp_db;
tHID_DEV_SDP_INFO sdp_rec;
bool reg_flag;
- uint8_t trace_level;
} tHID_HOST_CTB;
tHID_STATUS hidh_conn_snd_data(uint8_t dhandle, uint8_t trans_type,
diff --git a/system/stack/include/a2dp_api.h b/system/stack/include/a2dp_api.h
index d7cfa18b67..7f2ab98e24 100644
--- a/system/stack/include/a2dp_api.h
+++ b/system/stack/include/a2dp_api.h
@@ -174,29 +174,6 @@ tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, const RawAddress& bd_addr,
uint16_t A2DP_GetAvdtpVersion(void);
/******************************************************************************
- *
- * Function A2DP_SetTraceLevel
- *
- * Description Sets the trace level for A2D. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the A2DP tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t A2DP_SetTraceLevel(uint8_t new_level);
-
-/******************************************************************************
* Function A2DP_BitsSet
*
* Description Check the given num for the number of bits set
diff --git a/system/stack/include/avct_api.h b/system/stack/include/avct_api.h
index d711ff7381..41fb60cc21 100644
--- a/system/stack/include/avct_api.h
+++ b/system/stack/include/avct_api.h
@@ -275,27 +275,4 @@ uint16_t AVCT_GetPeerMtu(uint8_t handle);
******************************************************************************/
uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg);
-/******************************************************************************
- *
- * Function AVCT_SetTraceLevel
- *
- * Description Sets the trace level for AVCT. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the AVCT tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t AVCT_SetTraceLevel(uint8_t new_level);
-
#endif /* AVCT_API_H */
diff --git a/system/stack/include/avdt_api.h b/system/stack/include/avdt_api.h
index 47bd80ffb0..7e69cb85da 100644
--- a/system/stack/include/avdt_api.h
+++ b/system/stack/include/avdt_api.h
@@ -911,29 +911,6 @@ uint16_t AVDT_DisconnectReq(const RawAddress& bd_addr,
******************************************************************************/
uint16_t AVDT_GetL2CapChannel(uint8_t handle);
-/******************************************************************************
- *
- * Function AVDT_SetTraceLevel
- *
- * Description Sets the trace level for AVDT. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the AVDT tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t AVDT_SetTraceLevel(uint8_t new_level);
-
/**
* Dump debug-related information for the Stack AVDTP module.
*
diff --git a/system/stack/include/avrc_api.h b/system/stack/include/avrc_api.h
index 247840bead..2e3a031d63 100644
--- a/system/stack/include/avrc_api.h
+++ b/system/stack/include/avrc_api.h
@@ -689,29 +689,6 @@ uint16_t AVRC_VendorCmd(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg);
*****************************************************************************/
uint16_t AVRC_VendorRsp(uint8_t handle, uint8_t label, tAVRC_MSG_VENDOR* p_msg);
-/******************************************************************************
- *
- * Function AVRC_SetTraceLevel
- *
- * Description Sets the trace level for AVRC. If 0xff is passed, the
- * current trace level is returned.
- *
- * Input Parameters:
- * new_level: The level to set the AVRC tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new trace level or current trace level if
- * the input parameter is 0xff.
- *
- *****************************************************************************/
-uint8_t AVRC_SetTraceLevel(uint8_t new_level);
-
/*******************************************************************************
*
* Function AVRC_Init
diff --git a/system/stack/include/bnep_api.h b/system/stack/include/bnep_api.h
index bf3f70e7dc..c32449a237 100644
--- a/system/stack/include/bnep_api.h
+++ b/system/stack/include/bnep_api.h
@@ -373,18 +373,6 @@ tBNEP_RESULT BNEP_SetMulticastFilters(uint16_t handle, uint16_t num_filters,
/*******************************************************************************
*
- * Function BNEP_SetTraceLevel
- *
- * Description This function sets the trace level for BNEP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t BNEP_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
- *
* Function BNEP_Init
*
* Description This function initializes the BNEP unit. It should be called
diff --git a/system/stack/include/btm_api.h b/system/stack/include/btm_api.h
index ea1058b909..0f50cf99b0 100644
--- a/system/stack/include/btm_api.h
+++ b/system/stack/include/btm_api.h
@@ -157,18 +157,6 @@ void BTM_VendorSpecificCommand(uint16_t opcode, uint8_t param_len,
/*******************************************************************************
*
- * Function BTM_SetTraceLevel
- *
- * Description This function sets the trace level for BTM. If called with
- * a value of 0xFF, it simply returns the current trace level.
- *
- * Returns The new or current trace level
- *
- ******************************************************************************/
-uint8_t BTM_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
- *
* Function BTM_WritePageTimeout
*
* Description Send HCI Wite Page Timeout.
diff --git a/system/stack/include/hidd_api.h b/system/stack/include/hidd_api.h
index 032db88069..8a642daa64 100644
--- a/system/stack/include/hidd_api.h
+++ b/system/stack/include/hidd_api.h
@@ -235,18 +235,6 @@ tHID_STATUS HID_DevSetOutgoingQos(uint8_t service_type, uint32_t token_rate,
uint32_t peak_bandwidth, uint32_t latency,
uint32_t delay_variation);
-/*******************************************************************************
- *
- * Function HID_DevSetTraceLevel
- *
- * Description This function sets the trace level for HID Dev. If called
- * with a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t HID_DevSetTraceLevel(uint8_t new_level);
-
#ifdef __cplusplus
}
#endif
diff --git a/system/stack/include/hidh_api.h b/system/stack/include/hidh_api.h
index 1436a351aa..1cbb91492b 100644
--- a/system/stack/include/hidh_api.h
+++ b/system/stack/include/hidh_api.h
@@ -192,16 +192,4 @@ tHID_STATUS HID_HostCloseDev(uint8_t dev_handle);
******************************************************************************/
void HID_HostInit(void);
-/*******************************************************************************
- *
- * Function HID_HostSetTraceLevel
- *
- * Description Set the trace level for HID Host. If called with the value
- * 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t HID_HostSetTraceLevel(uint8_t new_level);
-
#endif /* HIDH_API_H */
diff --git a/system/stack/include/l2c_api.h b/system/stack/include/l2c_api.h
index fb6d5a1a1b..b744acf376 100644
--- a/system/stack/include/l2c_api.h
+++ b/system/stack/include/l2c_api.h
@@ -609,18 +609,6 @@ bool L2CA_SetIdleTimeoutByBdAddr(const RawAddress& bd_addr, uint16_t timeout,
/*******************************************************************************
*
- * Function L2CA_SetTraceLevel
- *
- * Description This function sets the trace level for L2CAP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t L2CA_SetTraceLevel(uint8_t trace_level);
-
-/*******************************************************************************
- *
* Function L2CA_FlushChannel
*
* Description This function flushes none, some or all buffers queued up
diff --git a/system/stack/include/pan_api.h b/system/stack/include/pan_api.h
index aac7cf446e..26d6b88d07 100644
--- a/system/stack/include/pan_api.h
+++ b/system/stack/include/pan_api.h
@@ -433,18 +433,6 @@ tPAN_RESULT PAN_SetMulticastFilters(uint16_t handle, uint16_t num_mcast_filters,
/*******************************************************************************
*
- * Function PAN_SetTraceLevel
- *
- * Description This function sets the trace level for PAN. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t PAN_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
- *
* Function PAN_Init
*
* Description This function initializes the PAN unit. It should be called
diff --git a/system/stack/include/port_api.h b/system/stack/include/port_api.h
index 21c15b0da2..f9c7062a49 100644
--- a/system/stack/include/port_api.h
+++ b/system/stack/include/port_api.h
@@ -429,18 +429,6 @@ void RFCOMM_Init(void);
/*******************************************************************************
*
- * Function PORT_SetTraceLevel
- *
- * Description Set the trace level for RFCOMM. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t PORT_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
- *
* Function PORT_GetResultString
*
* Description This function returns the human-readable string for a given
diff --git a/system/stack/include/sdp_api.h b/system/stack/include/sdp_api.h
index bff140c0c4..c2adbefc9c 100644
--- a/system/stack/include/sdp_api.h
+++ b/system/stack/include/sdp_api.h
@@ -32,18 +32,6 @@
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"
-/*******************************************************************************
- *
- * Function SDP_SetTraceLevel
- *
- * Description This function sets the trace level for SDP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t SDP_SetTraceLevel(uint8_t new_level);
-
namespace bluetooth {
namespace legacy {
namespace stack {
diff --git a/system/stack/include/smp_api.h b/system/stack/include/smp_api.h
index 7ed93c6568..e1d11e0b33 100644
--- a/system/stack/include/smp_api.h
+++ b/system/stack/include/smp_api.h
@@ -49,18 +49,6 @@ void SMP_Init(uint8_t init_security_mode);
/*******************************************************************************
*
- * Function SMP_SetTraceLevel
- *
- * Description This function sets the trace level for SMP. If called with
- * a value of 0xFF, it simply returns the current trace level.
- *
- * Returns The new or current trace level
- *
- ******************************************************************************/
-uint8_t SMP_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
- *
* Function SMP_Register
*
* Description This function register for the SMP service callback.
diff --git a/system/stack/l2cap/l2c_api.cc b/system/stack/l2cap/l2c_api.cc
index d862d00123..2c81de1366 100644
--- a/system/stack/l2cap/l2c_api.cc
+++ b/system/stack/l2cap/l2c_api.cc
@@ -989,22 +989,6 @@ bool L2CA_SetIdleTimeoutByBdAddr(const RawAddress& bd_addr, uint16_t timeout,
/*******************************************************************************
*
- * Function L2CA_SetTraceLevel
- *
- * Description This function sets the trace level for L2CAP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t L2CA_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) l2cb.l2cap_trace_level = new_level;
-
- return (l2cb.l2cap_trace_level);
-}
-
-/*******************************************************************************
- *
* Function L2CA_UseLatencyMode
*
* Description Sets acl use latency mode.
diff --git a/system/stack/l2cap/l2c_int.h b/system/stack/l2cap/l2c_int.h
index d44e16a9b4..759e843325 100644
--- a/system/stack/l2cap/l2c_int.h
+++ b/system/stack/l2cap/l2c_int.h
@@ -590,7 +590,6 @@ typedef struct t_l2c_linkcb {
/* Define the L2CAP control structure
*/
typedef struct {
- uint8_t l2cap_trace_level;
uint16_t controller_xmit_window; /* Total ACL window for all links */
uint16_t round_robin_quota; /* Round-robin link quota */
diff --git a/system/stack/l2cap/l2c_main.cc b/system/stack/l2cap/l2c_main.cc
index a5c5cc6161..dda68cab75 100644
--- a/system/stack/l2cap/l2c_main.cc
+++ b/system/stack/l2cap/l2c_main.cc
@@ -856,12 +856,6 @@ void l2c_init(void) {
/* Set the default idle timeout */
l2cb.idle_timeout = L2CAP_LINK_INACTIVITY_TOUT;
-#if defined(L2CAP_INITIAL_TRACE_LEVEL)
- l2cb.l2cap_trace_level = L2CAP_INITIAL_TRACE_LEVEL;
-#else
- l2cb.l2cap_trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
-
#if (L2CAP_CONFORMANCE_TESTING == TRUE)
/* Conformance testing needs a dynamic response */
l2cb.test_info_resp = L2CAP_EXTFEA_SUPPORTED_MASK;
diff --git a/system/stack/pan/pan_api.cc b/system/stack/pan/pan_api.cc
index bbc51ea37a..504500bc86 100644
--- a/system/stack/pan/pan_api.cc
+++ b/system/stack/pan/pan_api.cc
@@ -649,25 +649,6 @@ tPAN_RESULT PAN_SetMulticastFilters(uint16_t handle, uint16_t num_mcast_filters,
/*******************************************************************************
*
- * Function PAN_SetTraceLevel
- *
- * Description This function sets the trace level for PAN. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t PAN_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF)
- pan_cb.trace_level = new_level;
- else
- pan_dump_status();
-
- return (pan_cb.trace_level);
-}
-
-/*******************************************************************************
- *
* Function PAN_Init
*
* Description This function initializes the PAN module variables
@@ -679,12 +660,6 @@ uint8_t PAN_SetTraceLevel(uint8_t new_level) {
******************************************************************************/
void PAN_Init(void) {
memset(&pan_cb, 0, sizeof(tPAN_CB));
-
-#if defined(PAN_INITIAL_TRACE_LEVEL)
- pan_cb.trace_level = PAN_INITIAL_TRACE_LEVEL;
-#else
- pan_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
}
#define DUMPSYS_TAG "shim::legacy::pan"
diff --git a/system/stack/pan/pan_int.h b/system/stack/pan/pan_int.h
index 010de4ada1..4047625db4 100644
--- a/system/stack/pan/pan_int.h
+++ b/system/stack/pan/pan_int.h
@@ -99,7 +99,6 @@ typedef struct {
uint32_t pan_gn_sdp_handle;
uint32_t pan_nap_sdp_handle;
uint8_t num_conns;
- uint8_t trace_level;
} tPAN_CB;
/* Global PAN data
diff --git a/system/stack/rfcomm/port_api.cc b/system/stack/rfcomm/port_api.cc
index 2f4ed792ff..6b6daf84aa 100644
--- a/system/stack/rfcomm/port_api.cc
+++ b/system/stack/rfcomm/port_api.cc
@@ -1156,33 +1156,11 @@ void RFCOMM_Init(void) {
rfc_cb.rfc.last_mux = MAX_BD_CONNECTIONS;
-#if defined(RFCOMM_INITIAL_TRACE_LEVEL)
- rfc_cb.trace_level = RFCOMM_INITIAL_TRACE_LEVEL;
-#else
- rfc_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
-
rfcomm_l2cap_if_init();
}
/*******************************************************************************
*
- * Function PORT_SetTraceLevel
- *
- * Description Set the trace level for RFCOMM. If called with 0xFF, it
- * simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t PORT_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) rfc_cb.trace_level = new_level;
-
- return (rfc_cb.trace_level);
-}
-
-/*******************************************************************************
- *
* Function PORT_GetResultString
*
* Description This function returns the human-readable string for a given
diff --git a/system/stack/rfcomm/rfc_int.h b/system/stack/rfcomm/rfc_int.h
index 3f32a778e6..52fa23948d 100644
--- a/system/stack/rfcomm/rfc_int.h
+++ b/system/stack/rfcomm/rfc_int.h
@@ -168,7 +168,6 @@ typedef struct {
typedef struct {
tRFCOMM_CB rfc;
tPORT_CB port;
- uint8_t trace_level;
} tRFC_CB;
extern tRFC_CB rfc_cb;
diff --git a/system/stack/sdp/sdp_api.cc b/system/stack/sdp/sdp_api.cc
index 2330cd8ad0..f56ab2fa8d 100644
--- a/system/stack/sdp/sdp_api.cc
+++ b/system/stack/sdp/sdp_api.cc
@@ -1039,22 +1039,6 @@ uint16_t SDP_SetLocalDiRecord(const tSDP_DI_RECORD* p_device_info,
return result;
}
-/*******************************************************************************
- *
- * Function SDP_SetTraceLevel
- *
- * Description This function sets the trace level for SDP. If called with
- * a value of 0xFF, it simply reads the current trace level.
- *
- * Returns the new (current) trace level
- *
- ******************************************************************************/
-uint8_t SDP_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) sdp_cb.trace_level = new_level;
-
- return (sdp_cb.trace_level);
-}
-
namespace {
bluetooth::legacy::stack::sdp::tSdpApi api_ = {
.service =
diff --git a/system/stack/sdp/sdp_db.cc b/system/stack/sdp/sdp_db.cc
index e175554adb..a4326272dc 100644
--- a/system/stack/sdp/sdp_db.cc
+++ b/system/stack/sdp/sdp_db.cc
@@ -367,7 +367,9 @@ bool SDP_AddAttribute(uint32_t handle, uint16_t attr_id, uint8_t attr_type,
return (false);
}
- if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) {
+ // TODO(305066880): invoke would_log when implemented to check
+ // if LOG_VERBOSE is displayed.
+ if (true) {
if ((attr_type == UINT_DESC_TYPE) ||
(attr_type == TWO_COMP_INT_DESC_TYPE) ||
(attr_type == UUID_DESC_TYPE) ||
diff --git a/system/stack/sdp/sdp_main.cc b/system/stack/sdp/sdp_main.cc
index b5854d2c3b..829268f3c3 100644
--- a/system/stack/sdp/sdp_main.cc
+++ b/system/stack/sdp/sdp_main.cc
@@ -82,8 +82,6 @@ void sdp_init(void) {
sdp_cb.max_attr_list_size = SDP_MTU_SIZE - 16;
sdp_cb.max_recs_per_search = SDP_MAX_DISC_SERVER_RECS;
- sdp_cb.trace_level = BT_TRACE_LEVEL_WARNING;
-
sdp_cb.reg_info.pL2CA_ConnectInd_Cb = sdp_connect_ind;
sdp_cb.reg_info.pL2CA_ConnectCfm_Cb = sdp_connect_cfm;
sdp_cb.reg_info.pL2CA_ConfigInd_Cb = sdp_config_ind;
diff --git a/system/stack/sdp/sdpint.h b/system/stack/sdp/sdpint.h
index 08fd7b00e9..52e9a38597 100644
--- a/system/stack/sdp/sdpint.h
+++ b/system/stack/sdp/sdpint.h
@@ -248,7 +248,6 @@ typedef struct {
tL2CAP_APPL_INFO reg_info; /* L2CAP Registration info */
uint16_t max_attr_list_size; /* Max attribute list size to use */
uint16_t max_recs_per_search; /* Max records we want per seaarch */
- uint8_t trace_level;
} tSDP_CB;
/* Global SDP data */
diff --git a/system/stack/smp/smp_api.cc b/system/stack/smp/smp_api.cc
index 3ce621aad4..080981ea6d 100644
--- a/system/stack/smp/smp_api.cc
+++ b/system/stack/smp/smp_api.cc
@@ -56,11 +56,6 @@ void SMP_Init(uint8_t init_security_mode) {
smp_cb.smp_rsp_timer_ent = alarm_new("smp.smp_rsp_timer_ent");
smp_cb.delayed_auth_timer_ent = alarm_new("smp.delayed_auth_timer_ent");
-#if defined(SMP_INITIAL_TRACE_LEVEL)
- smp_cb.trace_level = SMP_INITIAL_TRACE_LEVEL;
-#else
- smp_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
-#endif
LOG_VERBOSE("%s", __func__);
smp_l2cap_if_init();
@@ -77,32 +72,6 @@ void SMP_Init(uint8_t init_security_mode) {
/*******************************************************************************
*
- * Function SMP_SetTraceLevel
- *
- * Description This function sets the trace level for SMP. If called with
- * a value of 0xFF, it simply returns the current trace level.
- *
- * Input Parameters:
- * level: The level to set the GATT tracing to:
- * 0xff-returns the current setting.
- * 0-turns off tracing.
- * >= 1-Errors.
- * >= 2-Warnings.
- * >= 3-APIs.
- * >= 4-Events.
- * >= 5-Debug.
- *
- * Returns The new or current trace level
- *
- ******************************************************************************/
-uint8_t SMP_SetTraceLevel(uint8_t new_level) {
- if (new_level != 0xFF) smp_cb.trace_level = new_level;
-
- return (smp_cb.trace_level);
-}
-
-/*******************************************************************************
- *
* Function SMP_Register
*
* Description This function register for the SMP services callback.
diff --git a/system/stack/smp/smp_int.h b/system/stack/smp/smp_int.h
index 6032c700b5..7ebc3b8f75 100644
--- a/system/stack/smp/smp_int.h
+++ b/system/stack/smp/smp_int.h
@@ -237,7 +237,6 @@ typedef struct {
uint8_t init_security_mode{0};
tSMP_CALLBACK* p_callback;
alarm_t* smp_rsp_timer_ent;
- uint8_t trace_level;
RawAddress pairing_bda;
tSMP_STATE state;
bool derive_lk;
diff --git a/system/stack/smp/smp_utils.cc b/system/stack/smp/smp_utils.cc
index 5ed51fff94..82fd78d9aa 100644
--- a/system/stack/smp/smp_utils.cc
+++ b/system/stack/smp/smp_utils.cc
@@ -885,7 +885,6 @@ void smp_xor_128(Octet16* a, const Octet16& b) {
******************************************************************************/
void smp_cb_cleanup(tSMP_CB* p_cb) {
tSMP_CALLBACK* p_callback = p_cb->p_callback;
- uint8_t trace_level = p_cb->trace_level;
uint8_t init_security_mode = p_cb->init_security_mode;
alarm_t* smp_rsp_timer_ent = p_cb->smp_rsp_timer_ent;
alarm_t* delayed_auth_timer_ent = p_cb->delayed_auth_timer_ent;
@@ -896,7 +895,6 @@ void smp_cb_cleanup(tSMP_CB* p_cb) {
alarm_cancel(p_cb->delayed_auth_timer_ent);
memset(p_cb, 0, sizeof(tSMP_CB));
p_cb->p_callback = p_callback;
- p_cb->trace_level = trace_level;
p_cb->init_security_mode = init_security_mode;
p_cb->smp_rsp_timer_ent = smp_rsp_timer_ent;
p_cb->delayed_auth_timer_ent = delayed_auth_timer_ent;
diff --git a/system/stack/test/btm/stack_btm_test.cc b/system/stack/test/btm/stack_btm_test.cc
index 55693d4c94..0dc471f220 100644
--- a/system/stack/test/btm/stack_btm_test.cc
+++ b/system/stack/test/btm/stack_btm_test.cc
@@ -45,8 +45,6 @@ namespace mock = test::mock::stack_hcic_hcicmds;
extern tBTM_CB btm_cb;
-uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
-uint8_t appl_trace_level = BT_TRACE_LEVEL_VERBOSE;
tL2C_CB l2cb;
const hci_t* hci_layer_get_interface() { return nullptr; }
diff --git a/system/stack/test/fuzzers/a2dp/a2dpFuzzFunctions.h b/system/stack/test/fuzzers/a2dp/a2dpFuzzFunctions.h
index d5312b7a2d..212456e2e4 100644
--- a/system/stack/test/fuzzers/a2dp/a2dpFuzzFunctions.h
+++ b/system/stack/test/fuzzers/a2dp/a2dpFuzzFunctions.h
@@ -77,12 +77,6 @@ std::vector<std::function<void(FuzzedDataProvider*)>> a2dp_operations = {
// A2DP_GetAvdtpVersion
[](FuzzedDataProvider*) -> void { A2DP_GetAvdtpVersion(); },
- // A2DP_SetTraceLevel
- [](FuzzedDataProvider* fdp) -> void {
- // Expected val is [0-5], 0xff but other values are supported so fuzz all
- A2DP_SetTraceLevel(fdp->ConsumeIntegral<uint8_t>());
- },
-
// A2DP_BitsSet
[](FuzzedDataProvider* fdp) -> void {
A2DP_BitsSet(fdp->ConsumeIntegral<uint64_t>());
diff --git a/system/stack/test/fuzzers/sdp/sdpFuzzFunctions.h b/system/stack/test/fuzzers/sdp/sdpFuzzFunctions.h
index 40679f1a36..908bb1eaa8 100644
--- a/system/stack/test/fuzzers/sdp/sdpFuzzFunctions.h
+++ b/system/stack/test/fuzzers/sdp/sdpFuzzFunctions.h
@@ -321,11 +321,6 @@ static const std::vector<std::function<void(FuzzedDataProvider*)>>
getArbitraryVectorElement(fdp, sdp_db_vect, true).get());
},
- // ::SDP_SetTraceLevel
- [](FuzzedDataProvider* fdp) -> void {
- SDP_SetTraceLevel(fdp->ConsumeIntegral<uint8_t>());
- },
-
// ::SDP_FindServiceUUIDInRec
[](FuzzedDataProvider* fdp) -> void {
tSDP_DISC_REC* p_rec =
diff --git a/system/stack/test/fuzzers/sdp/sdpFuzzHelpers.h b/system/stack/test/fuzzers/sdp/sdpFuzzHelpers.h
index 6c37d265f0..61f92ba620 100644
--- a/system/stack/test/fuzzers/sdp/sdpFuzzHelpers.h
+++ b/system/stack/test/fuzzers/sdp/sdpFuzzHelpers.h
@@ -84,9 +84,6 @@ void cleanupSdpFuzz() {
// Delete Databases
sdp_db_vect.clear();
-
- // Set SDP Trace level back to default
- SDP_SetTraceLevel(0);
}
std::vector<uint16_t> generateArbitraryAttrList(FuzzedDataProvider* fdp) {
diff --git a/system/stack/test/rfcomm/stack_rfcomm_test.cc b/system/stack/test/rfcomm/stack_rfcomm_test.cc
index 8431499b87..6cd85773a8 100644
--- a/system/stack/test/rfcomm/stack_rfcomm_test.cc
+++ b/system/stack/test/rfcomm/stack_rfcomm_test.cc
@@ -456,7 +456,6 @@ class StackRfcommTest : public Test {
EXPECT_CALL(l2cap_interface_, Register(BT_PSM_RFCOMM, _, _, _))
.WillOnce(Return(BT_PSM_RFCOMM));
RFCOMM_Init();
- rfc_cb.trace_level = BT_TRACE_LEVEL_DEBUG;
}
void TearDown() override {
diff --git a/system/stack/test/sdp/stack_sdp_utils_test.cc b/system/stack/test/sdp/stack_sdp_utils_test.cc
index 3d76b6ead3..284cb3ee1d 100644
--- a/system/stack/test/sdp/stack_sdp_utils_test.cc
+++ b/system/stack/test/sdp/stack_sdp_utils_test.cc
@@ -46,9 +46,6 @@ using testing::DoAll;
using testing::Return;
using testing::SetArrayArgument;
-// Global trace level referred in the code under test
-uint8_t appl_trace_level = BT_TRACE_LEVEL_VERBOSE;
-
bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr,
const RawAddress& remote_address);
void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr);
diff --git a/system/stack/test/stack_acl_test.cc b/system/stack/test/stack_acl_test.cc
index 2b30bc7612..f689c76354 100644
--- a/system/stack/test/stack_acl_test.cc
+++ b/system/stack/test/stack_acl_test.cc
@@ -29,7 +29,6 @@
#include "types/hci_role.h"
#include "types/raw_address.h"
-uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;
tBTM_CB btm_cb;
tBTM_SEC_CB btm_sec_cb;
diff --git a/system/stack/test/stack_avdtp_test.cc b/system/stack/test/stack_avdtp_test.cc
index 34265fcc64..0b3c1dc693 100644
--- a/system/stack/test/stack_avdtp_test.cc
+++ b/system/stack/test/stack_avdtp_test.cc
@@ -32,9 +32,6 @@
#define UNUSED_ATTR
#endif
-// Global trace level referred in the code under test
-uint8_t appl_trace_level = BT_TRACE_LEVEL_VERBOSE;
-
class StackAvdtpTest : public ::testing::Test {
protected:
StackAvdtpTest() = default;
diff --git a/system/stack/test/stack_l2cap_test.cc b/system/stack/test/stack_l2cap_test.cc
index 0bc6d90dfb..6c71e2ae72 100644
--- a/system/stack/test/stack_l2cap_test.cc
+++ b/system/stack/test/stack_l2cap_test.cc
@@ -31,9 +31,6 @@ extern tL2C_CB l2cb;
void l2c_link_send_to_lower_br_edr(tL2C_LCB* p_lcb, BT_HDR* p_buf);
void l2c_link_send_to_lower_ble(tL2C_LCB* p_lcb, BT_HDR* p_buf);
-// Global trace level referred in the code under test
-uint8_t appl_trace_level = BT_TRACE_LEVEL_VERBOSE;
-
namespace {
constexpr uint16_t kAclBufferCountClassic = 123;
constexpr uint8_t kAclBufferCountBle = 45;
diff --git a/system/test/Android.bp b/system/test/Android.bp
index 6fca741609..35bba6db60 100644
--- a/system/test/Android.bp
+++ b/system/test/Android.bp
@@ -376,13 +376,6 @@ filegroup {
}
filegroup {
- name: "TestStubLegacyTrace",
- srcs: [
- "stub/legacy_trace.cc",
- ],
-}
-
-filegroup {
name: "TestStubOsi",
srcs: [
"stub/osi.cc",
@@ -573,11 +566,6 @@ filegroup {
}
filegroup {
- name: "TestCommonBtifTraceLevel",
- srcs: ["common/btif_trace_level.cc"],
-}
-
-filegroup {
name: "TestFakeThread",
srcs: [
"fake/fake_thread.cc",
diff --git a/system/test/common/btif_trace_level.cc b/system/test/common/btif_trace_level.cc
deleted file mode 100644
index 36fd75d0e5..0000000000
--- a/system/test/common/btif_trace_level.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-#include <cstdint>
-
-// tLEGACY_TRACE_LEVEL
-uint8_t btif_trace_level = 6;
diff --git a/system/test/headless/headless.cc b/system/test/headless/headless.cc
index 3b09b8222d..6d1f476e2a 100644
--- a/system/test/headless/headless.cc
+++ b/system/test/headless/headless.cc
@@ -284,10 +284,6 @@ void HeadlessStack::SetUp() {
while (bt_state_ != BT_STATE_ON) adapter_state_cv_.wait(lck);
LOG_INFO("%s HeadlessStack stack is operational", __func__);
- // Logging can only be enabled after the stack has started up to override
- // the default logging levels built into the stack.
- enable_logging();
-
bluetooth::test::headless::start_messenger();
LOG_CONSOLE("%s Headless stack has started up successfully", kHeadlessIcon);
@@ -296,7 +292,6 @@ void HeadlessStack::SetUp() {
void HeadlessStack::TearDown() {
bluetooth::test::headless::stop_messenger();
- log_logging();
LOG_INFO("Stack has disabled");
int status = bluetoothInterface.disable();
diff --git a/system/test/headless/log.cc b/system/test/headless/log.cc
index 1b45541caa..3bab572737 100644
--- a/system/test/headless/log.cc
+++ b/system/test/headless/log.cc
@@ -26,20 +26,7 @@
std::chrono::system_clock::time_point _prev = std::chrono::system_clock::now();
-extern uint8_t appl_trace_level;
extern tBTM_CB btm_cb;
bluetooth::common::TimestamperInMilliseconds timestamper_in_ms;
long long GetTimestampMs() { return timestamper_in_ms.GetTimestamp(); }
-
-void enable_logging() {
- btm_cb.trace_level = BT_TRACE_LEVEL_DEBUG;
- btif_trace_level = BT_TRACE_LEVEL_DEBUG;
- appl_trace_level = BT_TRACE_LEVEL_DEBUG;
-}
-
-void log_logging() {
- LOG_INFO(
- "btm_cb.trace_level:%hhu btif_trace_level:%hhu appl_trace_level:%hhu ",
- btm_cb.trace_level, btif_trace_level, appl_trace_level);
-}
diff --git a/system/test/headless/log.h b/system/test/headless/log.h
index 171107baca..303e220b44 100644
--- a/system/test/headless/log.h
+++ b/system/test/headless/log.h
@@ -28,8 +28,6 @@
#include "build_timestamp.h" // generated
-void enable_logging();
-void log_logging();
long long GetTimestampMs();
// Internal to headless below
diff --git a/system/test/headless/scan/scan.cc b/system/test/headless/scan/scan.cc
index cdf1a2eb8a..0c9e14fcdc 100644
--- a/system/test/headless/scan/scan.cc
+++ b/system/test/headless/scan/scan.cc
@@ -104,8 +104,6 @@ int bluetooth::test::headless::Scan::Run() {
return -1;
}
return RunOnHeadlessStack<int>([this]() {
- btif_trace_level = BT_TRACE_LEVEL_DEBUG;
- appl_trace_level = BT_TRACE_LEVEL_DEBUG;
return start_scan(options_.loop_);
});
}
diff --git a/system/test/mock/mock_a2dp_api.cc b/system/test/mock/mock_a2dp_api.cc
index 9771579388..0c17cbef48 100644
--- a/system/test/mock/mock_a2dp_api.cc
+++ b/system/test/mock/mock_a2dp_api.cc
@@ -43,10 +43,6 @@ uint8_t A2DP_BitsSet(uint64_t num) {
inc_func_call_count(__func__);
return 0;
}
-uint8_t A2DP_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
void A2DP_Init(void) { inc_func_call_count(__func__); }
void a2dp_set_avdt_sdp_ver(uint16_t avdt_sdp_ver) {
inc_func_call_count(__func__);
diff --git a/system/test/mock/mock_stack_a2dp_api.cc b/system/test/mock/mock_stack_a2dp_api.cc
index 6634c0c417..804613096a 100644
--- a/system/test/mock/mock_stack_a2dp_api.cc
+++ b/system/test/mock/mock_stack_a2dp_api.cc
@@ -44,10 +44,6 @@ uint8_t A2DP_BitsSet(uint64_t num) {
inc_func_call_count(__func__);
return 1;
}
-uint8_t A2DP_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
void A2DP_Init(void) { inc_func_call_count(__func__); }
void a2dp_set_avdt_sdp_ver(uint16_t avdt_sdp_ver) {
inc_func_call_count(__func__);
diff --git a/system/test/mock/mock_stack_acl.cc b/system/test/mock/mock_stack_acl.cc
index 306b5a7d27..db657f0f30 100644
--- a/system/test/mock/mock_stack_acl.cc
+++ b/system/test/mock/mock_stack_acl.cc
@@ -92,7 +92,6 @@ struct BTM_GetMaxPacketSize BTM_GetMaxPacketSize;
struct BTM_GetNumAclLinks BTM_GetNumAclLinks;
struct acl_get_supported_packet_types acl_get_supported_packet_types;
struct BTM_GetPeerSCA BTM_GetPeerSCA;
-struct BTM_SetTraceLevel BTM_SetTraceLevel;
struct acl_link_role_from_handle acl_link_role_from_handle;
struct btm_handle_to_acl_index btm_handle_to_acl_index;
struct BTM_ReadRemoteFeatures BTM_ReadRemoteFeatures;
@@ -393,10 +392,6 @@ uint8_t BTM_GetPeerSCA(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
inc_func_call_count(__func__);
return test::mock::stack_acl::BTM_GetPeerSCA(remote_bda, transport);
}
-uint8_t BTM_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return test::mock::stack_acl::BTM_SetTraceLevel(new_level);
-}
uint8_t acl_link_role_from_handle(uint16_t handle) {
inc_func_call_count(__func__);
return test::mock::stack_acl::acl_link_role_from_handle(handle);
diff --git a/system/test/mock/mock_stack_acl.h b/system/test/mock/mock_stack_acl.h
index 5bbf52e1cc..baa344ef92 100644
--- a/system/test/mock/mock_stack_acl.h
+++ b/system/test/mock/mock_stack_acl.h
@@ -552,15 +552,6 @@ struct BTM_GetPeerSCA {
};
};
extern struct BTM_GetPeerSCA BTM_GetPeerSCA;
-// Name: BTM_SetTraceLevel
-// Params: uint8_t new_level
-// Returns: uint8_t
-struct BTM_SetTraceLevel {
- std::function<uint8_t(uint8_t new_level)> body{
- [](uint8_t new_level) { return 0; }};
- uint8_t operator()(uint8_t new_level) { return body(new_level); };
-};
-extern struct BTM_SetTraceLevel BTM_SetTraceLevel;
// Name: acl_link_role_from_handle
// Params: uint16_t handle
// Returns: uint8_t
diff --git a/system/test/mock/mock_stack_avct_api.cc b/system/test/mock/mock_stack_avct_api.cc
index f7ec34c1be..f6f54378e4 100644
--- a/system/test/mock/mock_stack_avct_api.cc
+++ b/system/test/mock/mock_stack_avct_api.cc
@@ -55,7 +55,3 @@ uint16_t AVCT_RemoveConn(uint8_t handle) {
}
void AVCT_Deregister(void) { inc_func_call_count(__func__); }
void AVCT_Register() { inc_func_call_count(__func__); }
-uint8_t AVCT_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
diff --git a/system/test/mock/mock_stack_avdt_api.cc b/system/test/mock/mock_stack_avdt_api.cc
index 16b10086b7..1f9e113ae9 100644
--- a/system/test/mock/mock_stack_avdt_api.cc
+++ b/system/test/mock/mock_stack_avdt_api.cc
@@ -105,10 +105,6 @@ uint16_t AVDT_WriteReqOpt(uint8_t handle, BT_HDR* p_pkt, uint32_t time_stamp,
inc_func_call_count(__func__);
return 0;
}
-uint8_t AVDT_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
void AVDT_AbortReq(uint8_t handle) { inc_func_call_count(__func__); }
void AVDT_Deregister(void) { inc_func_call_count(__func__); }
void AVDT_Register(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback) {
diff --git a/system/test/mock/mock_stack_avrc_sdp.cc b/system/test/mock/mock_stack_avrc_sdp.cc
index 7594b60e3f..90b8801246 100644
--- a/system/test/mock/mock_stack_avrc_sdp.cc
+++ b/system/test/mock/mock_stack_avrc_sdp.cc
@@ -42,7 +42,6 @@ struct AVRC_AddRecord AVRC_AddRecord;
struct AVRC_FindService AVRC_FindService;
struct AVRC_Init AVRC_Init;
struct AVRC_RemoveRecord AVRC_RemoveRecord;
-struct AVRC_SetTraceLevel AVRC_SetTraceLevel;
} // namespace stack_avrc_sdp
} // namespace mock
@@ -56,7 +55,6 @@ namespace stack_avrc_sdp {
uint16_t AVRC_AddRecord::return_value = 0;
uint16_t AVRC_FindService::return_value = 0;
uint16_t AVRC_RemoveRecord::return_value = 0;
-uint8_t AVRC_SetTraceLevel::return_value = 0;
} // namespace stack_avrc_sdp
} // namespace mock
@@ -87,9 +85,5 @@ uint16_t AVRC_RemoveRecord(uint32_t sdp_handle) {
inc_func_call_count(__func__);
return test::mock::stack_avrc_sdp::AVRC_RemoveRecord(sdp_handle);
}
-uint8_t AVRC_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return test::mock::stack_avrc_sdp::AVRC_SetTraceLevel(new_level);
-}
// Mocked functions complete
// END mockcify generation
diff --git a/system/test/mock/mock_stack_avrc_sdp.h b/system/test/mock/mock_stack_avrc_sdp.h
index ebcfe3d73a..5ff7d608ca 100644
--- a/system/test/mock/mock_stack_avrc_sdp.h
+++ b/system/test/mock/mock_stack_avrc_sdp.h
@@ -113,17 +113,6 @@ struct AVRC_RemoveRecord {
};
extern struct AVRC_RemoveRecord AVRC_RemoveRecord;
-// Name: AVRC_SetTraceLevel
-// Params: uint8_t new_level
-// Return: uint8_t
-struct AVRC_SetTraceLevel {
- static uint8_t return_value;
- std::function<uint8_t(uint8_t new_level)> body{
- [](uint8_t new_level) { return return_value; }};
- uint8_t operator()(uint8_t new_level) { return body(new_level); };
-};
-extern struct AVRC_SetTraceLevel AVRC_SetTraceLevel;
-
} // namespace stack_avrc_sdp
} // namespace mock
} // namespace test
diff --git a/system/test/mock/mock_stack_bnep_api.cc b/system/test/mock/mock_stack_bnep_api.cc
index 45e77dc95c..c6e7978e2a 100644
--- a/system/test/mock/mock_stack_bnep_api.cc
+++ b/system/test/mock/mock_stack_bnep_api.cc
@@ -69,9 +69,5 @@ tBNEP_RESULT BNEP_WriteBuf(uint16_t handle, const RawAddress& p_dest_addr,
inc_func_call_count(__func__);
return 0;
}
-uint8_t BNEP_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
void BNEP_Deregister(void) { inc_func_call_count(__func__); }
void BNEP_Init(void) { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_stack_hidd_api.cc b/system/test/mock/mock_stack_hidd_api.cc
index 4bde9239e5..0c3898cd61 100644
--- a/system/test/mock/mock_stack_hidd_api.cc
+++ b/system/test/mock/mock_stack_hidd_api.cc
@@ -92,8 +92,4 @@ tHID_STATUS HID_DevVirtualCableUnplug(void) {
inc_func_call_count(__func__);
return HID_SUCCESS;
}
-uint8_t HID_DevSetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
void HID_DevInit(void) { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_stack_hidh.cc b/system/test/mock/mock_stack_hidh.cc
index 191aa8d4a6..e8fc06bc59 100644
--- a/system/test/mock/mock_stack_hidh.cc
+++ b/system/test/mock/mock_stack_hidh.cc
@@ -63,10 +63,6 @@ tHID_STATUS HID_HostWriteDev(uint8_t dev_handle, uint8_t t_type, uint8_t param,
inc_func_call_count(__func__);
return HID_SUCCESS;
}
-uint8_t HID_HostSetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return HID_SUCCESS;
-}
void HID_HostInit(void) { inc_func_call_count(__func__); }
void hidh_get_str_attr(tSDP_DISC_REC* p_rec, uint16_t attr_id, uint16_t max_len,
char* str) {
diff --git a/system/test/mock/mock_stack_l2cap_api.cc b/system/test/mock/mock_stack_l2cap_api.cc
index ee45e153de..63133f5e63 100644
--- a/system/test/mock/mock_stack_l2cap_api.cc
+++ b/system/test/mock/mock_stack_l2cap_api.cc
@@ -53,7 +53,6 @@ struct L2CA_DisconnectReq L2CA_DisconnectReq;
struct L2CA_DisconnectLECocReq L2CA_DisconnectLECocReq;
struct L2CA_GetRemoteCid L2CA_GetRemoteCid;
struct L2CA_SetIdleTimeoutByBdAddr L2CA_SetIdleTimeoutByBdAddr;
-struct L2CA_SetTraceLevel L2CA_SetTraceLevel;
struct L2CA_UseLatencyMode L2CA_UseLatencyMode;
struct L2CA_SetAclPriority L2CA_SetAclPriority;
struct L2CA_SetAclLatency L2CA_SetAclLatency;
@@ -184,10 +183,6 @@ bool L2CA_SetIdleTimeoutByBdAddr(const RawAddress& bd_addr, uint16_t timeout,
return test::mock::stack_l2cap_api::L2CA_SetIdleTimeoutByBdAddr(
bd_addr, timeout, transport);
}
-uint8_t L2CA_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return test::mock::stack_l2cap_api::L2CA_SetTraceLevel(new_level);
-}
bool L2CA_UseLatencyMode(const RawAddress& bd_addr, bool use_latency_mode) {
inc_func_call_count(__func__);
return test::mock::stack_l2cap_api::L2CA_UseLatencyMode(bd_addr,
diff --git a/system/test/mock/mock_stack_l2cap_api.h b/system/test/mock/mock_stack_l2cap_api.h
index 1a9997e0f4..59aee0ea43 100644
--- a/system/test/mock/mock_stack_l2cap_api.h
+++ b/system/test/mock/mock_stack_l2cap_api.h
@@ -273,15 +273,6 @@ struct L2CA_SetIdleTimeoutByBdAddr {
};
};
extern struct L2CA_SetIdleTimeoutByBdAddr L2CA_SetIdleTimeoutByBdAddr;
-// Name: L2CA_SetTraceLevel
-// Params: uint8_t new_level
-// Returns: uint8_t
-struct L2CA_SetTraceLevel {
- std::function<uint8_t(uint8_t new_level)> body{
- [](uint8_t new_level) { return 0; }};
- uint8_t operator()(uint8_t new_level) { return body(new_level); };
-};
-extern struct L2CA_SetTraceLevel L2CA_SetTraceLevel;
// Name: L2CA_UseLatencyMode
// Params: const RawAddress& bd_addr, bool use_latency_mode
// Returns: bool
diff --git a/system/test/mock/mock_stack_pan_api.cc b/system/test/mock/mock_stack_pan_api.cc
index 74a47090c2..4722d94ddb 100644
--- a/system/test/mock/mock_stack_pan_api.cc
+++ b/system/test/mock/mock_stack_pan_api.cc
@@ -43,7 +43,6 @@ struct PAN_SetProtocolFilters PAN_SetProtocolFilters;
struct PAN_SetRole PAN_SetRole;
struct PAN_Write PAN_Write;
struct PAN_WriteBuf PAN_WriteBuf;
-struct PAN_SetTraceLevel PAN_SetTraceLevel;
struct PAN_Deregister PAN_Deregister;
struct PAN_Dumpsys PAN_Dumpsys;
struct PAN_Init PAN_Init;
@@ -97,10 +96,6 @@ tPAN_RESULT PAN_WriteBuf(uint16_t handle, const RawAddress& dst,
return test::mock::stack_pan_api::PAN_WriteBuf(handle, dst, src, protocol,
p_buf, ext);
}
-uint8_t PAN_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return test::mock::stack_pan_api::PAN_SetTraceLevel(new_level);
-}
void PAN_Deregister(void) {
inc_func_call_count(__func__);
test::mock::stack_pan_api::PAN_Deregister();
diff --git a/system/test/mock/mock_stack_pan_api.h b/system/test/mock/mock_stack_pan_api.h
index 9acfa356f0..0251f7c420 100644
--- a/system/test/mock/mock_stack_pan_api.h
+++ b/system/test/mock/mock_stack_pan_api.h
@@ -137,15 +137,6 @@ struct PAN_WriteBuf {
};
};
extern struct PAN_WriteBuf PAN_WriteBuf;
-// Name: PAN_SetTraceLevel
-// Params: uint8_t new_level
-// Returns: uint8_t
-struct PAN_SetTraceLevel {
- std::function<uint8_t(uint8_t new_level)> body{
- [](uint8_t new_level) { return 0; }};
- uint8_t operator()(uint8_t new_level) { return body(new_level); };
-};
-extern struct PAN_SetTraceLevel PAN_SetTraceLevel;
// Name: PAN_Deregister
// Params: void
// Returns: void
diff --git a/system/test/mock/mock_stack_rfcomm_port_api.cc b/system/test/mock/mock_stack_rfcomm_port_api.cc
index c180c04de2..fd1ca3a3b3 100644
--- a/system/test/mock/mock_stack_rfcomm_port_api.cc
+++ b/system/test/mock/mock_stack_rfcomm_port_api.cc
@@ -105,10 +105,6 @@ int RFCOMM_RemoveServer(uint16_t handle) {
inc_func_call_count(__func__);
return 0;
}
-uint8_t PORT_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
int PORT_GetSecurityMask(uint16_t handle, uint16_t* sec_mask) {
inc_func_call_count(__func__);
return 0;
diff --git a/system/test/mock/mock_stack_sdp_api.cc b/system/test/mock/mock_stack_sdp_api.cc
index 48e4070d63..28b56bf6f1 100644
--- a/system/test/mock/mock_stack_sdp_api.cc
+++ b/system/test/mock/mock_stack_sdp_api.cc
@@ -54,7 +54,6 @@ struct SDP_DiDiscover SDP_DiDiscover;
struct SDP_GetDiRecord SDP_GetDiRecord;
struct SDP_SetLocalDiRecord SDP_SetLocalDiRecord;
struct SDP_GetNumDiRecords SDP_GetNumDiRecords;
-struct SDP_SetTraceLevel SDP_SetTraceLevel;
} // namespace stack_sdp_api
} // namespace mock
@@ -167,9 +166,4 @@ uint8_t SDP_GetNumDiRecords(const tSDP_DISCOVERY_DB* p_db) {
inc_func_call_count(__func__);
return test::mock::stack_sdp_api::SDP_GetNumDiRecords(p_db);
}
-uint8_t SDP_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return test::mock::stack_sdp_api::SDP_SetTraceLevel(new_level);
-}
-
// END mockcify generation
diff --git a/system/test/mock/mock_stack_sdp_api.h b/system/test/mock/mock_stack_sdp_api.h
index 27f5c51649..28f13b6cb3 100644
--- a/system/test/mock/mock_stack_sdp_api.h
+++ b/system/test/mock/mock_stack_sdp_api.h
@@ -275,15 +275,6 @@ struct SDP_GetNumDiRecords {
uint8_t operator()(const tSDP_DISCOVERY_DB* p_db) { return body(p_db); };
};
extern struct SDP_GetNumDiRecords SDP_GetNumDiRecords;
-// Name: SDP_SetTraceLevel
-// Params: uint8_t new_level
-// Returns: uint8_t
-struct SDP_SetTraceLevel {
- std::function<uint8_t(uint8_t new_level)> body{
- [](uint8_t new_level) { return 0; }};
- uint8_t operator()(uint8_t new_level) { return body(new_level); };
-};
-extern struct SDP_SetTraceLevel SDP_SetTraceLevel;
} // namespace stack_sdp_api
} // namespace mock
diff --git a/system/test/mock/mock_stack_smp_api.cc b/system/test/mock/mock_stack_smp_api.cc
index 72960f5b9e..28efdd724b 100644
--- a/system/test/mock/mock_stack_smp_api.cc
+++ b/system/test/mock/mock_stack_smp_api.cc
@@ -44,10 +44,6 @@ tSMP_STATUS SMP_Pair(const RawAddress& bd_addr) {
inc_func_call_count(__func__);
return SMP_SUCCESS;
}
-uint8_t SMP_SetTraceLevel(uint8_t new_level) {
- inc_func_call_count(__func__);
- return 0;
-}
void SMP_ConfirmReply(const RawAddress& bd_addr, uint8_t res) {
inc_func_call_count(__func__);
}
diff --git a/system/test/stub/legacy_trace.cc b/system/test/stub/legacy_trace.cc
deleted file mode 100644
index 7c7d324673..0000000000
--- a/system/test/stub/legacy_trace.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2021 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.
- */
-
-#include <cstdint>
-
-// tLEGACY_TRACE_LEVEL
-uint8_t appl_trace_level = 6;
-uint8_t btif_trace_level = 6;
-
-uint8_t A2DP_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t AVCT_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t AVDT_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t AVRC_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t BNEP_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t BTM_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t PAN_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t PORT_SetTraceLevel(uint8_t new_level) { return 0; }
-uint8_t SMP_SetTraceLevel(uint8_t new_level) { return 0; }