diff options
Diffstat (limited to 'src/hs-clientmanager.cpp')
-rw-r--r-- | src/hs-clientmanager.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/hs-clientmanager.cpp b/src/hs-clientmanager.cpp index aae8c42..15897b7 100644 --- a/src/hs-clientmanager.cpp +++ b/src/hs-clientmanager.cpp @@ -164,20 +164,17 @@ void HS_ClientManager::removeClientCtxt(void *data) int HS_ClientManager::tap_shortcut(afb_req_t request) { int ret = 0; - const char* value = afb_req_value(request, _application_name); + const char* value = afb_req_value(request, _application_id); if (value) { HMI_NOTICE("homescreen-service","request params = %s.", value); - // first step get appid from appname, next step change appname to appid - std::string appid(value); - std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower); std::lock_guard<std::mutex> lock(this->mtx); - auto ip = client_list.find(appid); + auto ip = client_list.find(std::string(value)); if(ip != client_list.end()) { ip->second->tap_shortcut(value); } } else { - HMI_NOTICE("homescreen-service","Please input application_name"); + HMI_NOTICE("homescreen-service","Please input application_id"); ret = AFB_EVENT_BAD_REQUEST; } return ret; @@ -256,7 +253,6 @@ int HS_ClientManager::subscribe(afb_req_t request) HMI_NOTICE("homescreen-service","value is %s", value); if(value) { std::string appid(afb_req_get_application_id(request)); - std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower); std::lock_guard<std::mutex> lock(this->mtx); HS_Client* client = nullptr; @@ -298,7 +294,6 @@ int HS_ClientManager::unsubscribe(afb_req_t request) int ret = 0; if(value) { std::string appid(afb_req_get_application_id(request)); - std::transform(appid.begin(), appid.end(), appid.begin(), ::tolower); std::lock_guard<std::mutex> lock(this->mtx); auto ip = client_list.find(appid); |