From a3b27cbea1cc101f5d2eb627c8aa248044eaedb1 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Wed, 3 Aug 2016 10:47:41 +0200 Subject: [PATCH] Stylecheck Change-Id: I081823db8cf901310aed58549c905ed304eedeac --- src/common/app_installer.cc | 3 ++- src/common/feature_validator.cc | 9 +++++--- .../step/configuration/step_parse_manifest.cc | 5 ++--- .../step/pkgmgr/step_update_pkg_disable_info.cc | 24 ++++++++++++++-------- .../step/pkgmgr/step_update_pkg_disable_info.h | 2 +- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/common/app_installer.cc b/src/common/app_installer.cc index c03c2c5..ec7e9da 100644 --- a/src/common/app_installer.cc +++ b/src/common/app_installer.cc @@ -3,9 +3,10 @@ // Use of this source code is governed by a apache 2.0 license that can be // found in the LICENSE file. +#include + #include #include -#include #include "common/app_installer.h" #include "common/installer_context.h" diff --git a/src/common/feature_validator.cc b/src/common/feature_validator.cc index c7f767e..abcc16e 100644 --- a/src/common/feature_validator.cc +++ b/src/common/feature_validator.cc @@ -58,7 +58,8 @@ bool FeatureValidator::Validate(std::string* error) { } bool FeatureValidator::ValidateBoolean( - const std::string& feature, const std::string& /* value */, std::string* error) { + const std::string& feature, const std::string& /*value*/, + std::string* error) { bool supported = false; int ret = system_info_get_platform_bool(feature.c_str(), &supported); if (ret != SYSTEM_INFO_ERROR_NONE) { @@ -70,7 +71,8 @@ bool FeatureValidator::ValidateBoolean( } bool FeatureValidator::ValidateInteger( - const std::string& feature, const std::string& /* value */, std::string* error) { + const std::string& feature, const std::string& /*value*/, + std::string* error) { int platform_value = 0; int ret = system_info_get_platform_int(feature.c_str(), &platform_value); if (ret != SYSTEM_INFO_ERROR_NONE) { @@ -82,7 +84,8 @@ bool FeatureValidator::ValidateInteger( } bool FeatureValidator::ValidateString( - const std::string& feature, const std::string& /* value */, std::string* error) { + const std::string& feature, const std::string& /*value*/, + std::string* error) { char* text = nullptr; BOOST_SCOPE_EXIT_ALL(text) { free(text); diff --git a/src/common/step/configuration/step_parse_manifest.cc b/src/common/step/configuration/step_parse_manifest.cc index b6cfbe7..b7728d7 100644 --- a/src/common/step/configuration/step_parse_manifest.cc +++ b/src/common/step/configuration/step_parse_manifest.cc @@ -821,9 +821,8 @@ Step::Status StepParseManifest::process() { return Step::Status::PARSE_ERROR; } - // TODO: need to be checked more (offline mode and store app) - //if (!CheckFeatures()) - // return Status::PARSE_ERROR; + // TODO(jongmyeongko): check package features... + // Implementation of this need more consideration (offline mode and store app) if (manifest_location_ == ManifestLocation::INSTALLED) { // recovery of tep value for installed package diff --git a/src/common/step/pkgmgr/step_update_pkg_disable_info.cc b/src/common/step/pkgmgr/step_update_pkg_disable_info.cc index 521ae5c..ed77599 100644 --- a/src/common/step/pkgmgr/step_update_pkg_disable_info.cc +++ b/src/common/step/pkgmgr/step_update_pkg_disable_info.cc @@ -23,13 +23,17 @@ Step::Status StepUpdatePkgDisableInfo::precheck() { Step::Status StepUpdatePkgDisableInfo::process() { if (action_type_ == ActionType::Disable) { - if (!DisablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), context_->request_mode.get())) { - LOG(ERROR) << "Failed to update pkg info to disable :" << context_->pkgid.get(); + if (!DisablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), + context_->request_mode.get())) { + LOG(ERROR) << "Failed to update pkg info to disable :" + << context_->pkgid.get(); return Status::REGISTER_ERROR; } } else { - if (!EnablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), context_->request_mode.get())) { - LOG(ERROR) << "Failed to update pkg info to enable :" << context_->pkgid.get(); + if (!EnablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), + context_->request_mode.get())) { + LOG(ERROR) << "Failed to update pkg info to enable :" + << context_->pkgid.get(); return Status::REGISTER_ERROR; } } @@ -39,13 +43,17 @@ Step::Status StepUpdatePkgDisableInfo::process() { Step::Status StepUpdatePkgDisableInfo::undo() { if (action_type_ == ActionType::Disable) { - if (!EnablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), context_->request_mode.get())) { - LOG(ERROR) << "Failed to update pkg info to enable : " << context_->pkgid.get(); + if (!EnablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), + context_->request_mode.get())) { + LOG(ERROR) << "Failed to update pkg info to enable : " + << context_->pkgid.get(); return Status::REGISTER_ERROR; } } else { - if (!DisablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), context_->request_mode.get())) { - LOG(ERROR) << "Failed to update pkg info to disable : " << context_->pkgid.get(); + if (!DisablePkgInPkgmgr(context_->pkgid.get(), context_->uid.get(), + context_->request_mode.get())) { + LOG(ERROR) << "Failed to update pkg info to disable : " + << context_->pkgid.get(); return Status::REGISTER_ERROR; } } diff --git a/src/common/step/pkgmgr/step_update_pkg_disable_info.h b/src/common/step/pkgmgr/step_update_pkg_disable_info.h index 5e95adc..24844f2 100644 --- a/src/common/step/pkgmgr/step_update_pkg_disable_info.h +++ b/src/common/step/pkgmgr/step_update_pkg_disable_info.h @@ -33,4 +33,4 @@ class StepUpdatePkgDisableInfo : public common_installer::Step { } // namespace pkgmgr } // namespace common_installer -#endif //COMMON_STEP_PKGMGR_STEP_UPDATE_PKG_DISABLE_INFO_H_ +#endif // COMMON_STEP_PKGMGR_STEP_UPDATE_PKG_DISABLE_INFO_H_ -- 2.7.4