Loading system/test/rootcanal/bluetooth_hci.cc +13 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "bluetooth_hci.h" #include "bluetooth_hci.h" #include <base/logging.h> #include <base/logging.h> #include <cutils/properties.h> #include <string.h> #include <string.h> #include <utils/Log.h> #include <utils/Log.h> Loading @@ -44,6 +45,15 @@ using test_vendor_lib::ScoPacket; using test_vendor_lib::TaskCallback; using test_vendor_lib::TaskCallback; using test_vendor_lib::TestChannelTransport; using test_vendor_lib::TestChannelTransport; namespace { bool BtTestConsoleEnabled() { // Assume enabled by default. return property_get_bool("bt.rootcanal_test_console", true); } } // namespace class BluetoothDeathRecipient : public hidl_death_recipient { class BluetoothDeathRecipient : public hidl_death_recipient { public: public: BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {} BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {} Loading Loading @@ -130,7 +140,9 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) { controller_.RegisterTaskCancel( controller_.RegisterTaskCancel( [this](AsyncTaskId task) { async_manager_.CancelAsyncTask(task); }); [this](AsyncTaskId task) { async_manager_.CancelAsyncTask(task); }); if (BtTestConsoleEnabled()) { SetUpTestChannel(6111); SetUpTestChannel(6111); } unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) { unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) { if (death_recipient->getHasDied()) if (death_recipient->getHasDied()) Loading Loading
system/test/rootcanal/bluetooth_hci.cc +13 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "bluetooth_hci.h" #include "bluetooth_hci.h" #include <base/logging.h> #include <base/logging.h> #include <cutils/properties.h> #include <string.h> #include <string.h> #include <utils/Log.h> #include <utils/Log.h> Loading @@ -44,6 +45,15 @@ using test_vendor_lib::ScoPacket; using test_vendor_lib::TaskCallback; using test_vendor_lib::TaskCallback; using test_vendor_lib::TestChannelTransport; using test_vendor_lib::TestChannelTransport; namespace { bool BtTestConsoleEnabled() { // Assume enabled by default. return property_get_bool("bt.rootcanal_test_console", true); } } // namespace class BluetoothDeathRecipient : public hidl_death_recipient { class BluetoothDeathRecipient : public hidl_death_recipient { public: public: BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {} BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {} Loading Loading @@ -130,7 +140,9 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) { controller_.RegisterTaskCancel( controller_.RegisterTaskCancel( [this](AsyncTaskId task) { async_manager_.CancelAsyncTask(task); }); [this](AsyncTaskId task) { async_manager_.CancelAsyncTask(task); }); if (BtTestConsoleEnabled()) { SetUpTestChannel(6111); SetUpTestChannel(6111); } unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) { unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) { if (death_recipient->getHasDied()) if (death_recipient->getHasDied()) Loading