Add fallback logic when api-version of app not found 78/221878/4
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 8 Jan 2020 06:51:29 +0000 (15:51 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Wed, 8 Jan 2020 06:54:45 +0000 (06:54 +0000)
Some package may not include any applications.

Change-Id: I8cfe8e540a5113c56175ec373a6252d438230978
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/step/security/step_privacy_privilege.cc
src/common/step/security/step_privilege_compatibility.cc

index dd81413..d2e3fb2 100644 (file)
@@ -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;
 }
 
index f891f2b..dd03728 100644 (file)
@@ -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;
 }