summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-04-05 14:25:45 +0300
committerIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-07-12 13:31:03 +0300
commit0bd0303698e2545b62e9890f134d39dd87143deb (patch)
tree3253e7a9df6a88d47b8717b1b9cef6948542d753 /src/components
parent1072b44f8fb7df2c934927d90077ea1bd92b2de4 (diff)
downloadsdl_core-0bd0303698e2545b62e9890f134d39dd87143deb.tar.gz
Fix SDL sends multiple OnRCStatus notification in case of app unregistration
Fix disabling RC-functionality
Diffstat (limited to 'src/components')
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h3
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h17
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h11
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc60
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc14
-rw-r--r--src/components/application_manager/src/application_impl.cc2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h11
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc10
18 files changed, 102 insertions, 55 deletions
diff --git a/src/components/application_manager/include/application_manager/application_impl.h b/src/components/application_manager/include/application_manager/application_impl.h
index 91eaffa0a0..809e8b5764 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -41,7 +41,7 @@
#include <forward_list>
#include <stdint.h>
-#include "utils/date_time.h"
+#include "application_manager/application.h"
#include "application_manager/application_data_impl.h"
#include "application_manager/usage_statistics.h"
#include "application_manager/hmi_state.h"
@@ -53,6 +53,7 @@
#include "utils/custom_string.h"
#include "utils/timer.h"
#include "utils/macro.h"
+#include "utils/date_time.h"
namespace usage_statistics {
diff --git a/src/components/application_manager/include/application_manager/message_helper.h b/src/components/application_manager/include/application_manager/message_helper.h
index 84106555e7..504bb84c82 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -71,15 +71,14 @@ typedef std::map<std::string, mobile_apis::VehicleDataType::eType> VehicleData;
**/
class MessageHelper {
public:
-
- /**
- * @brief CreateNotification creates basic mobile notification smart object
- * @param function_id Notificaiton function ID
- * @param app_id application to send notification
- * @return basic mobile notification smart object
- */
- static smart_objects::SmartObjectSPtr CreateNotification(mobile_apis::FunctionID::eType function_id,
- uint32_t app_id);
+ /**
+ * @brief CreateNotification creates basic mobile notification smart object
+ * @param function_id Notificaiton function ID
+ * @param app_id application to send notification
+ * @return basic mobile notification smart object
+ */
+ static smart_objects::SmartObjectSPtr CreateNotification(
+ mobile_apis::FunctionID::eType function_id, uint32_t app_id);
/**
* @brief CreateHMINotification creates basic hmi notification smart object
* @param function_id Notificaiton function ID
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h
index 71ee5fddff..98da8bc27d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h
@@ -150,6 +150,10 @@ class ResourceAllocationManager {
*/
virtual void SendOnRCStatusNotification() = 0;
+ virtual bool is_rc_enabled() const = 0;
+
+ virtual void set_rc_enabled(const bool value) = 0;
+
virtual ~ResourceAllocationManager() {}
};
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h
index 434bde2a82..4c72e9ea2c 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h
@@ -120,6 +120,10 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager {
void SendOnRCStatusNotification() FINAL;
+ bool is_rc_enabled() const FINAL;
+
+ void set_rc_enabled(const bool value) FINAL;
+
private:
typedef std::vector<application_manager::ApplicationSharedPtr> Apps;
@@ -130,11 +134,10 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager {
* @return smart object with mobile OnRCStatusNotification
*/
smart_objects::SmartObjectSPtr CreateOnRCStatusNotificationToMobile(
- const uint32_t app_id);
+ const application_manager::ApplicationSharedPtr app);
smart_objects::SmartObjectSPtr CreateOnRCStatusNotificationToHmi(
- const uint32_t app_id);
-
+ const application_manager::ApplicationSharedPtr app);
/**
* @brief IsModuleTypeRejected check if current resource was rejected by
@@ -194,6 +197,7 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager {
void SetResourceFree(const std::string& module_type, const uint32_t app_id);
std::vector<std::string> all_supported_modules();
+
/**
* @brief AllocatedResources contains link between resource and application
* owning that resource
@@ -221,6 +225,7 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager {
hmi_apis::Common_RCAccessMode::eType current_access_mode_;
application_manager::ApplicationManager& app_mngr_;
application_manager::rpc_service::RPCService& rpc_service_;
+ bool is_rc_enabled_;
};
} // rc_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
index 817223a369..dda59ea296 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc
@@ -131,6 +131,7 @@ void RCOnRemoteControlSettingsNotification::Run() {
hmi_apis::Common_RCAccessMode::eType access_mode =
hmi_apis::Common_RCAccessMode::INVALID_ENUM;
LOG4CXX_DEBUG(logger_, "Allowing RC Functionality");
+ resource_allocation_manager_.set_rc_enabled(true);
if ((*message_)[app_mngr::strings::msg_params].keyExists(
message_params::kAccessMode)) {
access_mode = static_cast<hmi_apis::Common_RCAccessMode::eType>(
@@ -149,6 +150,7 @@ void RCOnRemoteControlSettingsNotification::Run() {
} else {
LOG4CXX_DEBUG(logger_, "Disallowing RC Functionality");
DisallowRCFunctionality();
+ resource_allocation_manager_.set_rc_enabled(false);
resource_allocation_manager_.ResetAllAllocations();
}
}
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 160915f347..e76572c773 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
@@ -32,6 +32,7 @@
#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h"
#include "rc_rpc_plugin/rc_module_constants.h"
+#include "rc_rpc_plugin/rc_rpc_plugin.h"
#include "smart_objects/enum_schema_item.h"
#include "utils/macro.h"
#include "json/json.h"
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
index 4f968dd2d8..524e4db7fa 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
@@ -140,6 +140,14 @@ void RCCommandRequest::Run() {
SendResponse(false, mobile_apis::Result::DISALLOWED, "");
return;
}
+ if (!resource_allocation_manager_.is_rc_enabled()) {
+ LOG4CXX_WARN(logger_, "Remote control is disabled by user");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::USER_DISALLOWED,
+ "Remote control is disabled by user");
+ return;
+ }
if (CheckDriverConsent()) {
if (AcquireResources()) {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
index f423a66fc6..a001e4734f 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc
@@ -91,7 +91,9 @@ void RCRPCPlugin::OnApplicationEvent(
switch (event) {
case plugins::kApplicationRegistered: {
application->AddExtension(new RCAppExtension(kRCPluginID));
- resource_allocation_manager_->SendOnRCStatusNotification();
+ if (resource_allocation_manager_->is_rc_enabled()) {
+ resource_allocation_manager_->SendOnRCStatusNotification();
+ }
break;
}
case plugins::kApplicationExit: {
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 4b70830de7..e9a56007df 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
@@ -52,7 +52,8 @@ ResourceAllocationManagerImpl::ResourceAllocationManagerImpl(
application_manager::rpc_service::RPCService& rpc_service)
: current_access_mode_(hmi_apis::Common_RCAccessMode::AUTO_ALLOW)
, app_mngr_(app_mngr)
- , rpc_service_(rpc_service) {}
+ , rpc_service_(rpc_service)
+ , is_rc_enabled_(true) {}
ResourceAllocationManagerImpl::~ResourceAllocationManagerImpl() {}
@@ -173,6 +174,7 @@ void ResourceAllocationManagerImpl::ProcessApplicationPolicyUpdate() {
if (rc_extention) {
rc_extention->UnsubscribeFromInteriorVehicleData(*module);
}
+ SendOnRCStatusNotification();
}
}
}
@@ -234,7 +236,8 @@ EnumType StringToEnum(const std::string& str) {
void ConstructOnRCStatusNotificationParams(
smart_objects::SmartObject& msg_params,
const std::map<std::string, uint32_t>& allocated_resources,
- const std::vector<std::string>& supported_resources) {
+ const std::vector<std::string>& supported_resources,
+ const u_int32_t app_id) {
namespace strings = application_manager::strings;
namespace message_params = rc_rpc_plugin::message_params;
using smart_objects::SmartObject;
@@ -253,8 +256,10 @@ void ConstructOnRCStatusNotificationParams(
};
};
SmartObject allocated_modules = SmartObject(SmartType_Array);
- for (auto& module : allocated_resources) {
- modules_inserter(allocated_modules)(module.first);
+ for (const auto& module : allocated_resources) {
+ if (module.second == app_id) {
+ modules_inserter(allocated_modules)(module.first);
+ }
}
SmartObject free_modules = SmartObject(SmartType_Array);
for (auto& module : supported_resources) {
@@ -268,29 +273,29 @@ void ConstructOnRCStatusNotificationParams(
smart_objects::SmartObjectSPtr
ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToMobile(
- const uint32_t app_id) {
+ const application_manager::ApplicationSharedPtr app) {
LOG4CXX_AUTO_TRACE(logger_);
using application_manager::MessageHelper;
- auto to_mobile_msg = MessageHelper::CreateNotification(
- mobile_apis::FunctionID::OnRCStatusID, app_id);
- auto& msg_params = (*to_mobile_msg)[application_manager::strings::msg_params];
+ auto msg_to_mobile = MessageHelper::CreateNotification(
+ mobile_apis::FunctionID::OnRCStatusID, app->app_id());
+ auto& msg_params = (*msg_to_mobile)[application_manager::strings::msg_params];
ConstructOnRCStatusNotificationParams(
- msg_params, allocated_resources_, all_supported_modules());
- return to_mobile_msg;
+ msg_params, allocated_resources_, all_supported_modules(), app->app_id());
+ return msg_to_mobile;
}
smart_objects::SmartObjectSPtr
ResourceAllocationManagerImpl::CreateOnRCStatusNotificationToHmi(
- const uint32_t app_id) {
+ const application_manager::ApplicationSharedPtr app) {
LOG4CXX_AUTO_TRACE(logger_);
using application_manager::MessageHelper;
- auto to_hmi_msg =
+ auto msg_to_hmi =
MessageHelper::CreateHMINotification(hmi_apis::FunctionID::RC_OnRCStatus);
- auto& msg_params = (*to_hmi_msg)[application_manager::strings::msg_params];
+ auto& msg_params = (*msg_to_hmi)[application_manager::strings::msg_params];
ConstructOnRCStatusNotificationParams(
- msg_params, allocated_resources_, all_supported_modules());
- msg_params[application_manager::strings::app_id] = app_id;
- return to_hmi_msg;
+ msg_params, allocated_resources_, all_supported_modules(), app->app_id());
+ msg_params[application_manager::strings::app_id] = app->hmi_app_id();
+ return msg_to_hmi;
}
void ResourceAllocationManagerImpl::SetResourceAquired(
@@ -303,14 +308,22 @@ void ResourceAllocationManagerImpl::SetResourceAquired(
void ResourceAllocationManagerImpl::SendOnRCStatusNotification() {
LOG4CXX_AUTO_TRACE(logger_);
auto rc_apps = RCRPCPlugin::GetRCApplications(app_mngr_);
- for (auto& rc_app : rc_apps) {
- auto to_mobile = CreateOnRCStatusNotificationToMobile(rc_app->app_id());
- rpc_service_.SendMessageToMobile(to_mobile);
- auto to_HMI = CreateOnRCStatusNotificationToHmi(rc_app->hmi_app_id());
- rpc_service_.SendMessageToHMI(to_HMI);
+ for (const auto& rc_app : rc_apps) {
+ auto msg_to_mobile = CreateOnRCStatusNotificationToMobile(rc_app);
+ rpc_service_.SendMessageToMobile(msg_to_mobile);
+ auto msg_to_hmi = CreateOnRCStatusNotificationToHmi(rc_app);
+ rpc_service_.SendMessageToHMI(msg_to_hmi);
}
}
+bool ResourceAllocationManagerImpl::is_rc_enabled() const {
+ return is_rc_enabled_;
+}
+
+void ResourceAllocationManagerImpl::set_rc_enabled(const bool value) {
+ is_rc_enabled_ = value;
+}
+
void ResourceAllocationManagerImpl::SetResourceFree(
const std::string& module_type, const uint32_t app_id) {
AllocatedResources::const_iterator allocation =
@@ -327,7 +340,6 @@ void ResourceAllocationManagerImpl::SetResourceFree(
}
allocated_resources_.erase(allocation);
LOG4CXX_DEBUG(logger_, "Resource " << module_type << " is released.");
- SendOnRCStatusNotification();
}
std::vector<std::string>
@@ -473,7 +485,9 @@ void ResourceAllocationManagerImpl::OnApplicationEvent(
for (; acquired_modules.end() != module; ++module) {
ReleaseResource(*module, application->app_id());
}
-
+ if (!acquired_modules.empty()) {
+ SendOnRCStatusNotification();
+ }
Apps app_list;
app_list.push_back(application);
RemoveAppsSubscriptions(app_list);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
index 5098f6472e..7ab4819002 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
@@ -130,6 +130,8 @@ class ButtonPressRequestTest
CheckHMIType(kPolicyAppId,
mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
nullptr)).WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
MessageSharedPtr CreateBasicMessage() {
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 7074bfb9c5..685bc1fd42 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
@@ -100,6 +100,8 @@ class GetInteriorVehicleDataRequestTest
CheckHMIType(
_, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, nullptr))
.WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
MessageSharedPtr CreateBasicMessage() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
index 8fad1aef60..c5a8e54c6d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc
@@ -141,6 +141,8 @@ class RCGetInteriorVehicleDataConsentTest
.WillByDefault(Return(rpc_plugin));
ON_CALL(mock_allocation_manager_, IsResourceFree(kResource))
.WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
template <class Command>
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 68985e5f94..1d5e63e2df 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
@@ -89,6 +89,8 @@ class SetInteriorVehicleDataRequestTest
CheckHMIType(kPolicyAppId,
mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
nullptr)).WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
MessageSharedPtr CreateBasicMessage() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
index ba61620d1d..df0daad0b9 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
@@ -66,6 +66,8 @@ class MockResourceAllocationManager
application_manager::ApplicationSharedPtr application));
MOCK_METHOD0(ResetAllAllocations, void());
MOCK_METHOD0(SendOnRCStatusNotification, void());
+ MOCK_CONST_METHOD0(is_rc_enabled, bool());
+ MOCK_METHOD1(set_rc_enabled, void(const bool value));
};
} // namespace rc_rpc_plugin_test
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 8c1b16ee7a..03c06404a3 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
@@ -103,7 +103,7 @@ class RAManagerTest : public ::testing::Test {
void OnRCStatusNotoficationExpectations();
-protected:
+ protected:
NiceMock<MockApplicationManager> mock_app_mngr_;
NiceMock<MockRPCService> mock_rpc_service_;
test::components::policy_test::MockPolicyHandlerInterface
@@ -139,12 +139,12 @@ void RAManagerTest::CheckResultWithHMILevelAndAccessMode(
}
void RAManagerTest::OnRCStatusNotoficationExpectations() {
- ON_CALL(mock_app_mngr_, application(kAppId1))
- .WillByDefault(Return(mock_app_1_));
- ON_CALL(*mock_app_1_, QueryInterface(rc_rpc_plugin::RCRPCPlugin::kRCPluginID))
- .WillByDefault(Return(app_ext_ptr_));
- apps_.insert(mock_app_1_);
- ON_CALL(mock_app_mngr_, applications()).WillByDefault(Return(apps_da_));
+ ON_CALL(mock_app_mngr_, application(kAppId1))
+ .WillByDefault(Return(mock_app_1_));
+ ON_CALL(*mock_app_1_, QueryInterface(rc_rpc_plugin::RCRPCPlugin::kRCPluginID))
+ .WillByDefault(Return(app_ext_ptr_));
+ apps_.insert(mock_app_1_);
+ ON_CALL(mock_app_mngr_, applications()).WillByDefault(Return(apps_da_));
}
TEST_F(RAManagerTest, AcquireResource_NoAppRegistered_Expect_InUse) {
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index 38829e79c9..2a2e13fc0d 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Ford Motor Company
+ * Copyright (c) 2018, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/components/application_manager/test/include/application_manager/mock_message_helper.h b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
index 099f150709..8641a3781e 100644
--- a/src/components/application_manager/test/include/application_manager/mock_message_helper.h
+++ b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
@@ -46,12 +46,13 @@ namespace application_manager {
class MockMessageHelper {
public:
- MOCK_METHOD2(CreateNotification,
- smart_objects::SmartObjectSPtr(mobile_apis::FunctionID::eType, uint32_t));
- MOCK_METHOD1(CreateHMINotification,
- smart_objects::SmartObjectSPtr(hmi_apis::FunctionID::eType));
+ MOCK_METHOD2(CreateNotification,
+ smart_objects::SmartObjectSPtr(mobile_apis::FunctionID::eType,
+ uint32_t));
+ MOCK_METHOD1(CreateHMINotification,
+ smart_objects::SmartObjectSPtr(hmi_apis::FunctionID::eType));
- MOCK_METHOD1(GetHashUpdateNotification,
+ MOCK_METHOD1(GetHashUpdateNotification,
smart_objects::SmartObjectSPtr(const uint32_t app_id));
MOCK_METHOD2(SendHashUpdateNotification,
void(const uint32_t app_id, ApplicationManager& app_mngr));
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index 95d8686081..9e2eb75a55 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -41,14 +41,14 @@ namespace application_manager {
smart_objects::SmartObjectSPtr MessageHelper::CreateNotification(
mobile_apis::FunctionID::eType function_id, uint32_t app_id) {
- return MockMessageHelper::message_helper_mock()->CreateNotification(
- function_id, app_id);
+ return MockMessageHelper::message_helper_mock()->CreateNotification(
+ function_id, app_id);
}
smart_objects::SmartObjectSPtr MessageHelper::CreateHMINotification(
- hmi_apis::FunctionID::eType function_id) {
- return MockMessageHelper::message_helper_mock()->CreateHMINotification(
- function_id);
+ hmi_apis::FunctionID::eType function_id) {
+ return MockMessageHelper::message_helper_mock()->CreateHMINotification(
+ function_id);
}
void MessageHelper::SendHashUpdateNotification(uint32_t const app_id,