labeling the contents under .mmc 72/78072/4 accepted/tizen/common/20160706.141403 accepted/tizen/ivi/20160705.044606 accepted/tizen/mobile/20160705.044438 accepted/tizen/tv/20160705.044548 accepted/tizen/wearable/20160705.044502 submit/tizen/20160704.042542
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 4 Jul 2016 07:52:49 +0000 (16:52 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Mon, 4 Jul 2016 10:31:57 +0000 (03:31 -0700)
Requires :
        https://review.tizen.org/gerrit/#/c/78145/

Change-Id: Id1892ae218463bcadef99f93f2507b7a98d4fbd5
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/common/external_storage.cc
src/common/security_registration.cc
src/common/step/filesystem/step_move_installed_storage.cc
src/common/step/filesystem/step_move_installed_storage.h

index 5b0d757..fbc2eef 100644 (file)
@@ -93,6 +93,9 @@ bool ExternalStorage::Finalize(bool success) {
     break;
   }
   case RequestType::Move: {
+    ret = handle_->interface.client_usr_post_move(pkgid_.c_str(),
+                               static_cast<app2ext_move_type_t>(move_type_),
+                               uid_);
     break;
   }
   default:
@@ -189,9 +192,11 @@ bool ExternalStorage::Initialize(
       break;
     }
 
-    ret = handle_->interface.client_usr_move(pkgid_.c_str(), glist,
-                                     (app2ext_move_type_t)move_type_,
-                                     uid_);
+    ret = handle_->interface.client_usr_disable(pkgid_.c_str(), uid_);
+
+    ret = handle_->interface.client_usr_pre_move(pkgid_.c_str(), glist,
+                               static_cast<app2ext_move_type_t>(move_type_),
+                               uid_);
     break;
   case RequestType::Uninstall:
     ret = handle_->interface.client_usr_pre_uninstall(pkgid_.c_str(), uid_);
index 8df5d86..2e0ad79 100644 (file)
@@ -36,7 +36,8 @@ const std::vector<std::pair<const char*,
   {"shared/trusted", SECURITY_MANAGER_PATH_TRUSTED_RW},
   {"tep", SECURITY_MANAGER_PATH_RO},
   {".image", SECURITY_MANAGER_PATH_RO},
-  {"tmp", SECURITY_MANAGER_PATH_RW}
+  {"tmp", SECURITY_MANAGER_PATH_RW},
+  {".mmc", SECURITY_MANAGER_PATH_RO}
 };
 
 bool PrepareRequest(const std::string& app_id, const std::string& pkg_id,
index caab2e0..b85dfa5 100644 (file)
@@ -55,6 +55,12 @@ Step::Status StepMoveInstalledStorage::undo() {
   return Status::OK;
 }
 
+Step::Status StepMoveInstalledStorage::clean() {
+  if (context_->external_storage)
+    context_->external_storage->Commit();
+  return Status::OK;
+}
+
 void StepMoveInstalledStorage::SetTepPaths() {
   old_location_ = context_->manifest_data.get()->tep_name;
   if (context_->is_move_to_external.get()) {
index 9bae6d5..a064976 100644 (file)
@@ -17,7 +17,7 @@ class StepMoveInstalledStorage : public Step {
 
   Status process() override;
 
-  Status clean() override { return Status::OK; }
+  Status clean() override;
   Status undo() override;
   Status precheck() override { return Status::OK; }