Loading system/build/Android.bp +0 −8 Original line number Diff line number Diff line Loading @@ -83,10 +83,6 @@ cc_defaults { clang_cflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading @@ -105,10 +101,6 @@ cc_defaults { ldflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading system/gd/Android.bp +0 −8 Original line number Diff line number Diff line Loading @@ -49,10 +49,6 @@ cc_defaults { clang_cflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading @@ -71,10 +67,6 @@ cc_defaults { ldflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading system/gd/common/Android.bp +0 −4 Original line number Diff line number Diff line filegroup { name: "BluetoothCommonSources", srcs: [ "address.cc", "class_of_device.cc", "link_key.cc", ], } Loading @@ -10,9 +8,7 @@ filegroup { filegroup { name: "BluetoothCommonTestSources", srcs: [ "address_unittest.cc", "blocking_queue_unittest.cc", "class_of_device_unittest.cc", "bidi_queue_unittest.cc", "observer_registry_test.cc", "link_key_unittest.cc", Loading system/gd/hci/Android.bp +10 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ filegroup { "acl_manager.cc", "classic_security_manager.cc", "controller.cc", "address.cc", "class_of_device.cc", "device.cc", "device_database.cc", "hci_layer.cc", ], } Loading @@ -15,7 +19,13 @@ filegroup { "acl_manager_test.cc", "classic_security_manager_test.cc", "controller_test.cc", "address_unittest.cc", "class_of_device_unittest.cc", "device_test.cc", "device_database_test.cc", "dual_device_test.cc", "hci_layer_test.cc", "hci_packets_test.cc", ], } Loading system/gd/hci/acl_manager.cc +10 −10 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ struct AclManager::impl { common::Bind(&impl::incoming_acl_credits, common::Unretained(this)), handler_); // TODO: determine when we should reject connection should_accept_connection_ = common::Bind([](common::Address, common::ClassOfDevice) { return true; }); should_accept_connection_ = common::Bind([](Address, ClassOfDevice) { return true; }); hci_queue_end_ = hci_layer_->GetAclQueueEnd(); hci_queue_end_->RegisterDequeue( handler_, common::Bind(&impl::dequeue_and_route_acl_packet_to_connection, common::Unretained(this))); Loading Loading @@ -204,7 +204,7 @@ struct AclManager::impl { void on_incoming_connection(EventPacketView packet) { ConnectionRequestView request = ConnectionRequestView::Create(packet); ASSERT(request.IsValid()); common::Address address = request.GetBdAddr(); Address address = request.GetBdAddr(); if (client_callbacks_ == nullptr) { LOG_ERROR("No callbacks to call"); auto reason = RejectConnectionReason::LIMITED_RESOURCES; Loading Loading @@ -267,7 +267,7 @@ struct AclManager::impl { } } void create_connection(common::Address address) { void create_connection(Address address) { // TODO: Configure default connection parameters? uint16_t packet_type = 0x4408 /* DM 1,3,5 */ | 0x8810 /*DH 1,3,5 */; PageScanRepetitionMode page_scan_repetition_mode = PageScanRepetitionMode::R1; Loading @@ -287,7 +287,7 @@ struct AclManager::impl { handler_); } void cancel_connect(common::Address address) { void cancel_connect(Address address) { auto connecting_addr = connecting_.find(address); if (connecting_addr == connecting_.end()) { LOG_INFO("Cannot cancel non-existent connection to %s", address.ToString().c_str()); Loading @@ -299,7 +299,7 @@ struct AclManager::impl { handler_); } void accept_connection(common::Address address) { void accept_connection(Address address) { auto role = AcceptConnectionRequestRole::BECOME_MASTER; // We prefer to be master hci_layer_->EnqueueCommand(AcceptConnectionRequestBuilder::Create(address, role), common::BindOnce(&impl::on_accept_connection_status, common::Unretained(this), address), Loading @@ -323,7 +323,7 @@ struct AclManager::impl { acl_connections_.erase(handle); } void on_accept_connection_status(common::Address address, CommandStatusView status) { void on_accept_connection_status(Address address, CommandStatusView status) { auto accept_status = AcceptConnectionRequestStatusView::Create(status); ASSERT(accept_status.IsValid()); if (status.GetStatus() != ErrorCode::SUCCESS) { Loading Loading @@ -398,8 +398,8 @@ struct AclManager::impl { os::Handler* client_handler_ = nullptr; common::BidiQueueEnd<AclPacketBuilder, AclPacketView>* hci_queue_end_ = nullptr; std::map<uint16_t, AclManager::acl_connection> acl_connections_; std::set<common::Address> connecting_; common::Callback<bool(common::Address, common::ClassOfDevice)> should_accept_connection_; std::set<Address> connecting_; common::Callback<bool(Address, ClassOfDevice)> should_accept_connection_; }; AclConnection::QueueUpEnd* AclConnection::GetAclQueueEnd() const { Loading Loading @@ -428,11 +428,11 @@ bool AclManager::RegisterCallbacks(ConnectionCallbacks* callbacks, os::Handler* return true; } void AclManager::CreateConnection(common::Address address) { void AclManager::CreateConnection(Address address) { GetHandler()->Post(common::BindOnce(&impl::create_connection, common::Unretained(pimpl_.get()), address)); } void AclManager::CancelConnect(common::Address address) { void AclManager::CancelConnect(Address address) { GetHandler()->Post(BindOnce(&impl::cancel_connect, common::Unretained(pimpl_.get()), address)); } Loading Loading
system/build/Android.bp +0 −8 Original line number Diff line number Diff line Loading @@ -83,10 +83,6 @@ cc_defaults { clang_cflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading @@ -105,10 +101,6 @@ cc_defaults { ldflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading
system/gd/Android.bp +0 −8 Original line number Diff line number Diff line Loading @@ -49,10 +49,6 @@ cc_defaults { clang_cflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading @@ -71,10 +67,6 @@ cc_defaults { ldflags: [ "-fprofile-instr-generate", "-fcoverage-mapping", // New pass manager does not work with -fprofile-instr-generate yet. // http://b/131132095 "-fno-experimental-new-pass-manager", ], }, }, Loading
system/gd/common/Android.bp +0 −4 Original line number Diff line number Diff line filegroup { name: "BluetoothCommonSources", srcs: [ "address.cc", "class_of_device.cc", "link_key.cc", ], } Loading @@ -10,9 +8,7 @@ filegroup { filegroup { name: "BluetoothCommonTestSources", srcs: [ "address_unittest.cc", "blocking_queue_unittest.cc", "class_of_device_unittest.cc", "bidi_queue_unittest.cc", "observer_registry_test.cc", "link_key_unittest.cc", Loading
system/gd/hci/Android.bp +10 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ filegroup { "acl_manager.cc", "classic_security_manager.cc", "controller.cc", "address.cc", "class_of_device.cc", "device.cc", "device_database.cc", "hci_layer.cc", ], } Loading @@ -15,7 +19,13 @@ filegroup { "acl_manager_test.cc", "classic_security_manager_test.cc", "controller_test.cc", "address_unittest.cc", "class_of_device_unittest.cc", "device_test.cc", "device_database_test.cc", "dual_device_test.cc", "hci_layer_test.cc", "hci_packets_test.cc", ], } Loading
system/gd/hci/acl_manager.cc +10 −10 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ struct AclManager::impl { common::Bind(&impl::incoming_acl_credits, common::Unretained(this)), handler_); // TODO: determine when we should reject connection should_accept_connection_ = common::Bind([](common::Address, common::ClassOfDevice) { return true; }); should_accept_connection_ = common::Bind([](Address, ClassOfDevice) { return true; }); hci_queue_end_ = hci_layer_->GetAclQueueEnd(); hci_queue_end_->RegisterDequeue( handler_, common::Bind(&impl::dequeue_and_route_acl_packet_to_connection, common::Unretained(this))); Loading Loading @@ -204,7 +204,7 @@ struct AclManager::impl { void on_incoming_connection(EventPacketView packet) { ConnectionRequestView request = ConnectionRequestView::Create(packet); ASSERT(request.IsValid()); common::Address address = request.GetBdAddr(); Address address = request.GetBdAddr(); if (client_callbacks_ == nullptr) { LOG_ERROR("No callbacks to call"); auto reason = RejectConnectionReason::LIMITED_RESOURCES; Loading Loading @@ -267,7 +267,7 @@ struct AclManager::impl { } } void create_connection(common::Address address) { void create_connection(Address address) { // TODO: Configure default connection parameters? uint16_t packet_type = 0x4408 /* DM 1,3,5 */ | 0x8810 /*DH 1,3,5 */; PageScanRepetitionMode page_scan_repetition_mode = PageScanRepetitionMode::R1; Loading @@ -287,7 +287,7 @@ struct AclManager::impl { handler_); } void cancel_connect(common::Address address) { void cancel_connect(Address address) { auto connecting_addr = connecting_.find(address); if (connecting_addr == connecting_.end()) { LOG_INFO("Cannot cancel non-existent connection to %s", address.ToString().c_str()); Loading @@ -299,7 +299,7 @@ struct AclManager::impl { handler_); } void accept_connection(common::Address address) { void accept_connection(Address address) { auto role = AcceptConnectionRequestRole::BECOME_MASTER; // We prefer to be master hci_layer_->EnqueueCommand(AcceptConnectionRequestBuilder::Create(address, role), common::BindOnce(&impl::on_accept_connection_status, common::Unretained(this), address), Loading @@ -323,7 +323,7 @@ struct AclManager::impl { acl_connections_.erase(handle); } void on_accept_connection_status(common::Address address, CommandStatusView status) { void on_accept_connection_status(Address address, CommandStatusView status) { auto accept_status = AcceptConnectionRequestStatusView::Create(status); ASSERT(accept_status.IsValid()); if (status.GetStatus() != ErrorCode::SUCCESS) { Loading Loading @@ -398,8 +398,8 @@ struct AclManager::impl { os::Handler* client_handler_ = nullptr; common::BidiQueueEnd<AclPacketBuilder, AclPacketView>* hci_queue_end_ = nullptr; std::map<uint16_t, AclManager::acl_connection> acl_connections_; std::set<common::Address> connecting_; common::Callback<bool(common::Address, common::ClassOfDevice)> should_accept_connection_; std::set<Address> connecting_; common::Callback<bool(Address, ClassOfDevice)> should_accept_connection_; }; AclConnection::QueueUpEnd* AclConnection::GetAclQueueEnd() const { Loading Loading @@ -428,11 +428,11 @@ bool AclManager::RegisterCallbacks(ConnectionCallbacks* callbacks, os::Handler* return true; } void AclManager::CreateConnection(common::Address address) { void AclManager::CreateConnection(Address address) { GetHandler()->Post(common::BindOnce(&impl::create_connection, common::Unretained(pimpl_.get()), address)); } void AclManager::CancelConnect(common::Address address) { void AclManager::CancelConnect(Address address) { GetHandler()->Post(BindOnce(&impl::cancel_connect, common::Unretained(pimpl_.get()), address)); } Loading