diff options
Diffstat (limited to 'src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc')
-rw-r--r-- | src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc b/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc index 892af48079..19dd91ab2a 100644 --- a/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc +++ b/src/components/application_manager/src/commands/hmi/on_app_deactivated_notification.cc @@ -1,4 +1,4 @@ -/* +/** * Copyright (c) 2013, Ford Motor Company * All rights reserved. * @@ -49,7 +49,7 @@ OnAppDeactivatedNotification::~OnAppDeactivatedNotification() { } void OnAppDeactivatedNotification::Run() { - LOG4CXX_AUTO_TRACE(logger_); + LOG4CXX_INFO(logger_, "OnAppDeactivatedNotification::Run"); uint32_t app_id = (*message_)[strings::msg_params][strings::app_id].asUInt(); ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application(app_id); @@ -89,13 +89,21 @@ void OnAppDeactivatedNotification::Run() { app->set_audio_streaming_state(mobile_api::AudioStreamingState::NOT_AUDIBLE); } } - // HMI must send this notification for each active app - if (app.valid()) { - if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level() || - mobile_apis::HMILevel::eType::HMI_LIMITED == app->hmi_level()) { - app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND); - MessageHelper::SendHMIStatusNotification(*app); - } + // switch HMI level for all applications in FULL or LIMITED + ApplicationManagerImpl::ApplicationListAccessor accessor; + ApplicationManagerImpl::TAppList applications = + accessor.applications(); + ApplicationManagerImpl::TAppListIt it = + applications.begin(); + for (; applications.end() != it; ++it) { + ApplicationSharedPtr app = *it; + if (app.valid()) { + if (mobile_apis::HMILevel::eType::HMI_FULL == app->hmi_level() || + mobile_apis::HMILevel::eType::HMI_LIMITED == app->hmi_level()) { + app->set_hmi_level(mobile_api::HMILevel::HMI_BACKGROUND); + MessageHelper::SendHMIStatusNotification(*app); + } + } } break; } |