diff options
author | JackLivio <jack@livio.io> | 2019-06-27 16:32:23 -0400 |
---|---|---|
committer | JackLivio <jack@livio.io> | 2019-06-27 16:32:23 -0400 |
commit | d6508eff81a1a675fe2a2c503781d2f8c09535d3 (patch) | |
tree | e8063a3561ecfa0302938ef6d7d07f2285bfcad1 /src/components/application_manager/rpc_plugins | |
parent | dfd7aefc38d240094e950dfdd067a30ca933a0e7 (diff) | |
parent | d9ac61f77b1fb39619dc5bf0c0841684d93cff58 (diff) | |
download | sdl_core-d6508eff81a1a675fe2a2c503781d2f8c09535d3.tar.gz |
Merge remote-tracking branch 'origin/develop' into feature/nav_subscription_buttons
Diffstat (limited to 'src/components/application_manager/rpc_plugins')
7 files changed, 266 insertions, 25 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h index 92ff7e5f01..b9f922a1be 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h @@ -152,6 +152,7 @@ const char kBand[] = "band"; const char kRdsData[] = "rdsData"; const char kHdRadioEnable[] = "hdRadioEnable"; const char kAvailableHDs[] = "availableHDs"; +const char kAvailableHdChannels[] = "availableHdChannels"; const char kHdChannel[] = "hdChannel"; const char kSignalStrength[] = "signalStrength"; const char kSignalChangeThreshold[] = "signalChangeThreshold"; @@ -176,6 +177,8 @@ const char kHeatedSteeringWheelEnable[] = "heatedSteeringWheelEnable"; const char kHeatedWindshieldEnable[] = "heatedWindshieldEnable"; const char kHeatedRearWindowEnable[] = "heatedRearWindowEnable"; const char kHeatedMirrorsEnable[] = "heatedMirrorsEnable"; +const char kClimateEnable[] = "climateEnable"; +const char kClimateEnableAvailable[] = "climateEnableAvailable"; // ClimateControlData struct // LightControlData diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc index 47363bddcd..ded96461f5 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc @@ -109,6 +109,7 @@ void GetInteriorVehicleDataRequest::FilterDisabledModuleData( module_data[message_params::kHdRadioEnable].asBool() == false) { module_data.erase(message_params::kHdChannel); module_data.erase(message_params::kAvailableHDs); + module_data.erase(message_params::kAvailableHdChannels); module_data.erase(message_params::kSisData); } } diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc index 2bf8fbbe92..44d302276d 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc @@ -55,6 +55,7 @@ std::vector<std::string> GetModuleReadOnlyParams( } else if (enums_value::kRadio == module_type) { module_ro_params.push_back(kRdsData); module_ro_params.push_back(kAvailableHDs); + module_ro_params.push_back(kAvailableHdChannels); module_ro_params.push_back(kSignalStrength); module_ro_params.push_back(kSignalChangeThreshold); module_ro_params.push_back(kState); @@ -92,6 +93,8 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() { mapping["heatedWindshieldEnable"] = "heatedWindshieldAvailable"; mapping["heatedMirrorsEnable"] = "heatedMirrorsAvailable"; mapping["heatedRearWindowEnable"] = "heatedRearWindowAvailable"; + mapping["climateEnable"] = "climateEnableAvailable"; + mapping["climateEnableAvailable"] = "climateEnableAvailable"; // radio mapping["band"] = "radioBandAvailable"; @@ -99,7 +102,8 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() { mapping["frequencyFraction"] = "radioFrequencyAvailable"; mapping["rdsData"] = "rdsDataAvailable"; mapping["availableHDs"] = "availableHDsAvailable"; - mapping["hdChannel"] = "availableHDsAvailable"; + mapping["availableHdChannels"] = "availableHdChannelsAvailable"; + mapping["hdChannel"] = "availableHdChannelsAvailable"; mapping["hdRadioEnable"] = "hdRadioEnableAvailable"; mapping["signalStrength"] = "signalStrengthAvailable"; mapping["signalChangeThreshold"] = "signalChangeThresholdAvailable"; @@ -716,21 +720,6 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams( const smart_objects::SmartObject& module_type_params = ControlData(module_data); const std::string module_type = ModuleType(); - std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type); - - for (auto& it : ro_params) { - if (module_type_params.keyExists(it)) { - if (enums_value::kClimate == module_type) { - module_data[message_params::kClimateControlData].erase(it); - } else if (enums_value::kRadio == module_type) { - module_data[message_params::kRadioControlData].erase(it); - } else { - continue; - } - - LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << it); - } - } if (enums_value::kAudio == module_type) { auto& equalizer_settings = module_data[message_params::kAudioControlData] @@ -745,6 +734,15 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams( } } } + + std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type); + const auto& data_mapping = RCHelpers::GetModuleTypeToDataMapping(); + for (const auto& param : ro_params) { + if (module_type_params.keyExists(param)) { + module_data[data_mapping(module_type)].erase(param); + LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << param); + } + } } std::string SetInteriorVehicleDataRequest::ModuleType() { diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc index 9549830cec..1adc8caf93 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc @@ -44,6 +44,7 @@ #include "rc_rpc_plugin/rc_module_constants.h" #include "rc_rpc_plugin/rc_rpc_plugin.h" +#include <stdint.h> #include <chrono> #include <thread> @@ -205,6 +206,8 @@ TEST_F(GetInteriorVehicleDataRequestTest, HMIResultCodeIs(hmi_apis::FunctionID::RC_GetInteriorVehicleData), _)) .WillOnce(Return(true)); // Act + + ASSERT_TRUE(command->Init()); command->Run(); } @@ -232,6 +235,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, HMIResultCodeIs(hmi_apis::FunctionID::RC_GetInteriorVehicleData), _)) .WillOnce(Return(true)); // Act + ASSERT_TRUE(command->Init()); command->Run(); } @@ -263,6 +267,7 @@ TEST_F( .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true))); // Act + ASSERT_TRUE(command->Init()); command->Run(); // Assert @@ -314,6 +319,7 @@ TEST_F( command = CreateRCCommand< rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); + ASSERT_TRUE(command->Init()); command->Run(); application_manager::event_engine::Event event( hmi_apis::FunctionID::RC_GetInteriorVehicleData); @@ -358,6 +364,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true))); // Act + ASSERT_TRUE(command->Init()); command->Run(); // Assert @@ -393,6 +400,7 @@ TEST_F( MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _)) .WillOnce((Return(true))); // Act + ASSERT_TRUE(command->Init()); command->Run(); } @@ -418,6 +426,7 @@ TEST_F( .WillOnce((Return(true))); // Act + ASSERT_TRUE(command->Init()); command->Run(); } @@ -458,6 +467,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, application_manager::event_engine::Event event( hmi_apis::FunctionID::RC_GetInteriorVehicleData); event.set_smart_object(*hmi_response_message); + ASSERT_TRUE(command->Init()); command->Run(); command->on_event(event); } @@ -498,6 +508,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, hmi_apis::FunctionID::RC_GetInteriorVehicleData); event.set_smart_object(*hmi_message); auto command = CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message); + ASSERT_TRUE(command->Init()); command->Run(); command->on_event(event); } @@ -542,6 +553,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, command = CreateRCCommand< rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); + ASSERT_TRUE(command->Init()); command->Run(); application_manager::event_engine::Event event( hmi_apis::FunctionID::RC_GetInteriorVehicleData); @@ -583,6 +595,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, _)) .WillRepeatedly(Return(true)); // Act + ASSERT_TRUE(command->Init()); command->Run(); } @@ -597,6 +610,130 @@ TEST_F(GetInteriorVehicleDataRequestTest, EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0); // Act + ASSERT_TRUE(command->Init()); command->Run(); } + +TEST_F(GetInteriorVehicleDataRequestTest, + OnEvent_ValidHmiResponse_AvailableHDChanelsIsArrayWithHDChanels) { + using rc_rpc_plugin::commands::GetInteriorVehicleDataRequest; + namespace hmi_response = application_manager::hmi_response; + namespace strings = application_manager::strings; + + const uint32_t chanel1_index = 1u; + const uint32_t chanel2_index = 2u; + const uint32_t chanel3_index = 3u; + + const uint32_t expected_array_length = 3u; + + // Arrange + MessageSharedPtr mobile_message = CreateBasicMessage(); + + MessageSharedPtr hmi_response_message = CreateBasicMessage(); + auto& hmi_response_params = (*hmi_response_message)[strings::msg_params]; + hmi_response_params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS; + hmi_response_params[strings::connection_key] = kAppId; + + auto& msg_params = (*hmi_response_message)[strings::msg_params]; + msg_params[message_params::kModuleType] = module_type; + + auto available_hd_chanels = + smart_objects::SmartObject(smart_objects::SmartType_Array); + + available_hd_chanels[0] = chanel1_index; + available_hd_chanels[1] = chanel2_index; + available_hd_chanels[2] = chanel3_index; + + msg_params[message_params::kModuleData][message_params::kRadioControlData] + [message_params::kAvailableHdChannels] = available_hd_chanels; + + ON_CALL(mock_interior_data_cache_, Contains(_)).WillByDefault(Return(false)); + ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_)) + .WillByDefault(Return(true)); + + MessageSharedPtr message_to_mob = CreateBasicMessage(); + + // Expectations + EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).WillOnce(Return(true)); + EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)) + .WillOnce(DoAll(SaveArg<0>(&message_to_mob), Return(true))); + + // Act + auto command = CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message); + application_manager::event_engine::Event event( + hmi_apis::FunctionID::RC_GetInteriorVehicleData); + + ASSERT_TRUE(command->Init()); + command->Run(); + + event.set_smart_object(*hmi_response_message); + command->on_event(event); + + auto& hd_chanels = + (*message_to_mob)[strings::msg_params][message_params::kModuleData] + [message_params::kRadioControlData] + [message_params::kAvailableHdChannels]; + const size_t array_length = hd_chanels.length(); + + EXPECT_EQ(expected_array_length, array_length); + + EXPECT_EQ(chanel1_index, hd_chanels[0].asUInt()); + EXPECT_EQ(chanel2_index, hd_chanels[1].asUInt()); + EXPECT_EQ(chanel3_index, hd_chanels[2].asUInt()); +} + +TEST_F(GetInteriorVehicleDataRequestTest, + OnEvent_ValidHmiResponse_ClimateEnableAvailable) { + using rc_rpc_plugin::commands::GetInteriorVehicleDataRequest; + namespace hmi_response = application_manager::hmi_response; + namespace strings = application_manager::strings; + + // Arrange + MessageSharedPtr mobile_message = CreateBasicMessage(); + + MessageSharedPtr hmi_response_message = CreateBasicMessage(); + auto& hmi_response_params = (*hmi_response_message)[strings::msg_params]; + hmi_response_params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS; + hmi_response_params[strings::connection_key] = kAppId; + + auto& msg_params = (*hmi_response_message)[strings::msg_params]; + + auto climate_control_data = + smart_objects::SmartObject(smart_objects::SmartType_Boolean); + climate_control_data = true; + + msg_params[message_params::kModuleData][message_params::kClimateControlData] + [message_params::kClimateEnableAvailable] = climate_control_data; + + ON_CALL(mock_interior_data_cache_, Contains(_)).WillByDefault(Return(false)); + ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_)) + .WillByDefault(Return(true)); + + auto message_to_mob = CreateBasicMessage(); + + // Expectations + EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).WillOnce(Return(true)); + EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)) + .WillOnce(DoAll(SaveArg<0>(&message_to_mob), Return(true))); + + // Act + auto command = CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message); + application_manager::event_engine::Event event( + hmi_apis::FunctionID::RC_GetInteriorVehicleData); + + ASSERT_TRUE(command->Init()); + command->Run(); + + event.set_smart_object(*hmi_response_message); + command->on_event(event); + + const bool climate_enable_available = + (*message_to_mob)[strings::msg_params][message_params::kModuleData] + [message_params::kClimateControlData] + [message_params::kClimateEnableAvailable] + .asBool(); + + EXPECT_TRUE(climate_enable_available); +} + } // namespace rc_rpc_plugin_test diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc index 66280eb183..f7718a7248 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc @@ -34,7 +34,6 @@ #include "application_manager/application.h" #include "application_manager/commands/command_request_test.h" #include "application_manager/mock_application.h" -#include "gtest/gtest.h" #include "interfaces/MOBILE_API.h" #include "rc_rpc_plugin/mock/mock_interior_data_cache.h" #include "rc_rpc_plugin/mock/mock_interior_data_manager.h" @@ -42,15 +41,20 @@ #include "rc_rpc_plugin/rc_module_constants.h" #include "rc_rpc_plugin/rc_rpc_plugin.h" +#include <stdint.h> +#include "gtest/gtest.h" + using application_manager::ApplicationSet; using application_manager::commands::MessageSharedPtr; using test::components::application_manager_test::MockApplication; using test::components::application_manager_test::MockApplicationManager; using test::components::commands_test::CommandRequestTest; using test::components::commands_test::CommandsTestMocks; +using test::components::commands_test::HMIResultCodeIs; using ::testing::_; using ::testing::NiceMock; using ::testing::Return; +using ::testing::SaveArg; namespace { const uint32_t kAppId = 0u; @@ -140,8 +144,11 @@ TEST_F(SetInteriorVehicleDataRequestTest, (*mobile_message)[application_manager::strings::msg_params]; msg_params[message_params::kModuleData][message_params::kModuleType] = mobile_apis::ModuleType::CLIMATE; + smart_objects::SmartObject climate_control_data(smart_objects::SmartType_Map); + climate_control_data[message_params::kFanSpeed] = 10; + msg_params[message_params::kModuleData][message_params::kClimateControlData] = - smart_objects::SmartObject(smart_objects::SmartType_Map); + climate_control_data; // Expectations EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _)) .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed)); @@ -151,14 +158,15 @@ TEST_F(SetInteriorVehicleDataRequestTest, EXPECT_CALL( mock_rpc_service_, - ManageMobileCommand(test::components::commands_test::MobileResultCodeIs( - mobile_apis::Result::READ_ONLY), - application_manager::commands::Command::SOURCE_SDL)); + ManageHMICommand( + HMIResultCodeIs(hmi_apis::FunctionID::RC_SetInteriorVehicleData), _)) + .WillOnce(Return(true)); // Act std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command = CreateRCCommand< rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( mobile_message); + ASSERT_TRUE(command->Init()); command->Run(); } @@ -189,15 +197,16 @@ TEST_F( EXPECT_CALL( mock_rpc_service_, - ManageMobileCommand(test::components::commands_test::MobileResultCodeIs( - mobile_apis::Result::OUT_OF_MEMORY), - application_manager::commands::Command::SOURCE_SDL)); + ManageHMICommand( + HMIResultCodeIs(hmi_apis::FunctionID::RC_SetInteriorVehicleData), _)) + .WillOnce(Return(true)); // Act std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command = CreateRCCommand< rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( mobile_message); + ASSERT_TRUE(command->Init()); command->Run(); } @@ -229,7 +238,99 @@ TEST_F( command = CreateRCCommand< rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( mobile_message); + ASSERT_TRUE(command->Init()); command->Run(); } +TEST_F(SetInteriorVehicleDataRequestTest, + Execute_ValidWithSettableParams_SUCCESSSendToHMI) { + MessageSharedPtr mobile_message = CreateBasicMessage(); + auto& msg_params = + (*mobile_message)[application_manager::strings::msg_params]; + msg_params[message_params::kModuleData][message_params::kModuleType] = + mobile_apis::ModuleType::CLIMATE; + + msg_params[message_params::kModuleData][message_params::kClimateControlData] = + smart_objects::SmartObject(smart_objects::SmartType_Map); + + msg_params[message_params::kModuleData][message_params::kClimateControlData] + [message_params::kClimateEnable] = true; + + // Expectations + EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _)) + .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed)); + + EXPECT_CALL(mock_hmi_capabilities_, rc_capability()) + .WillOnce(Return(nullptr)); + + MessageSharedPtr message_from_mobile = CreateBasicMessage(); + + EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)) + .WillOnce(DoAll(SaveArg<0>(&message_from_mobile), Return(true))); + + std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> + command = CreateRCCommand< + rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( + mobile_message); + + ASSERT_TRUE(command->Init()); + command->Run(); + + auto& msg_params_from_mobile = + (*message_from_mobile)[application_manager::strings::msg_params]; + + const bool climate_enable = + msg_params_from_mobile[message_params::kModuleData] + [message_params::kClimateControlData] + [message_params::kClimateEnable] + .asBool(); + EXPECT_TRUE(climate_enable); +} + +TEST_F(SetInteriorVehicleDataRequestTest, + Execute_ValidWithSettableParams_SUCCESSSendToHMI_HDChannel) { + MessageSharedPtr mobile_message = CreateBasicMessage(); + auto& msg_params = + (*mobile_message)[application_manager::strings::msg_params]; + msg_params[message_params::kModuleData][message_params::kModuleType] = + mobile_apis::ModuleType::RADIO; + + msg_params[message_params::kModuleData][message_params::kRadioControlData] = + smart_objects::SmartObject(smart_objects::SmartType_Map); + + const std::uint32_t hd_channel = 2u; + msg_params[message_params::kModuleData][message_params::kRadioControlData] + [message_params::kHdChannel] = hd_channel; + + // Expectations + EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _)) + .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed)); + + EXPECT_CALL(mock_hmi_capabilities_, rc_capability()) + .WillOnce(Return(nullptr)); + + auto message_from_mobile = CreateBasicMessage(); + + EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)) + .WillOnce(DoAll(SaveArg<0>(&message_from_mobile), Return(true))); + + std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> + command = CreateRCCommand< + rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( + mobile_message); + + command->Init(); + command->Run(); + + auto& msg_params_from_mobile = + (*message_from_mobile)[application_manager::strings::msg_params]; + + const uint64_t hd_channel_from_hmi = + msg_params_from_mobile[message_params::kModuleData] + [message_params::kRadioControlData] + [message_params::kHdChannel] + .asUInt(); + + EXPECT_EQ(hd_channel, hd_channel_from_hmi); +} } // namespace rc_rpc_plugin_test diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc index 4b34db9934..0655da27c0 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc @@ -89,7 +89,7 @@ void GetSystemCapabilityRequest::Run() { bool has_nav_capability = false; if (hmi_capabilities.navigation_capability()) { has_nav_capability = true; - auto nav_capability = *hmi_capabilities.navigation_capability(); + nav_capability = *hmi_capabilities.navigation_capability(); } has_nav_capability = application_manager_.GetAppServiceManager() diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc index d6df3e61ee..67c36dce9c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc @@ -139,6 +139,7 @@ TEST_F(RCGetCapabilitiesResponseTest, RUN_SUCCESSS) { radio_control_capability["hdChannelAvailable"] = true; radio_control_capability["rdsDataAvailable"] = true; radio_control_capability["availableHDsAvailable"] = true; + radio_control_capability["availableHdChannelsAvailable"] = true; radio_control_capability["stateAvailable"] = true; radio_control_capability["signalStrengthAvailable"] = true; radio_control_capability["signalChangeThresholdAvailable"] = true; |