From: Yunchan Cho Date: Tue, 26 Mar 2013 11:38:46 +0000 (+0900) Subject: Save value of auto-launch to livebox DB without adding manifest file X-Git-Tag: accepted/tizen_2.1/20130425.023916~15^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4851d1806561340ff82a7fb0821387dfe14987a2;p=framework%2Fweb%2Fwrt-installer.git Save value of auto-launch to livebox DB without adding manifest file [Issue#] DCM-962 [Problem] There is no way for webapp to know that the webapp is launched by web livebox [Cause] wrt-installer doesn't save value 'auto-launch' attribute to web livebox DB [Solution] value of 'auto-launch' is saved to web livebox DB by installer. This value is used by web-provider on clicking box. Change-Id: I8e1e4538ef55f80aab93972f9b52996159f427cb --- diff --git a/src/jobs/widget_install/manifest.h b/src/jobs/widget_install/manifest.h index 20236a4..e6f7827 100644 --- a/src/jobs/widget_install/manifest.h +++ b/src/jobs/widget_install/manifest.h @@ -403,10 +403,6 @@ class LiveBox { this->primary = x; } - void setAutoLaunch(const NcnameType &x) - { - this->autoLaunch = x; - } void setUpdatePeriod(const NcnameType &x) { this->updatePeriod = x; diff --git a/src/jobs/widget_install/task_database.cpp b/src/jobs/widget_install/task_database.cpp index d7f4646..084c321 100644 --- a/src/jobs/widget_install/task_database.cpp +++ b/src/jobs/widget_install/task_database.cpp @@ -333,9 +333,16 @@ void TaskDatabase::StepLiveboxDBInsert() LogInfo("livebox id: " << boxId); LogInfo("livebox type: " << boxType); + int autoLaunch; + if ((**it).m_autoLaunch == L"true") { + autoLaunch = 1; + } else { + autoLaunch = 0; + } + int ret = - web_provider_livebox_insert_box_type( - boxId.c_str(), tizenId.c_str(), boxType.c_str()); + web_provider_livebox_insert_box_info( + boxId.c_str(), tizenId.c_str(), boxType.c_str(), autoLaunch); if (ret < 0) { LogDebug("failed to set type of livebox: " << boxId); diff --git a/src/jobs/widget_install/task_manifest_file.cpp b/src/jobs/widget_install/task_manifest_file.cpp index 95b53c5..400fc65 100644 --- a/src/jobs/widget_install/task_manifest_file.cpp +++ b/src/jobs/widget_install/task_manifest_file.cpp @@ -899,10 +899,6 @@ void TaskManifestFile::setLiveBoxInfo(Manifest& manifest) liveBox.setPrimary(ConfigInfo->m_primary); } - if (ConfigInfo->m_autoLaunch == L"true") { - liveBox.setAutoLaunch(appid); - } - if (ConfigInfo->m_updatePeriod != L"") { liveBox.setUpdatePeriod(ConfigInfo->m_updatePeriod); }