From 4702097b062e8cd87074800a54363916a37c1ffd Mon Sep 17 00:00:00 2001 From: Henri Chataing Date: Thu, 16 Jan 2025 09:48:06 +0000 Subject: 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::~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 --- tools/rootcanal/hal/bluetooth_hci.cc | 18 ------------------ tools/rootcanal/hal/bluetooth_hci.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'tools/rootcanal') 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 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 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 BluetoothHci::initialize(const sp& 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 #include +#include #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 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 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(); -- cgit v1.2.3-59-g8ed1b