From: Andrzej Popowski Date: Fri, 8 Jul 2016 08:28:45 +0000 (+0900) Subject: [Application] - Fixing undefined iconPath attribute issue X-Git-Tag: submit/tizen/20160708.104007~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d55dc5604b6a7821337f25b0a7b7fae61c91062c;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Application] - Fixing undefined iconPath attribute issue TCT result: 99.47% (190/189/0/1/0) Change-Id: I79471656580973c1d22964e4c5caaed7270cf5af Signed-off-by: Andrzej Popowski --- diff --git a/src/application/application_utils.cc b/src/application/application_utils.cc index 9cf23d53..1c39776c 100644 --- a/src/application/application_utils.cc +++ b/src/application/application_utils.cc @@ -39,6 +39,7 @@ void ApplicationUtils::CreateApplicationInformation(const pkgmgrinfo_appinfo_h h ret = pkgmgrinfo_appinfo_get_appid(handle, &tmp_str); if ((PMINFO_R_OK != ret) || (nullptr == tmp_str)) { LoggerE("Failed to get appid: %d (%s)", ret, get_error_message(ret)); + app_info->insert(std::make_pair("id", picojson::value(""))); } else { app_info->insert(std::make_pair("id", picojson::value(tmp_str))); } @@ -57,6 +58,7 @@ void ApplicationUtils::CreateApplicationInformation(const pkgmgrinfo_appinfo_h h ret = pkgmgrinfo_appinfo_get_icon(handle, &tmp_str); if ((PMINFO_R_OK != ret) || (nullptr == tmp_str)) { LoggerE("Failed to get icon path: %d (%s)", ret, get_error_message(ret)); + app_info->insert(std::make_pair("iconPath", picojson::value(""))); } else { app_info->insert(std::make_pair("iconPath", picojson::value(tmp_str))); } @@ -67,6 +69,7 @@ void ApplicationUtils::CreateApplicationInformation(const pkgmgrinfo_appinfo_h h ret = pkgmgrinfo_appinfo_is_nodisplay(handle, &no_display); if (PMINFO_R_OK != ret) { LoggerE("Failed to get nodisplay: %d (%s)", ret, get_error_message(ret)); + app_info->insert(std::make_pair("show", picojson::value(false))); } else { app_info->insert(std::make_pair("show", picojson::value(!no_display))); }