From: Pawel Sikorski
Date: Mon, 3 Aug 2015 11:37:14 +0000 (+0200)
Subject: Fix in "shared" feature for tizen 3.0.
X-Git-Tag: accepted/tizen/mobile/20150804.000145~3
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77a8598c4c00f5a4640fd7b8997faf9148d3141e;p=platform%2Fcore%2Fappfw%2Fapp-installers.git
Fix in "shared" feature for tizen 3.0.
Instead of required_version, widget version was used to check the platform
version.
But, required_version should be used here.
Change-Id: I30fea9280937bec0759854ef999941b2530f3926
---
diff --git a/src/common/context_installer.h b/src/common/context_installer.h
index 0534fd6..c4dc1d7 100644
--- a/src/common/context_installer.h
+++ b/src/common/context_installer.h
@@ -26,8 +26,6 @@ class ConfigData {
ConfigData() {}
/** version pointed in tag*/
Property required_api_version;
- /** version pointed int tag*/
- Property required_tizen_version;
};
class BackendData {
diff --git a/src/wgt/step/step_parse.cc b/src/wgt/step/step_parse.cc
index 92f1420..3083cbd 100755
--- a/src/wgt/step/step_parse.cc
+++ b/src/wgt/step/step_parse.cc
@@ -134,7 +134,6 @@ bool StepParse::FillWidgetInfo(manifest_x* manifest) {
}
bool StepParse::FillApplicationInfo(manifest_x* manifest) {
- std::string api_version;
std::shared_ptr app_info =
std::static_pointer_cast(
parser_->GetManifestData(app_keys::kTizenApplicationKey));
@@ -150,7 +149,6 @@ bool StepParse::FillApplicationInfo(manifest_x* manifest) {
manifest->uiapplication->icon =
reinterpret_cast (calloc(1, sizeof(icon_x)));
- api_version = app_info->required_version();
manifest->uiapplication->appid = strdup(app_info->id().c_str());
manifest->uiapplication->type = strdup("webapp");
@@ -291,11 +289,10 @@ common_installer::Step::Status StepParse::process() {
if (short_name_set.begin() != short_name_set.end())
short_name = short_name_set.begin()->second;
- const std::string& tizen_version = wgt_info->version();
+ const std::string& package_version = wgt_info->version();
const std::string& required_api_version = info->required_version();
context_->config_data.get().required_api_version.set(required_api_version);
- context_->config_data.get().required_tizen_version.set(tizen_version);
context_->pkgid.set(std::string(manifest->package));
std::shared_ptr perm_info =
@@ -323,7 +320,7 @@ common_installer::Step::Status StepParse::process() {
LOG(DEBUG) << " id = " << info->id();
LOG(DEBUG) << " name = " << name;
LOG(DEBUG) << " short_name = " << short_name;
- LOG(DEBUG) << " tizen_version = " << tizen_version;
+ LOG(DEBUG) << " aplication version = " << package_version;
LOG(DEBUG) << " icon = " << manifest->uiapplication->icon->name;
LOG(DEBUG) << " api_version = " << info->required_version();
LOG(DEBUG) << " privileges -[";
diff --git a/src/wgt/step/step_wgt_copy_storage_directories.cc b/src/wgt/step/step_wgt_copy_storage_directories.cc
index 3398f42..ff36a74 100644
--- a/src/wgt/step/step_wgt_copy_storage_directories.cc
+++ b/src/wgt/step/step_wgt_copy_storage_directories.cc
@@ -27,9 +27,9 @@ namespace wgt {
namespace copy_storage {
common_installer::Step::Status StepWgtCopyStorageDirectories::process() {
- int rel_version =
- context_->config_data.get().required_tizen_version.get().at(0) - '0';
- if (rel_version < 3) {
+ int version =
+ context_->config_data.get().required_api_version.get().at(0) - '0';
+ if (version < 3) {
LOG(DEBUG) << "Shared directory coping for tizen 2.x";
return StepCopyStorageDirectories::process();
}
@@ -43,9 +43,9 @@ common_installer::Step::Status StepWgtCopyStorageDirectories::process() {
}
common_installer::Step::Status StepWgtCopyStorageDirectories::undo() {
- int rel_version =
- context_->config_data.get().required_tizen_version.get().at(0) - '0';
- if (rel_version < 3) {
+ int version =
+ context_->config_data.get().required_api_version.get().at(0) - '0';
+ if (version < 3) {
LOG(DEBUG) << "Shared directory coping for tizen 2.x";
return StepCopyStorageDirectories::undo();
}
diff --git a/src/wgt/step/step_wgt_create_storage_directories.cc b/src/wgt/step/step_wgt_create_storage_directories.cc
index bf55ae8..f93a251 100644
--- a/src/wgt/step/step_wgt_create_storage_directories.cc
+++ b/src/wgt/step/step_wgt_create_storage_directories.cc
@@ -27,10 +27,10 @@ common_installer::Step::Status StepWgtCreateStorageDirectories::process() {
if (!PrivateDir())
return Status::ERROR;
- char rel_version =
- context_->config_data.get().required_tizen_version.get().at(0);
+ char version =
+ context_->config_data.get().required_api_version.get().at(0);
- if ((rel_version-'0') < 3) {
+ if ((version-'0') < 3) {
LOG(DEBUG) << "Shared directory preparation for tizen 2.x";
if (!ShareDir())
return Status::ERROR;