diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc index 4756c8b9a26..c5bc79f09da 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc @@ -131,14 +131,20 @@ void SDLRPCPlugin::RevertResumption(application_manager::Application& app) { pending_resumption_handler_->OnResumptionRevert(); if (application_manager_->IsAppSubscribedForWayPoints(app)) { - application_manager_->UnsubscribeAppFromWayPoints(app.app_id()); - if (!application_manager_->IsAnyAppSubscribedForWayPoints()) { + const auto subscribed_apps = + application_manager_->GetAppsSubscribedForWayPoints(); + const bool send_unsubscribe = + subscribed_apps.size() <= 1 && + application_manager_->IsSubscribedToHMIWayPoints(); + if (send_unsubscribe) { SDL_LOG_DEBUG("Send UnsubscribeWayPoints"); auto request = application_manager::MessageHelper::CreateUnsubscribeWayPointsRequest( application_manager_->GetNextHMICorrelationID()); application_manager_->GetRPCService().ManageHMICommand(request); } + application_manager_->UnsubscribeAppFromWayPoints(app.app_id(), + send_unsubscribe); } }