summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-07-16 12:23:16 +0300
committerIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-07-16 17:14:21 +0300
commit8cfa86d9e6288cbce752c585712af8c56103b885 (patch)
tree4ff40e4384efd05dd3aeac9f177b658060e10f79
parent092f0ae391f0b4e91f9003daad2e5cfd4ccb4955 (diff)
downloadsdl_core-feature/onRcStatus_allowed.tar.gz
Include allowed param in OnRCStatus notification in case of resource allocationfeature/onRcStatus_allowed
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc2
-rw-r--r--src/components/interfaces/MOBILE_API.xml2
3 files changed, 3 insertions, 7 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
index 7bb553fc5d..2ac31e7662 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
@@ -326,10 +326,8 @@ void ResourceAllocationManagerImpl::SendOnRCStatusNotifications(
auto rc_apps = RCRPCPlugin::GetRCApplications(app_mngr_);
for (const auto& rc_app : rc_apps) {
msg_to_mobile = CreateOnRCStatusNotificationToMobile(rc_app);
- if (NotificationTrigger::RC_STATE_CHANGING == event) {
- (*msg_to_mobile)[application_manager::strings::msg_params]
- [message_params::kAllowed] = is_rc_enabled();
- }
+ (*msg_to_mobile)[application_manager::strings::msg_params]
+ [message_params::kAllowed] = is_rc_enabled();
rpc_service_.SendMessageToMobile(msg_to_mobile);
msg_to_hmi = CreateOnRCStatusNotificationToHmi(rc_app);
rpc_service_.SendMessageToHMI(msg_to_hmi);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
index 9e006c56fe..4bbf2b02dc 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
@@ -666,7 +666,7 @@ TEST_F(RAManagerTest, OnRCStatus_ModuleAllocation) {
auto msg_to_hmi_params =
(*message_to_hmi)[application_manager::strings::msg_params];
// Assert
- EXPECT_EQ(msg_to_mob_params.keyExists(message_params::kAllowed), false);
+ EXPECT_EQ(msg_to_mob_params[message_params::kAllowed].asBool(), true);
EXPECT_EQ(
msg_to_mob_params[message_params::kAllocatedModules].asArray()->size(),
1u);
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 3daaf413cb..2766bb48d0 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -6348,8 +6348,6 @@
<param name="allowed" type="Boolean" mandatory="false">
<description>
If "true" - RC is allowed; if "false" - RC is disallowed.
- Not present in notification in case by module allocation/deallocation.
- Present in notification in cases enabling/disabling RC or RC-app registration.
</description>
</param>
<param name="allocatedModules" type="ModuleData" minsize="0" maxsize="100" array="true" mandatory="true">