Fix logic of 'update' attribute 51/130951/3
authorjongmyeongko <jongmyeong.ko@samsung.com>
Wed, 24 May 2017 12:35:05 +0000 (21:35 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Fri, 2 Jun 2017 04:54:37 +0000 (04:54 +0000)
Requires and Refer to:
https://review.tizen.org/gerrit/#/c/130948/

Change-Id: I408ec32d9cabd161217e4a462188c27e6366d712
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/wgt/step/configuration/step_parse.cc

index 01ae9bc..6157663 100644 (file)
@@ -275,12 +275,14 @@ bool StepParse::FillWidgetInfo(manifest_x* manifest) {
 
   // set update true if package is updated preload package
   ci::RequestType req_type = context_->request_type.get();
-  if (req_type == ci::RequestType::ReadonlyUpdateInstall)
+  if (ci::QueryIsUpdatedPackage(context_->pkgid.get(), context_->uid.get()))
     manifest->update = strdup("true");
-  else if (req_type == ci::RequestType::ReadonlyUpdateUninstall)
-    manifest->update = strdup("false");
-  else if (ci::QueryIsUpdatedReadonlyPackage(context_->pkgid.get(),
-      context_->uid.get()))
+  else if (ci::QueryIsPreloadPackage(context_->pkgid.get(),
+      context_->uid.get()) &&
+          (req_type == ci::RequestType::Update ||
+           req_type == ci::RequestType::Delta ||
+           req_type == ci::RequestType::MountUpdate ||
+           req_type == ci::RequestType::ReadonlyUpdateInstall))
     manifest->update = strdup("true");
   else
     manifest->update = strdup("false");