diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc index d693c00ac3..51df69d0bc 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc @@ -88,20 +88,14 @@ void OnTTSLanguageChangeNotification::Run() { (*message_)[strings::params][strings::function_id] = static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID); - const auto applications = application_manager_.applications().GetData(); - for (const auto& app : applications) { - if (!app->IsRegistered()) { - SDL_LOG_DEBUG("Skipping app " - << app->app_id() - << " which has not finished the registration process"); - continue; - } + auto apps = ApplicationSet(application_manager_.applications().GetData()); + auto message_language = + (*message_)[strings::msg_params][strings::language].asInt(); + for (auto app : apps) { (*message_)[strings::params][strings::connection_key] = app->app_id(); SendNotificationToMobile(message_); - - if (static_cast<int>(app->language()) != - (*message_)[strings::msg_params][strings::language].asInt()) { + if (app->language() != message_language) { rpc_service_.ManageMobileCommand( MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile( app->app_id(), |