diff options
author | Artem Nosach <ANosach@luxoft.com> | 2015-07-31 15:10:54 +0300 |
---|---|---|
committer | Artem Nosach <ANosach@luxoft.com> | 2015-10-04 18:06:00 +0300 |
commit | c10c417b66df30bce20bfbdb033dfaa159e79a58 (patch) | |
tree | b82f6b6baadb80cd9ef4a4cb088602bc96cb93a9 /src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc | |
parent | 6ef86211fa54340205af155ae2485e278d8e4c79 (diff) | |
download | sdl_core-c10c417b66df30bce20bfbdb033dfaa159e79a58.tar.gz |
Handle DRIVER_DISTRACTION_VIOLATION reason in OnExitApplicationNotification
Closes-bug: APPLINK-13195
Diffstat (limited to 'src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc')
-rw-r--r-- | src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc b/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc index 1a4f92e076..0cb895eec9 100644 --- a/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc +++ b/src/components/application_manager/src/commands/hmi/on_exit_application_notification.cc @@ -68,14 +68,19 @@ void OnExitApplicationNotification::Run() { ((*message_)[strings::msg_params][strings::reason].asInt()); switch (reason) { + case Common_ApplicationExitReason::DRIVER_DISTRACTION_VIOLATION: { + MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile( + app_impl->app_id(), + AppInterfaceUnregisteredReason::DRIVER_DISTRACTION_VIOLATION); + break; + } case Common_ApplicationExitReason::USER_EXIT: { break; } case Common_ApplicationExitReason::UNAUTHORIZED_TRANSPORT_REGISTRATION: { MessageHelper::SendOnAppInterfaceUnregisteredNotificationToMobile( - app_impl->app_id(), - AppInterfaceUnregisteredReason::APP_UNAUTHORIZED); - app_mgr->UnregisterApplication(app_impl->app_id(), Result::SUCCESS); + app_id, AppInterfaceUnregisteredReason::APP_UNAUTHORIZED); + app_mgr->UnregisterApplication(app_id, Result::SUCCESS); return; } default: { @@ -83,11 +88,9 @@ void OnExitApplicationNotification::Run() { return; } } - using namespace mobile_apis; - ApplicationManagerImpl::instance()->SetState<false>(app_impl->app_id(), - HMILevel::HMI_NONE, - AudioStreamingState::NOT_AUDIBLE, - SystemContext::SYSCTXT_MAIN); + + ApplicationManagerImpl::instance()->SetState<false>( + app_id, HMILevel::HMI_NONE, AudioStreamingState::NOT_AUDIBLE); } } // namespace commands |