Encrypt widget on update.
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Fri, 29 Mar 2013 09:27:28 +0000 (10:27 +0100)
committerGerrit Code Review <gerrit2@kim11>
Thu, 4 Apr 2013 14:47:58 +0000 (23:47 +0900)
[Issue#] N/A
[Problem] Widget's content was not encrypted after updating it though
encryption was enabled.
[Cause] Encryption step was not included in the update task.
[Solution] Include encryption in the update task.
[Verification]
1. Build.
2. Install some widget with encryption enabled.
3. Check that widget's start page is encrypted.
4. Install the same widget again. (Update)
5. Check that widget's start page is still encrypted.

Change-Id: I29c13be324a3ab774084ed90fa5ebf59f687433a

src/jobs/widget_install/job_widget_install.cpp

index 0d333f0..12f598c 100644 (file)
@@ -254,6 +254,10 @@ JobWidgetInstall::JobWidgetInstall(
         }
 
         AddTask(new TaskCertify(m_installerContext));
+        if (m_needEncryption) {
+            AddTask(new TaskEncryptResource(m_installerContext));
+        }
+
         if (m_installerContext.widgetConfig.packagingType !=
             WrtDB::PKG_TYPE_DIRECTORY_WEB_APP)
         {