diff options
Diffstat (limited to 'src/components/application_manager/src/application_manager_impl.cc')
-rw-r--r-- | src/components/application_manager/src/application_manager_impl.cc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 471348c119..b727f6d621 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -1812,6 +1812,25 @@ bool ApplicationManagerImpl::StartNaviService( } } + { + /* Fix: For NaviApp1 Switch to NaviApp2, App1's Endcallback() arrives + later than App2's Startcallback(). Cause streaming issue on HMI. + */ + sync_primitives::AutoLock lock(applications_list_lock_ptr_); + for (auto app : applications_) { + if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) { + LOG4CXX_DEBUG(logger_, + "Continue, Not Navi App Id: " << app->app_id()); + continue; + } + LOG4CXX_DEBUG(logger_, + "Abort Stream Service of other NaviAppId: " + << app->app_id() + << " Service_type: " << service_type); + StopNaviService(app->app_id(), service_type); + } + } + if (service_type == ServiceType::kMobileNav) { smart_objects::SmartObject converted_params(smart_objects::SmartType_Map); ConvertVideoParamsToSO(converted_params, params); @@ -1915,10 +1934,27 @@ void ApplicationManagerImpl::StopNaviService( if (navi_service_status_.end() == it) { LOG4CXX_WARN(logger_, "No Information about navi service " << service_type); + // Fix: Need return for Not navi service at now + return; } else { + // Fix: Repeated tests are not executed after they have stopped for Navi + if (false == it->second.first && + ServiceType::kMobileNav == service_type) { + LOG4CXX_DEBUG(logger_, "appId: " << app_id << "Navi had stopped"); + return; + } + + // Fix: Repeated tests are not executed after they have stopped for Audio + if (false == it->second.second && ServiceType::kAudio == service_type) { + LOG4CXX_DEBUG(logger_, "appId: " << app_id << "Audio had stopped"); + return; + } // Fill NaviServices map. Set false to first value of pair if // we've stopped video service or to second value if we've // stopped audio service + LOG4CXX_DEBUG(logger_, + "appId: " << app_id << " service_type: " << service_type + << " to stopped"); service_type == ServiceType::kMobileNav ? it->second.first = false : it->second.second = false; } |