summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
diff options
context:
space:
mode:
authorBSolonenko <BSolonenko@luxoft.com>2018-03-03 19:06:29 +0200
committerIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-06-26 12:01:46 +0300
commit57aa1c99210a39546106d02a26be82eeb2a7800f (patch)
treeb0bc3878f2e75725548870e381300b47f2f0a96b /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
parentf3c20e49e05d65314760e04ed6656fe2d6bcd49c (diff)
downloadsdl_core-57aa1c99210a39546106d02a26be82eeb2a7800f.tar.gz
Fixed get RC Applications
- added is_rc_ field, getter and setter in ApplicationImpl; - fixed RegisterAppInterfaceRequest::Run(); - fixed RCRPCPlugin::GetRCApplications(). Fix UTs Added is_remote_control_supported and set_remote_control_supported methods in MockApplication Fixed on_interior_vehicle_data_notification_test and resource_allocation_manager_impl_test. Fixed sending of notifications. - Fixed RCRPCPlugin::OnPolicyEvent; - Fixed RCRPCPlugin::OnApplicationEvent; - Fixed OnExitApplicationNotification::Run; - Fixed ApplicationManagerImpl::UnregisterApplication; - Fixed ApplicationManagerImpl::OnPTUFinished; - Refactoring ApplicationImpl::RemoveExtension; - is_remote_control_supported_ added in initialization list. Fix UTs In application_manager_impl_test added seting RPCPluginManager Conflicts: src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc src/components/application_manager/src/application_manager_impl.cc
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
index 83dc15c5ad..9018f89d5d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc
@@ -354,20 +354,28 @@ void RegisterAppInterfaceRequest::Run() {
msg_params.getElement(strings::app_hmi_type);
for (size_t i = 0; i < app_type.length(); ++i) {
- if (mobile_apis::AppHMIType::NAVIGATION ==
+ mobile_apis::AppHMIType::eType current_app_type =
static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt())) {
- application->set_is_navi(true);
- }
- if (mobile_apis::AppHMIType::COMMUNICATION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt())) {
- application->set_voice_communication_supported(true);
- }
- if (mobile_apis::AppHMIType::PROJECTION ==
- static_cast<mobile_apis::AppHMIType::eType>(
- app_type.getElement(i).asUInt())) {
- application->set_mobile_projection_enabled(true);
+ app_type.getElement(i).asUInt());
+
+ switch (current_app_type) {
+ case mobile_apis::AppHMIType::NAVIGATION: {
+ application->set_is_navi(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::COMMUNICATION: {
+ application->set_voice_communication_supported(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::PROJECTION: {
+ application->set_mobile_projection_enabled(true);
+ break;
+ }
+ case mobile_apis::AppHMIType::REMOTE_CONTROL: {
+ application->set_remote_control_supported(true);
+ break;
+ }
+ default: {}
}
}
}