summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2024-03-21 00:58:50 +0000
committer Henri Chataing <henrichataing@google.com> 2024-03-21 21:59:16 +0000
commit2c544ed400c4bac8ee40d12b5c2df1a3984f5326 (patch)
treebb87e0358f09b4d951524377170a2b27ddfc68a0
parentf35cfe0b2f0a15ceb4df35e3f7ef2b1c19529564 (diff)
Remove unused <log/log.h> include directives
<log/log.h> provides the definition of ALOG[VDIWE] which is now unused except in vendor available libraries Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I1347f84067255b67efd68214213bdc89542c97c6
-rw-r--r--system/audio_bluetooth_hw/audio_bluetooth_hw.cc1
-rw-r--r--system/audio_bluetooth_hw/device_port_proxy.cc1
-rw-r--r--system/audio_bluetooth_hw/device_port_proxy_hidl.cc3
-rw-r--r--system/audio_bluetooth_hw/stream_apis.cc1
-rw-r--r--system/audio_bluetooth_hw/utils.cc2
-rw-r--r--system/audio_hal_interface/hidl/client_interface_hidl.cc28
-rw-r--r--system/log/src/truncating_buffer_test.cc1
-rw-r--r--system/osi/src/config.cc1
-rw-r--r--system/stack/gatt/gatt_db.cc1
-rw-r--r--system/stack/l2cap/l2c_ble.cc1
-rw-r--r--system/stack/l2cap/l2c_ble_conn_params.cc1
-rw-r--r--system/stack/rfcomm/rfc_ts_frames.cc1
-rw-r--r--system/stack/sdp/sdp_utils.cc1
-rw-r--r--system/test/mock/mock_osi_config.h1
-rw-r--r--system/vendor_libs/linux/interface/h4_protocol.cc6
-rw-r--r--system/vendor_libs/linux/interface/h4_protocol_unittest.cc1
-rw-r--r--system/vendor_libs/linux/interface/hci_packetizer.cc1
-rw-r--r--tools/rootcanal/hal/bluetooth_hci.cc1
18 files changed, 23 insertions, 30 deletions
diff --git a/system/audio_bluetooth_hw/audio_bluetooth_hw.cc b/system/audio_bluetooth_hw/audio_bluetooth_hw.cc
index f85cbb8923..4b66644c79 100644
--- a/system/audio_bluetooth_hw/audio_bluetooth_hw.cc
+++ b/system/audio_bluetooth_hw/audio_bluetooth_hw.cc
@@ -18,7 +18,6 @@
#include <android-base/logging.h>
#include <hardware/hardware.h>
-#include <log/log.h>
#include <malloc.h>
#include <string.h>
#include <system/audio.h>
diff --git a/system/audio_bluetooth_hw/device_port_proxy.cc b/system/audio_bluetooth_hw/device_port_proxy.cc
index 8505420447..4f4acd1caf 100644
--- a/system/audio_bluetooth_hw/device_port_proxy.cc
+++ b/system/audio_bluetooth_hw/device_port_proxy.cc
@@ -21,7 +21,6 @@
#include <android-base/logging.h>
#include <android-base/stringprintf.h>
#include <audio_utils/primitives.h>
-#include <log/log.h>
#include <stdlib.h>
#include <vector>
diff --git a/system/audio_bluetooth_hw/device_port_proxy_hidl.cc b/system/audio_bluetooth_hw/device_port_proxy_hidl.cc
index 3aa3a9c89c..f90bf7b52e 100644
--- a/system/audio_bluetooth_hw/device_port_proxy_hidl.cc
+++ b/system/audio_bluetooth_hw/device_port_proxy_hidl.cc
@@ -22,7 +22,6 @@
#include <android-base/stringprintf.h>
#include <audio_utils/primitives.h>
#include <inttypes.h>
-#include <log/log.h>
#include <stdlib.h>
#include "BluetoothAudioSessionControl_2_1.h"
@@ -618,4 +617,4 @@ bool BluetoothAudioPortHidlOut::LoadAudioConfig(
} // namespace hidl
} // namespace audio
} // namespace bluetooth
-} // namespace android \ No newline at end of file
+} // namespace android
diff --git a/system/audio_bluetooth_hw/stream_apis.cc b/system/audio_bluetooth_hw/stream_apis.cc
index 1a108032ce..c82f2e2148 100644
--- a/system/audio_bluetooth_hw/stream_apis.cc
+++ b/system/audio_bluetooth_hw/stream_apis.cc
@@ -21,7 +21,6 @@
#include <android-base/stringprintf.h>
#include <cutils/properties.h>
#include <inttypes.h>
-#include <log/log.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
diff --git a/system/audio_bluetooth_hw/utils.cc b/system/audio_bluetooth_hw/utils.cc
index f864fd5016..a74a83b76c 100644
--- a/system/audio_bluetooth_hw/utils.cc
+++ b/system/audio_bluetooth_hw/utils.cc
@@ -20,8 +20,8 @@
#include <android-base/logging.h>
#include <android-base/strings.h>
-#include <log/log.h>
#include <stdlib.h>
+
#include <sstream>
#include <vector>
diff --git a/system/audio_hal_interface/hidl/client_interface_hidl.cc b/system/audio_hal_interface/hidl/client_interface_hidl.cc
index 3d7d2a813d..4c230e89a1 100644
--- a/system/audio_hal_interface/hidl/client_interface_hidl.cc
+++ b/system/audio_hal_interface/hidl/client_interface_hidl.cc
@@ -319,7 +319,9 @@ void BluetoothAudioClientInterface::FetchAudioProvider() {
if (status == BluetoothAudioStatus::SUCCESS) {
provider_ = provider;
}
- ALOGE_IF(!provider_, "Failed to open BluetoothAudio provider");
+ if (!provider_) {
+ log::error("Failed to open BluetoothAudio provider");
+ }
openProvider_promise.set_value();
};
hidl_retval = providersFactory->openProvider(transport_->GetSessionType(),
@@ -385,7 +387,9 @@ void BluetoothAudioClientInterface::FetchAudioProvider_2_1() {
if (status == BluetoothAudioStatus::SUCCESS) {
provider_2_1_ = provider_2_1;
}
- ALOGE_IF(!provider_2_1_, "Failed to open BluetoothAudio provider_2_1");
+ if (!provider_2_1_) {
+ log::error("Failed to open BluetoothAudio provider_2_1");
+ }
openProvider_promise.set_value();
};
hidl_retval = providersFactory->openProvider_2_1(
@@ -588,12 +592,14 @@ int BluetoothAudioClientInterface::StartSession() {
transport_->ResetPresentationPosition();
session_started_ = true;
return 0;
+ }
+ if (!mDataMQ) {
+ log::error("Failed to obtain audio data path");
} else {
- ALOGE_IF(!mDataMQ, "Failed to obtain audio data path");
- ALOGE_IF(mDataMQ && !mDataMQ->isValid(), "Audio data path is invalid");
- session_started_ = false;
- return -EIO;
+ log::error("Audio data path is invalid");
}
+ session_started_ = false;
+ return -EIO;
}
int BluetoothAudioClientInterface::StartSession_2_1() {
@@ -647,12 +653,14 @@ int BluetoothAudioClientInterface::StartSession_2_1() {
transport_->ResetPresentationPosition();
session_started_ = true;
return 0;
+ }
+ if (!mDataMQ) {
+ log::error("Failed to obtain audio data path");
} else {
- ALOGE_IF(!mDataMQ, "Failed to obtain audio data path");
- ALOGE_IF(mDataMQ && !mDataMQ->isValid(), "Audio data path is invalid");
- session_started_ = false;
- return -EIO;
+ log::error("Audio data path is invalid");
}
+ session_started_ = false;
+ return -EIO;
}
void BluetoothAudioClientInterface::StreamStarted(
diff --git a/system/log/src/truncating_buffer_test.cc b/system/log/src/truncating_buffer_test.cc
index 5790270cdc..a0b4a099af 100644
--- a/system/log/src/truncating_buffer_test.cc
+++ b/system/log/src/truncating_buffer_test.cc
@@ -20,7 +20,6 @@
#include <fmt/format.h>
#include <gtest/gtest.h>
-#include <log/log.h>
using namespace bluetooth::log_internal;
diff --git a/system/osi/src/config.cc b/system/osi/src/config.cc
index 917f6c033b..181ffe61eb 100644
--- a/system/osi/src/config.cc
+++ b/system/osi/src/config.cc
@@ -24,7 +24,6 @@
#include <ctype.h>
#include <fcntl.h>
#include <libgen.h>
-#include <log/log.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/system/stack/gatt/gatt_db.cc b/system/stack/gatt/gatt_db.cc
index 55ded60a18..6817690f57 100644
--- a/system/stack/gatt/gatt_db.cc
+++ b/system/stack/gatt/gatt_db.cc
@@ -24,7 +24,6 @@
#include <base/logging.h>
#include <bluetooth/log.h>
-#include <log/log.h>
#include <stdio.h>
#include <string.h>
diff --git a/system/stack/l2cap/l2c_ble.cc b/system/stack/l2cap/l2c_ble.cc
index 7f1d067b3a..3187f39d70 100644
--- a/system/stack/l2cap/l2c_ble.cc
+++ b/system/stack/l2cap/l2c_ble.cc
@@ -27,7 +27,6 @@
#include <base/logging.h>
#include <base/strings/stringprintf.h>
#include <bluetooth/log.h>
-#include <log/log.h>
#ifdef __ANDROID__
#include <android/sysprop/BluetoothProperties.sysprop.h>
diff --git a/system/stack/l2cap/l2c_ble_conn_params.cc b/system/stack/l2cap/l2c_ble_conn_params.cc
index 8cd618d4a4..ec9a988402 100644
--- a/system/stack/l2cap/l2c_ble_conn_params.cc
+++ b/system/stack/l2cap/l2c_ble_conn_params.cc
@@ -27,7 +27,6 @@
#include <base/logging.h>
#include <bluetooth/log.h>
-#include <log/log.h>
#include "hci/controller_interface.h"
#include "internal_include/stack_config.h"
diff --git a/system/stack/rfcomm/rfc_ts_frames.cc b/system/stack/rfcomm/rfc_ts_frames.cc
index 03a80cbe05..e3e9a2b619 100644
--- a/system/stack/rfcomm/rfc_ts_frames.cc
+++ b/system/stack/rfcomm/rfc_ts_frames.cc
@@ -26,7 +26,6 @@
#include <base/logging.h>
#include <bluetooth/log.h>
-#include <log/log.h>
#include <cstdint>
diff --git a/system/stack/sdp/sdp_utils.cc b/system/stack/sdp/sdp_utils.cc
index 14a3863043..2398595896 100644
--- a/system/stack/sdp/sdp_utils.cc
+++ b/system/stack/sdp/sdp_utils.cc
@@ -26,7 +26,6 @@
#include <android_bluetooth_flags.h>
#include <base/logging.h>
#include <bluetooth/log.h>
-#include <log/log.h>
#include <array>
#include <cstdint>
diff --git a/system/test/mock/mock_osi_config.h b/system/test/mock/mock_osi_config.h
index ee9dce58a3..d3b884dcd0 100644
--- a/system/test/mock/mock_osi_config.h
+++ b/system/test/mock/mock_osi_config.h
@@ -30,7 +30,6 @@
#include <base/logging.h>
#include <fcntl.h>
#include <libgen.h>
-#include <log/log.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
diff --git a/system/vendor_libs/linux/interface/h4_protocol.cc b/system/vendor_libs/linux/interface/h4_protocol.cc
index 2ff11fe27f..6ba1664261 100644
--- a/system/vendor_libs/linux/interface/h4_protocol.cc
+++ b/system/vendor_libs/linux/interface/h4_protocol.cc
@@ -14,14 +14,14 @@
// limitations under the License.
//
+#define LOG_TAG "android.hardware.bluetooth-hci-h4"
+
#include "h4_protocol.h"
-#define LOG_TAG "android.hardware.bluetooth-hci-h4"
-#include <android-base/logging.h>
#include <assert.h>
#include <fcntl.h>
+#include <log/log.h>
#include <sys/uio.h>
-#include <utils/Log.h>
namespace android {
namespace hardware {
diff --git a/system/vendor_libs/linux/interface/h4_protocol_unittest.cc b/system/vendor_libs/linux/interface/h4_protocol_unittest.cc
index 882b4b57a6..64f095c8e0 100644
--- a/system/vendor_libs/linux/interface/h4_protocol_unittest.cc
+++ b/system/vendor_libs/linux/interface/h4_protocol_unittest.cc
@@ -31,7 +31,6 @@
#include <vector>
#include "async_fd_watcher.h"
-#include "log/log.h"
using android::hardware::bluetooth::async::AsyncFdWatcher;
using android::hardware::bluetooth::hci::H4Protocol;
diff --git a/system/vendor_libs/linux/interface/hci_packetizer.cc b/system/vendor_libs/linux/interface/hci_packetizer.cc
index f3460aa3cf..aeccb06f6a 100644
--- a/system/vendor_libs/linux/interface/hci_packetizer.cc
+++ b/system/vendor_libs/linux/interface/hci_packetizer.cc
@@ -19,7 +19,6 @@
#define LOG_TAG "android.hardware.bluetooth.hci_packetizer"
#include <dlfcn.h>
#include <fcntl.h>
-#include <log/log.h>
namespace {
diff --git a/tools/rootcanal/hal/bluetooth_hci.cc b/tools/rootcanal/hal/bluetooth_hci.cc
index d63b870843..34cda65d7b 100644
--- a/tools/rootcanal/hal/bluetooth_hci.cc
+++ b/tools/rootcanal/hal/bluetooth_hci.cc
@@ -24,7 +24,6 @@
#include <string.h>
#include "hci_internals.h"
-#include "log/log.h"
#include "model/devices/hci_device.h"
#include "model/devices/link_layer_socket_device.h"
#include "model/hci/hci_socket_transport.h"