From: Sangyoon Jang Date: Wed, 8 Jan 2020 06:51:29 +0000 (+0900) Subject: Add fallback logic when api-version of app not found X-Git-Tag: accepted/tizen/unified/20200120.133140~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26eb5478660a89a138a7ffa9431813c443111e46;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Add fallback logic when api-version of app not found Some package may not include any applications. Change-Id: I8cfe8e540a5113c56175ec373a6252d438230978 Signed-off-by: Sangyoon Jang --- diff --git a/src/common/step/security/step_privacy_privilege.cc b/src/common/step/security/step_privacy_privilege.cc index dd81413..d2e3fb2 100644 --- a/src/common/step/security/step_privacy_privilege.cc +++ b/src/common/step/security/step_privacy_privilege.cc @@ -26,6 +26,10 @@ std::string GetAPIVersion(manifest_x* m, bool is_web) { api_version = app->api_version; break; } + if (api_version.empty()) + // fallback if api-version not found. In case of addon package, + // application does not included in package. + api_version = m->api_version; return api_version; } diff --git a/src/common/step/security/step_privilege_compatibility.cc b/src/common/step/security/step_privilege_compatibility.cc index f891f2b..dd03728 100644 --- a/src/common/step/security/step_privilege_compatibility.cc +++ b/src/common/step/security/step_privilege_compatibility.cc @@ -63,6 +63,10 @@ std::string GetAPIVersion(manifest_x* m, bool is_web) { api_version = app->api_version; break; } + if (api_version.empty()) + // fallback if api-version not found. In case of addon package, + // application does not included in package. + api_version = m->api_version; return api_version; }