diff options
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.cc | 24 |
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 - |