diff options
author | 2025-01-16 09:48:06 +0000 | |
---|---|---|
committer | 2025-01-16 09:52:20 +0000 | |
commit | 4702097b062e8cd87074800a54363916a37c1ffd (patch) | |
tree | 79249135710fe378435baa70af2c89ab8b39ac7a /tools | |
parent | 26940a382ce404c4bb532d0202dbd423b4720ebc (diff) |
Resolve compilation error in android.hardware.bluetooth@1.1-service.sim
system/core/libutils/include/utils/StrongPointer.h:287:14: error: member access into incomplete type 'android::hardware::bluetooth::V1_1::sim::BluetoothDeathRecipient'
287 | m_ptr->decStrong(this);
| ^
...odules/Bluetooth/tools/rootcanal/hal/bluetooth_hci.h:47:7: note: in instantiation of member function 'android::sp<android::hardware::bluetooth::V1_1::sim::BluetoothDeathRecipient>::~sp' requested here
47 | class BluetoothHci : public IBluetoothHci {
| ^
packages/modules/Bluetooth/tools/rootcanal/hal/bluetooth_hci.h:37:7: note: forward declaration of 'android::hardware::bluetooth::V1_1::sim::BluetoothDeathRecipient'
37 | class BluetoothDeathRecipient;
| ^
Bug: 331817295
Test: m android.hardware.bluetooth@1.1-service.sim
Flag: EXEMPT, tool change
Change-Id: I457340ed0edd22f3253d74ded3b28ca567263959
Diffstat (limited to 'tools')
-rw-r--r-- | tools/rootcanal/hal/bluetooth_hci.cc | 18 | ||||
-rw-r--r-- | tools/rootcanal/hal/bluetooth_hci.h | 20 |
2 files changed, 20 insertions, 18 deletions
diff --git a/tools/rootcanal/hal/bluetooth_hci.cc b/tools/rootcanal/hal/bluetooth_hci.cc index b08d59995b..b36c18687d 100644 --- a/tools/rootcanal/hal/bluetooth_hci.cc +++ b/tools/rootcanal/hal/bluetooth_hci.cc @@ -53,24 +53,6 @@ bool BtTestConsoleEnabled() { } // namespace -class BluetoothDeathRecipient : public hidl_death_recipient { -public: - BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {} - - void serviceDied(uint64_t /* cookie */, - const wp<::android::hidl::base::V1_0::IBase>& /* who */) override { - ALOGE("BluetoothDeathRecipient::serviceDied - Bluetooth service died"); - has_died_ = true; - mHci->close(); - } - sp<IBluetoothHci> mHci; - bool getHasDied() const { return has_died_; } - void setHasDied(bool has_died) { has_died_ = has_died; } - -private: - bool has_died_{false}; -}; - BluetoothHci::BluetoothHci() : death_recipient_(new BluetoothDeathRecipient(this)) {} Return<void> BluetoothHci::initialize(const sp<V1_0::IBluetoothHciCallbacks>& cb) { diff --git a/tools/rootcanal/hal/bluetooth_hci.h b/tools/rootcanal/hal/bluetooth_hci.h index 95bda38957..95e3e45334 100644 --- a/tools/rootcanal/hal/bluetooth_hci.h +++ b/tools/rootcanal/hal/bluetooth_hci.h @@ -18,6 +18,7 @@ #include <android/hardware/bluetooth/1.1/IBluetoothHci.h> #include <hidl/MQDescriptor.h> +#include <log/log.h> #include "hci_packetizer.h" #include "model/controller/dual_mode_controller.h" @@ -44,6 +45,25 @@ using android::net::ConnectCallback; using rootcanal::Device; using rootcanal::Phy; +class BluetoothDeathRecipient : public hidl_death_recipient { +public: + BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {} + + void serviceDied(uint64_t /* cookie */, + const wp<::android::hidl::base::V1_0::IBase>& /* who */) override { + ALOGE("BluetoothDeathRecipient::serviceDied - Bluetooth service died"); + has_died_ = true; + mHci->close(); + } + + sp<IBluetoothHci> mHci; + bool getHasDied() const { return has_died_; } + void setHasDied(bool has_died) { has_died_ = has_died; } + +private: + bool has_died_{false}; +}; + class BluetoothHci : public IBluetoothHci { public: BluetoothHci(); |