diff options
-rw-r--r-- | src/components/application_manager/include/application_manager/app_service_manager.h | 6 | ||||
-rw-r--r-- | src/components/application_manager/src/app_service_manager.cc | 15 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/components/application_manager/include/application_manager/app_service_manager.h b/src/components/application_manager/include/application_manager/app_service_manager.h index 621eeb18a7..9920b63bd7 100644 --- a/src/components/application_manager/include/application_manager/app_service_manager.h +++ b/src/components/application_manager/include/application_manager/app_service_manager.h @@ -166,9 +166,9 @@ class AppServiceManager { void GetProviderFromService(const AppService& service, ApplicationSharedPtr& app, bool& hmi_service); - std::pair<std::string, AppService> FindServiceByAppID(std::string name, - std::string type); - std::string GetServiceAppID(AppService service); + std::pair<std::string, AppService> FindServiceByPolicyAppID( + std::string policy_app_id, std::string type); + std::string GetPolicyAppID(AppService service); }; } // namespace application_manager diff --git a/src/components/application_manager/src/app_service_manager.cc b/src/components/application_manager/src/app_service_manager.cc index bccfcfb368..11740f13a6 100644 --- a/src/components/application_manager/src/app_service_manager.cc +++ b/src/components/application_manager/src/app_service_manager.cc @@ -102,7 +102,7 @@ smart_objects::SmartObject AppServiceManager::PublishAppService( } } } - app_service.default_service = GetServiceAppID(app_service) == default_app_id; + app_service.default_service = GetPolicyAppID(app_service) == default_app_id; published_services_.insert( std::pair<std::string, AppService>(service_id, app_service)); @@ -247,7 +247,8 @@ bool AppServiceManager::SetDefaultService(const std::string service_id) { .asString(); std::string default_app_id = DefaultServiceByType(service_type); if (!default_app_id.empty()) { - auto default_service = FindServiceByAppID(default_app_id, service_type); + auto default_service = + FindServiceByPolicyAppID(default_app_id, service_type); if (!default_service.first.empty()) { default_service.second.default_service = false; } @@ -256,7 +257,7 @@ bool AppServiceManager::SetDefaultService(const std::string service_id) { Json::Value& dictionary = last_state_.get_dictionary(); dictionary[kAppServiceSection][kDefaults][service_type] = - GetServiceAppID(service); + GetPolicyAppID(service); return true; } @@ -396,8 +397,8 @@ std::pair<std::string, AppService> AppServiceManager::FindServiceByName( return std::make_pair(std::string(), empty); } -std::pair<std::string, AppService> AppServiceManager::FindServiceByAppID( - std::string name, std::string type) { +std::pair<std::string, AppService> AppServiceManager::FindServiceByPolicyAppID( + std::string policy_app_id, std::string type) { LOG4CXX_AUTO_TRACE(logger_); for (auto it = published_services_.begin(); it != published_services_.end(); ++it) { @@ -406,7 +407,7 @@ std::pair<std::string, AppService> AppServiceManager::FindServiceByAppID( continue; } - if (name == GetServiceAppID(it->second)) { + if (policy_app_id == GetPolicyAppID(it->second)) { return *it; } } @@ -448,7 +449,7 @@ void AppServiceManager::SetServicePublished(const std::string service_id, it->second.record[strings::service_published] = service_published; } -std::string AppServiceManager::GetServiceAppID(AppService service) { +std::string AppServiceManager::GetPolicyAppID(AppService service) { if (service.mobile_service) { auto app = app_manager_.application(service.connection_key); return app ? app->policy_app_id() : std::string(); |