X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhs-appinfo.cpp;h=b072ee0d47877c7672be7027828f9e515c24ca77;hb=e8ecf9862cf730edc4b034fbc05450b56e28617d;hp=6b222656eef23abc28114e7f2365310047983e92;hpb=2d1c8cc2f43d021ad75adc16f0606fb52615d9a6;p=apps%2Fagl-service-homescreen.git diff --git a/src/hs-appinfo.cpp b/src/hs-appinfo.cpp index 6b22265..b072ee0 100644 --- a/src/hs-appinfo.cpp +++ b/src/hs-appinfo.cpp @@ -247,7 +247,7 @@ int HS_AppInfo::updateAppDetailList(afb_api_t api, struct json_object *object) json_object_put(j_runnable); return 1; } - addAppDetail(j_found); + addAppDetail(json_object_get(j_found)); pushAppListChangedEvent(_keyInstall, j_found); } else { @@ -261,7 +261,7 @@ int HS_AppInfo::updateAppDetailList(afb_api_t api, struct json_object *object) AFB_INFO("uninstalled application isn't in runnables list, appid=%s.", appid.c_str()); return 1; } - pushAppListChangedEvent(_keyUninstall, obj_data); + pushAppListChangedEvent(_keyUninstall, json_object_get(obj_data)); removeAppDetail(appid); } else { @@ -418,12 +418,7 @@ std::string HS_AppInfo::id2appid(const std::string &id) const { std::string appid; std::size_t pos = id.find("@"); - if(pos != std::string::npos) { - appid = id.substr(0,pos); - } - else { - AFB_WARNING("input id error."); - } + appid = id.substr(0,pos); return appid; }