Loading system/gd/hci/acl_manager/classic_acl_connection_test.cc +6 −4 Original line number Diff line number Diff line Loading @@ -124,8 +124,9 @@ class TestAclConnectionInterface : public hci::AclConnectionInterface { command_queue_.push(std::move(command)); command_status_callbacks.push_back(std::move(on_status)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -136,8 +137,9 @@ class TestAclConnectionInterface : public hci::AclConnectionInterface { command_queue_.push(std::move(command)); command_complete_callbacks.push_back(std::move(on_complete)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading system/gd/hci/acl_manager/le_acl_connection_test.cc +6 −4 Original line number Diff line number Diff line Loading @@ -102,8 +102,9 @@ class TestLeAclConnectionInterface : public hci::LeAclConnectionInterface { command_queue_.push(std::move(command)); command_status_callbacks.push_back(std::move(on_status)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -114,8 +115,9 @@ class TestLeAclConnectionInterface : public hci::LeAclConnectionInterface { command_queue_.push(std::move(command)); command_complete_callbacks.push_back(std::move(on_complete)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading system/gd/hci/acl_manager/le_impl_test.cc +6 −4 Original line number Diff line number Diff line Loading @@ -256,8 +256,9 @@ class TestHciLayer : public HciLayer { command_queue_.push(std::move(command)); command_status_callbacks.push_back(std::move(on_status)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -268,8 +269,9 @@ class TestHciLayer : public HciLayer { command_queue_.push(std::move(command)); command_complete_callbacks.push_back(std::move(on_complete)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading system/gd/hci/acl_manager_unittest.cc +6 −4 Original line number Diff line number Diff line Loading @@ -320,8 +320,9 @@ class TestHciLayer : public HciLayer { private: void Notify() { if (hci_command_promise_ != nullptr) { hci_command_promise_->set_value(); hci_command_promise_.reset(); std::promise<void>* prom = hci_command_promise_.release(); prom->set_value(); delete prom; } } Loading Loading @@ -372,8 +373,9 @@ class MockLeConnectionCallbacks : public LeConnectionCallbacks { void OnLeConnectSuccess(AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection) override { le_connections_.push_back(std::move(connection)); if (le_connection_promise_ != nullptr) { le_connection_promise_->set_value(); le_connection_promise_.reset(); std::promise<void>* prom = le_connection_promise_.release(); prom->set_value(); delete prom; } } MOCK_METHOD(void, OnLeConnectFail, (AddressWithType, ErrorCode reason, bool locally_initiated), (override)); Loading system/gd/hci/hci_layer_test.cc +9 −9 Original line number Diff line number Diff line Loading @@ -84,18 +84,18 @@ class TestHciHal : public hal::HciHal { void sendHciCommand(hal::HciPacket command) override { outgoing_commands_.push_back(std::move(command)); if (sent_command_promise_ != nullptr) { auto promise = std::move(sent_command_promise_); sent_command_promise_.reset(); promise->set_value(); std::promise<void>* prom = sent_command_promise_.release(); prom->set_value(); delete prom; } } void sendAclData(hal::HciPacket data) override { outgoing_acl_.push_back(std::move(data)); if (sent_acl_promise_ != nullptr) { auto promise = std::move(sent_acl_promise_); sent_acl_promise_.reset(); promise->set_value(); std::promise<void>* prom = sent_acl_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -106,9 +106,9 @@ class TestHciHal : public hal::HciHal { void sendIsoData(hal::HciPacket data) override { outgoing_iso_.push_back(std::move(data)); if (sent_iso_promise_ != nullptr) { auto promise = std::move(sent_iso_promise_); sent_iso_promise_.reset(); promise->set_value(); std::promise<void>* prom = sent_iso_promise_.release(); prom->set_value(); delete prom; } } Loading Loading
system/gd/hci/acl_manager/classic_acl_connection_test.cc +6 −4 Original line number Diff line number Diff line Loading @@ -124,8 +124,9 @@ class TestAclConnectionInterface : public hci::AclConnectionInterface { command_queue_.push(std::move(command)); command_status_callbacks.push_back(std::move(on_status)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -136,8 +137,9 @@ class TestAclConnectionInterface : public hci::AclConnectionInterface { command_queue_.push(std::move(command)); command_complete_callbacks.push_back(std::move(on_complete)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading
system/gd/hci/acl_manager/le_acl_connection_test.cc +6 −4 Original line number Diff line number Diff line Loading @@ -102,8 +102,9 @@ class TestLeAclConnectionInterface : public hci::LeAclConnectionInterface { command_queue_.push(std::move(command)); command_status_callbacks.push_back(std::move(on_status)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -114,8 +115,9 @@ class TestLeAclConnectionInterface : public hci::LeAclConnectionInterface { command_queue_.push(std::move(command)); command_complete_callbacks.push_back(std::move(on_complete)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading
system/gd/hci/acl_manager/le_impl_test.cc +6 −4 Original line number Diff line number Diff line Loading @@ -256,8 +256,9 @@ class TestHciLayer : public HciLayer { command_queue_.push(std::move(command)); command_status_callbacks.push_back(std::move(on_status)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -268,8 +269,9 @@ class TestHciLayer : public HciLayer { command_queue_.push(std::move(command)); command_complete_callbacks.push_back(std::move(on_complete)); if (command_promise_ != nullptr) { command_promise_->set_value(); command_promise_.reset(); std::promise<void>* prom = command_promise_.release(); prom->set_value(); delete prom; } } Loading
system/gd/hci/acl_manager_unittest.cc +6 −4 Original line number Diff line number Diff line Loading @@ -320,8 +320,9 @@ class TestHciLayer : public HciLayer { private: void Notify() { if (hci_command_promise_ != nullptr) { hci_command_promise_->set_value(); hci_command_promise_.reset(); std::promise<void>* prom = hci_command_promise_.release(); prom->set_value(); delete prom; } } Loading Loading @@ -372,8 +373,9 @@ class MockLeConnectionCallbacks : public LeConnectionCallbacks { void OnLeConnectSuccess(AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection) override { le_connections_.push_back(std::move(connection)); if (le_connection_promise_ != nullptr) { le_connection_promise_->set_value(); le_connection_promise_.reset(); std::promise<void>* prom = le_connection_promise_.release(); prom->set_value(); delete prom; } } MOCK_METHOD(void, OnLeConnectFail, (AddressWithType, ErrorCode reason, bool locally_initiated), (override)); Loading
system/gd/hci/hci_layer_test.cc +9 −9 Original line number Diff line number Diff line Loading @@ -84,18 +84,18 @@ class TestHciHal : public hal::HciHal { void sendHciCommand(hal::HciPacket command) override { outgoing_commands_.push_back(std::move(command)); if (sent_command_promise_ != nullptr) { auto promise = std::move(sent_command_promise_); sent_command_promise_.reset(); promise->set_value(); std::promise<void>* prom = sent_command_promise_.release(); prom->set_value(); delete prom; } } void sendAclData(hal::HciPacket data) override { outgoing_acl_.push_back(std::move(data)); if (sent_acl_promise_ != nullptr) { auto promise = std::move(sent_acl_promise_); sent_acl_promise_.reset(); promise->set_value(); std::promise<void>* prom = sent_acl_promise_.release(); prom->set_value(); delete prom; } } Loading @@ -106,9 +106,9 @@ class TestHciHal : public hal::HciHal { void sendIsoData(hal::HciPacket data) override { outgoing_iso_.push_back(std::move(data)); if (sent_iso_promise_ != nullptr) { auto promise = std::move(sent_iso_promise_); sent_iso_promise_.reset(); promise->set_value(); std::promise<void>* prom = sent_iso_promise_.release(); prom->set_value(); delete prom; } } Loading