summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
diff options
context:
space:
mode:
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.cc14
1 files changed, 9 insertions, 5 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 f652761178..d693c00ac3 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,11 +88,15 @@ void OnTTSLanguageChangeNotification::Run() {
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- const ApplicationSet& accessor =
- application_manager_.applications().GetData();
- ApplicationSetIt it = accessor.begin();
- for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *it++;
+ 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;
+ }
+
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);