aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-clientmanager.cpp
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-11-06 10:28:59 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-11-06 11:18:47 +0800
commitc6035c02992d874c1422cb279423017ca4c05eec (patch)
tree7b4f59f93a760739ae18c1988a51a0d1552d9727 /src/hs-clientmanager.cpp
parentd58138e0ceb19b3f201ec5e6e7126015db2cfead (diff)
use appid instead of appname in "tap_shortcut"
Now In homescreen-service used application_id to identify different application, so use appid instead of appname in "tap_shortcut" parameter. Bug-AGL: SPEC-1764 Change-Id: I8493331f37977a30d6d88c0d222da4c2db32e727 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Diffstat (limited to 'src/hs-clientmanager.cpp')
-rw-r--r--src/hs-clientmanager.cpp11
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);