Loading system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +2 −4 Original line number Diff line number Diff line Loading @@ -807,6 +807,7 @@ void DualModeController::WriteSecureConnectionsHostSupport( void DualModeController::SetEventMask(CommandPacketView command) { auto command_view = gd_hci::SetEventMaskView::Create(command); ASSERT(command_view.IsValid()); properties_.SetEventMask(command_view.GetEventMask()); auto packet = bluetooth::hci::SetEventMaskCompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS); send_event_(std::move(packet)); Loading Loading @@ -1412,10 +1413,7 @@ void DualModeController::RemoteNameRequest(CommandPacketView command) { void DualModeController::LeSetEventMask(CommandPacketView command) { auto command_view = gd_hci::LeSetEventMaskView::Create(command); ASSERT(command_view.IsValid()); /* uint64_t mask = args.begin().extract<uint64_t>(); link_layer_controller_.SetLeEventMask(mask); */ properties_.SetLeEventMask(command_view.GetLeEventMask()); auto packet = bluetooth::hci::LeSetEventMaskCompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS); send_event_(std::move(packet)); Loading system/vendor_libs/test_vendor_lib/model/devices/device_properties.h +14 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,10 @@ class DeviceProperties { clock_offset_ = offset; } uint64_t GetEventMask() const { return event_mask_; } void SetEventMask(uint64_t mask) { event_mask_ = mask; } // Low-Energy functions const Address& GetLeAddress() const { return le_address_; Loading Loading @@ -278,6 +282,14 @@ class DeviceProperties { le_supported_features_ = features; } bool GetLeEventSupported(bluetooth::hci::SubeventCode subevent_code) const { return le_event_mask_ & (1u << static_cast<uint64_t>(subevent_code)); } uint64_t GetLeEventMask() const { return le_event_mask_; } void SetLeEventMask(uint64_t mask) { le_event_mask_ = mask; } // Specification Version 4.2, Volume 2, Part E, Section 7.8.14 uint8_t GetLeConnectListSize() const { return le_connect_list_size_; } Loading Loading @@ -308,6 +320,7 @@ class DeviceProperties { uint16_t manufacturer_name_; uint16_t lmp_pal_subversion_; uint64_t supported_features_{}; uint64_t event_mask_{0x00001fffffffffff}; uint8_t authentication_enable_{}; std::vector<uint8_t> supported_codecs_; std::vector<uint32_t> vendor_specific_codecs_; Loading @@ -328,6 +341,7 @@ class DeviceProperties { uint8_t le_resolving_list_size_; uint64_t le_supported_features_{0x075b3fd8fe8ffeff}; uint64_t le_supported_states_; uint64_t le_event_mask_{0x01f}; std::vector<uint8_t> le_vendor_cap_; Address le_address_{}; uint8_t le_address_type_{}; Loading Loading
system/vendor_libs/test_vendor_lib/model/controller/dual_mode_controller.cc +2 −4 Original line number Diff line number Diff line Loading @@ -807,6 +807,7 @@ void DualModeController::WriteSecureConnectionsHostSupport( void DualModeController::SetEventMask(CommandPacketView command) { auto command_view = gd_hci::SetEventMaskView::Create(command); ASSERT(command_view.IsValid()); properties_.SetEventMask(command_view.GetEventMask()); auto packet = bluetooth::hci::SetEventMaskCompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS); send_event_(std::move(packet)); Loading Loading @@ -1412,10 +1413,7 @@ void DualModeController::RemoteNameRequest(CommandPacketView command) { void DualModeController::LeSetEventMask(CommandPacketView command) { auto command_view = gd_hci::LeSetEventMaskView::Create(command); ASSERT(command_view.IsValid()); /* uint64_t mask = args.begin().extract<uint64_t>(); link_layer_controller_.SetLeEventMask(mask); */ properties_.SetLeEventMask(command_view.GetLeEventMask()); auto packet = bluetooth::hci::LeSetEventMaskCompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS); send_event_(std::move(packet)); Loading
system/vendor_libs/test_vendor_lib/model/devices/device_properties.h +14 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,10 @@ class DeviceProperties { clock_offset_ = offset; } uint64_t GetEventMask() const { return event_mask_; } void SetEventMask(uint64_t mask) { event_mask_ = mask; } // Low-Energy functions const Address& GetLeAddress() const { return le_address_; Loading Loading @@ -278,6 +282,14 @@ class DeviceProperties { le_supported_features_ = features; } bool GetLeEventSupported(bluetooth::hci::SubeventCode subevent_code) const { return le_event_mask_ & (1u << static_cast<uint64_t>(subevent_code)); } uint64_t GetLeEventMask() const { return le_event_mask_; } void SetLeEventMask(uint64_t mask) { le_event_mask_ = mask; } // Specification Version 4.2, Volume 2, Part E, Section 7.8.14 uint8_t GetLeConnectListSize() const { return le_connect_list_size_; } Loading Loading @@ -308,6 +320,7 @@ class DeviceProperties { uint16_t manufacturer_name_; uint16_t lmp_pal_subversion_; uint64_t supported_features_{}; uint64_t event_mask_{0x00001fffffffffff}; uint8_t authentication_enable_{}; std::vector<uint8_t> supported_codecs_; std::vector<uint32_t> vendor_specific_codecs_; Loading @@ -328,6 +341,7 @@ class DeviceProperties { uint8_t le_resolving_list_size_; uint64_t le_supported_features_{0x075b3fd8fe8ffeff}; uint64_t le_supported_states_; uint64_t le_event_mask_{0x01f}; std::vector<uint8_t> le_vendor_cap_; Address le_address_{}; uint8_t le_address_type_{}; Loading