summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
diff options
context:
space:
mode:
authorKozoriz <kozorizandriy@gmail.com>2016-04-25 16:39:26 +0300
committerKozoriz <kozorizandriy@gmail.com>2016-04-25 16:39:26 +0300
commit990bee92cc9d67f9845629bf86e0a700ccc700ce (patch)
tree2feedfc333dfd6af412db96e189c941b367e08c7 /src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
parent388ef32944603a105ed34db4aa089acf5a7a87fd (diff)
downloadsdl_core-990bee92cc9d67f9845629bf86e0a700ccc700ce.tar.gz
Code style format with clang-format
Diffstat (limited to 'src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc')
-rw-r--r--src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc b/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
index ea6b9a9722..6e8e38f757 100644
--- a/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
+++ b/src/components/application_manager/src/commands/hmi/on_ui_language_change_notification.cc
@@ -42,17 +42,14 @@ namespace commands {
OnUILanguageChangeNotification::OnUILanguageChangeNotification(
const MessageSharedPtr& message, ApplicationManager& application_manager)
- : NotificationFromHMI(message, application_manager) {
-}
+ : NotificationFromHMI(message, application_manager) {}
-OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {
-}
+OnUILanguageChangeNotification::~OnUILanguageChangeNotification() {}
void OnUILanguageChangeNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
- HMICapabilities& hmi_capabilities =
- application_manager_.hmi_capabilities();
+ HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_active_ui_language(
static_cast<hmi_apis::Common_Language::eType>(
@@ -76,12 +73,14 @@ void OnUILanguageChangeNotification::Run() {
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
- if (app->ui_language() != (*message_)[strings::msg_params]
- [strings::hmi_display_language].asInt()) {
-
- application_manager_.ManageMobileCommand(MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
- app->app_id(),
- mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE), commands::Command::ORIGIN_SDL);
+ if (app->ui_language() !=
+ (*message_)[strings::msg_params][strings::hmi_display_language]
+ .asInt()) {
+ application_manager_.ManageMobileCommand(
+ MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
+ app->app_id(),
+ mobile_api::AppInterfaceUnregisteredReason::LANGUAGE_CHANGE),
+ commands::Command::ORIGIN_SDL);
application_manager_.UnregisterApplication(
app->app_id(), mobile_apis::Result::SUCCESS, false);
}
@@ -91,4 +90,3 @@ void OnUILanguageChangeNotification::Run() {
} // namespace commands
} // namespace application_manager
-