summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2018-07-12 11:14:34 -0400
committerJacob Keeler <jacob.keeler@livioradio.com>2018-07-12 11:14:34 -0400
commit87a1963cee747b72cab56634221008a6d844018d (patch)
treea6774b1234a2428f713abc16a057e15fdc8c239f /src/components/application_manager/rpc_plugins/sdl_rpc_plugin
parentb7da3b5378c7367ce373b43d278a1831f3580cf0 (diff)
downloadsdl_core-87a1963cee747b72cab56634221008a6d844018d.tar.gz
Send Driver Distraction notification immediately upon registrationfeature/driver_distraction_on_registration
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc2
2 files changed, 3 insertions, 0 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 20302be585..4706f9742f 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
@@ -411,6 +411,7 @@ void RegisterAppInterfaceRequest::Run() {
smart_objects::SmartObjectSPtr so =
GetLockScreenIconUrlNotification(connection_key(), application);
rpc_service_.ManageMobileCommand(so, SOURCE_SDL);
+ application_manager_.SendDriverDistractionState(application);
}
smart_objects::SmartObjectSPtr
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
index 8b21ceff17..a44a4a452a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/register_app_interface_request_test.cc
@@ -295,6 +295,7 @@ TEST_F(RegisterAppInterfaceRequestTest, Run_MinimalData_SUCCESS) {
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
.Times(2);
+ EXPECT_CALL(app_mngr_, SendDriverDistractionState(_));
command_->Run();
}
@@ -408,6 +409,7 @@ TEST_F(RegisterAppInterfaceRequestTest,
EXPECT_CALL(mock_rpc_service_,
ManageMobileCommand(_, am::commands::Command::SOURCE_SDL))
.Times(2);
+ EXPECT_CALL(app_mngr_, SendDriverDistractionState(_));
command_->Run();
}