Fix a variable name 22/271422/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Mon, 21 Feb 2022 04:50:09 +0000 (13:50 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Mon, 21 Feb 2022 04:50:09 +0000 (13:50 +0900)
The variable name for PkgmgrSignal 'ps' seems more proper than 'pi'.

Change-Id: I58d2e64e1ddc1adc614fcd25a095f60b270d5801
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/installer/app_installer.cc
src/common/installer/app_installer.h

index 0f767c3..47f9a29 100644 (file)
@@ -124,7 +124,7 @@ AppInstaller::AppInstaller(const char* package_type, PkgMgrPtr pkgmgr)
   // pkgmgr signal should work only for online mode
   // there is no one to receive it in offline mode
   if (context_->installation_mode.get() == InstallationMode::ONLINE) {
-    pi_ = pkgmgr->CreatePkgmgrSignal();
+    ps_ = pkgmgr->CreatePkgmgrSignal();
   }
 }
 
@@ -825,10 +825,10 @@ void AppInstaller::UnknownSteps() {
 
 void AppInstaller::HandleStepError(Step::Status result,
                                    const std::string& error) {
-  if (!pi_)
+  if (!ps_)
     return;
 
-  pi_->SendError(result, error, context_->pkg_type.get(),
+  ps_->SendError(result, error, context_->pkg_type.get(),
                  context_->pkgid.get());
 }
 
@@ -845,18 +845,18 @@ std::string AppInstaller::GetPackageVersion() {
 }
 
 bool AppInstaller::SendStartIfNotSent(bool is_skippable) {
-  if (!pi_)
+  if (!ps_)
     return false;
 
-  if (pi_->state() != PkgmgrSignal::State::NOT_SENT)
+  if (ps_->state() != PkgmgrSignal::State::NOT_SENT)
     return true;
 
   if (context_->pkgid.get().empty() && is_skippable)
     return true;
 
   // set request type before sending start signal
-  pi_->SetRequestType(context_->request_type.get());
-  pi_->SendStarted(context_->pkg_type.get(), context_->pkgid.get());
+  ps_->SetRequestType(context_->request_type.get());
+  ps_->SendStarted(context_->pkg_type.get(), context_->pkgid.get());
 
   return true;
 }
@@ -867,7 +867,7 @@ void AppInstaller::SendProgress(int progress) {
     return;
 
   // send installation progress
-  pi_->SendProgress(progress,
+  ps_->SendProgress(progress,
       context_->pkg_type.get(), context_->pkgid.get());
 }
 
@@ -875,7 +875,7 @@ void AppInstaller::SendFinished(Step::Status process_status) {
   if (!SendStartIfNotSent(false))
     return;
 
-  pi_->SendFinished(process_status,
+  ps_->SendFinished(process_status,
                     context_->pkg_type.get(),
                     context_->pkgid.get());
 }
index af2275d..32b0b78 100644 (file)
@@ -295,7 +295,7 @@ class AppInstaller {
   std::list<std::unique_ptr<Step>>::iterator it_;
 
   // data used to send signal
-  std::unique_ptr<PkgmgrSignal> pi_;
+  std::unique_ptr<PkgmgrSignal> ps_;
 
   bool SendStartIfNotSent(bool is_skippable);
   void SendProgress(int progress);