Loading system/gd/hci/acl_manager/le_connection_callbacks.h +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class LeConnectionCallbacks { // AddressWithType is always equal to the object used in AclManager#CreateLeConnection virtual void OnLeConnectSuccess(AddressWithType, std::unique_ptr<LeAclConnection>) = 0; // Invoked when create connection timeout or controller sends Connection Complete event with non-Success error code virtual void OnLeConnectFail(AddressWithType, ErrorCode reason, bool locally_initiated) = 0; virtual void OnLeConnectFail(AddressWithType, ErrorCode reason) = 0; }; } // namespace acl_manager Loading system/gd/hci/acl_manager/le_connection_callbacks_mock.h +1 −4 Original line number Diff line number Diff line Loading @@ -36,10 +36,7 @@ class MockLeConnectionCallbacks : public LeConnectionCallbacks { (AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection), (override)); MOCK_METHOD( void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason, bool locally_initiated), (override)); void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason), (override)); }; } // namespace acl_manager Loading system/gd/hci/acl_manager/le_impl.h +5 −10 Original line number Diff line number Diff line Loading @@ -390,8 +390,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, true /* locally_initiated */)); status)); return; } } else { Loading @@ -408,8 +407,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, false /* locally_initiated */)); status)); return; } Loading Loading @@ -545,8 +543,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, true /* locally_initiated */)); status)); return; } Loading @@ -564,8 +561,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, false /* locally_initiated */)); status)); return; } Loading Loading @@ -1129,8 +1125,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), address_with_type, ErrorCode::CONNECTION_ACCEPT_TIMEOUT, true /* locally_initiated */)); ErrorCode::CONNECTION_ACCEPT_TIMEOUT)); } } Loading system/gd/hci/acl_manager/le_impl_test.cc +4 −2 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ class MockLeConnectionCallbacks : public LeConnectionCallbacks { (AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection), (override)); MOCK_METHOD( void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason, bool locally_initiated), (override)); void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason), (override)); }; class MockLeConnectionManagementCallbacks : public LeConnectionManagementCallbacks { Loading Loading @@ -1477,7 +1477,9 @@ TEST_F(LeImplTest, on_le_connection_canceled_on_pause) { } TEST_F(LeImplTest, on_create_connection_timeout) { EXPECT_CALL(mock_le_connection_callbacks_, OnLeConnectFail(_, ErrorCode::CONNECTION_ACCEPT_TIMEOUT, _)).Times(1); EXPECT_CALL( mock_le_connection_callbacks_, OnLeConnectFail(_, ErrorCode::CONNECTION_ACCEPT_TIMEOUT)) .Times(1); le_impl_->create_connection_timeout_alarms_.emplace( std::piecewise_construct, std::forward_as_tuple( Loading system/gd/hci/acl_manager_test.cc +1 −2 Original line number Diff line number Diff line Loading @@ -487,8 +487,7 @@ TEST_F(AclManagerTest, invoke_registered_callback_le_connection_complete_fail) { EXPECT_CALL( mock_le_connection_callbacks_, OnLeConnectFail( remote_with_type, ErrorCode::CONNECTION_REJECTED_LIMITED_RESOURCES, /* locally_initiated */ true)); OnLeConnectFail(remote_with_type, ErrorCode::CONNECTION_REJECTED_LIMITED_RESOURCES)); test_hci_layer_->IncomingLeMetaEvent(LeConnectionCompleteBuilder::Create( ErrorCode::CONNECTION_REJECTED_LIMITED_RESOURCES, Loading Loading
system/gd/hci/acl_manager/le_connection_callbacks.h +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class LeConnectionCallbacks { // AddressWithType is always equal to the object used in AclManager#CreateLeConnection virtual void OnLeConnectSuccess(AddressWithType, std::unique_ptr<LeAclConnection>) = 0; // Invoked when create connection timeout or controller sends Connection Complete event with non-Success error code virtual void OnLeConnectFail(AddressWithType, ErrorCode reason, bool locally_initiated) = 0; virtual void OnLeConnectFail(AddressWithType, ErrorCode reason) = 0; }; } // namespace acl_manager Loading
system/gd/hci/acl_manager/le_connection_callbacks_mock.h +1 −4 Original line number Diff line number Diff line Loading @@ -36,10 +36,7 @@ class MockLeConnectionCallbacks : public LeConnectionCallbacks { (AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection), (override)); MOCK_METHOD( void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason, bool locally_initiated), (override)); void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason), (override)); }; } // namespace acl_manager Loading
system/gd/hci/acl_manager/le_impl.h +5 −10 Original line number Diff line number Diff line Loading @@ -390,8 +390,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, true /* locally_initiated */)); status)); return; } } else { Loading @@ -408,8 +407,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, false /* locally_initiated */)); status)); return; } Loading Loading @@ -545,8 +543,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, true /* locally_initiated */)); status)); return; } Loading @@ -564,8 +561,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), remote_address, status, false /* locally_initiated */)); status)); return; } Loading Loading @@ -1129,8 +1125,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback { &LeConnectionCallbacks::OnLeConnectFail, common::Unretained(le_client_callbacks_), address_with_type, ErrorCode::CONNECTION_ACCEPT_TIMEOUT, true /* locally_initiated */)); ErrorCode::CONNECTION_ACCEPT_TIMEOUT)); } } Loading
system/gd/hci/acl_manager/le_impl_test.cc +4 −2 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ class MockLeConnectionCallbacks : public LeConnectionCallbacks { (AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection), (override)); MOCK_METHOD( void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason, bool locally_initiated), (override)); void, OnLeConnectFail, (AddressWithType address_with_type, ErrorCode reason), (override)); }; class MockLeConnectionManagementCallbacks : public LeConnectionManagementCallbacks { Loading Loading @@ -1477,7 +1477,9 @@ TEST_F(LeImplTest, on_le_connection_canceled_on_pause) { } TEST_F(LeImplTest, on_create_connection_timeout) { EXPECT_CALL(mock_le_connection_callbacks_, OnLeConnectFail(_, ErrorCode::CONNECTION_ACCEPT_TIMEOUT, _)).Times(1); EXPECT_CALL( mock_le_connection_callbacks_, OnLeConnectFail(_, ErrorCode::CONNECTION_ACCEPT_TIMEOUT)) .Times(1); le_impl_->create_connection_timeout_alarms_.emplace( std::piecewise_construct, std::forward_as_tuple( Loading
system/gd/hci/acl_manager_test.cc +1 −2 Original line number Diff line number Diff line Loading @@ -487,8 +487,7 @@ TEST_F(AclManagerTest, invoke_registered_callback_le_connection_complete_fail) { EXPECT_CALL( mock_le_connection_callbacks_, OnLeConnectFail( remote_with_type, ErrorCode::CONNECTION_REJECTED_LIMITED_RESOURCES, /* locally_initiated */ true)); OnLeConnectFail(remote_with_type, ErrorCode::CONNECTION_REJECTED_LIMITED_RESOURCES)); test_hci_layer_->IncomingLeMetaEvent(LeConnectionCompleteBuilder::Create( ErrorCode::CONNECTION_REJECTED_LIMITED_RESOURCES, Loading