summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/hmi_language_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/hmi_language_handler.cc')
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index 4e5390a1b4..6e89b2419c 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -33,6 +33,7 @@
#include "application_manager/hmi_language_handler.h"
#include "application_manager/application_manager.h"
#include "application_manager/message_helper.h"
+#include "application_manager/rpc_service.h"
#include "application_manager/hmi_capabilities.h"
#include "utils/helpers.h"
#include "resumption/last_state.h"
@@ -222,7 +223,8 @@ void HMILanguageHandler::SendOnLanguageChangeToMobile(
const uint32_t connection_key) {
LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObjectSPtr notification = new smart_objects::SmartObject;
+ smart_objects::SmartObjectSPtr notification =
+ std::make_shared<smart_objects::SmartObject>();
DCHECK_OR_RETURN_VOID(notification);
smart_objects::SmartObject& message = *notification;
message[strings::params][strings::function_id] =
@@ -236,8 +238,8 @@ void HMILanguageHandler::SendOnLanguageChangeToMobile(
hmi_capabilities.active_ui_language();
message[strings::msg_params][strings::language] =
hmi_capabilities.active_vr_language();
- if (application_manager_.ManageMobileCommand(notification,
- commands::Command::ORIGIN_SDL)) {
+ if (application_manager_.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::SOURCE_SDL)) {
LOG4CXX_INFO(logger_, "Mobile command sent");
} else {
LOG4CXX_WARN(logger_, "Cannot send mobile command");
@@ -306,11 +308,11 @@ void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
}
}
SendOnLanguageChangeToMobile(app.first);
- application_manager_.ManageMobileCommand(
+ application_manager_.GetRPCService().ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app.first,
mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
- commands::Command::ORIGIN_SDL);
+ commands::Command::SOURCE_SDL);
application_manager_.UnregisterApplication(
app.first, mobile_apis::Result::SUCCESS, false);
LOG4CXX_INFO(logger_,