summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc24
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc16
2 files changed, 35 insertions, 5 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index f807be2f5e..51b2f272d6 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -1996,6 +1996,14 @@ void ApplicationManagerImpl::OnStreamingConfigured(
application(app_id)->StartStreaming(service_type);
connection_handler().NotifyServiceStartedResult(app_id, true, empty);
+
+ // Fix: For wifi Secondary
+ // Should erase appid from deque of ForbidStreaming() push in the last time
+ std::deque<uint32_t>::const_iterator iter = std::find(
+ navi_app_to_end_stream_.begin(), navi_app_to_end_stream_.end(), app_id);
+ if (navi_app_to_end_stream_.end() != iter) {
+ navi_app_to_end_stream_.erase(iter);
+ }
} else {
std::vector<std::string> converted_params =
ConvertRejectedParamList(rejected_params);
@@ -2040,6 +2048,22 @@ void ApplicationManagerImpl::StopNaviService(
service_type == ServiceType::kMobileNav ? it->second.first = false
: it->second.second = false;
}
+ // Fix: For wifi Secondary
+ // undisposed data active the VPMService restart again,
+ // because Not set Allowstream flag
+ ApplicationSharedPtr app = application(app_id);
+ if (!app || (!app->is_navi() && !app->mobile_projection_enabled())) {
+ LOG4CXX_ERROR(logger_, "Navi/Projection application not found");
+ return;
+ }
+ if (service_type == ServiceType::kMobileNav) {
+ app->set_video_streaming_allowed(false);
+ }
+ if (service_type == ServiceType::kAudio) {
+ app->set_audio_streaming_allowed(false);
+ }
+ // push_back for judge in ForbidStreaming(),
+ navi_app_to_end_stream_.push_back(app_id);
}
ApplicationSharedPtr app = application(app_id);
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index c8b4268bf0..4b97aa0e0c 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -1710,12 +1710,18 @@ void ConnectionHandlerImpl::OnConnectionEnded(
const uint32_t session_key =
KeyFromPair(connection_id, session_it->first);
const ServiceList& service_list = session_it->second.service_list;
- for (ServiceList::const_iterator service_it = service_list.begin(),
- end = service_list.end();
- service_it != end;
- ++service_it) {
+
+ // Fix:
+ // Endcallback(service_type) by Disconnected,
+ // It should ended in order by 10|11 -> 7.
+ // Refer to service_list.rend() of CloseSession()
+ ServiceList::const_reverse_iterator service_list_itr =
+ service_list.rbegin();
+ for (; service_list_itr != service_list.rend(); ++service_list_itr) {
connection_handler_observer_->OnServiceEndedCallback(
- session_key, service_it->service_type, CloseSessionReason::kCommon);
+ session_key,
+ service_list_itr->service_type,
+ CloseSessionReason::kCommon);
}
}
ending_connection_ = NULL;