diff --git a/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp b/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp index 2ba741e7..ab10937c 100755 --- a/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp +++ b/services/devicemanagerservice/src/devicestate/dm_device_state_manager.cpp @@ -129,8 +129,8 @@ void DmDeviceStateManager::PostDeviceOffline(const std::string &pkgName, const D void DmDeviceStateManager::OnDeviceOnline(const std::string &pkgName, const DmDeviceInfo &info) { - DmDistributedHhardwareLoad::GetInstance().InitDistributedHardwareLoadCount(); - DmDistributedHhardwareLoad::GetInstance().LoadDistributedHardwareFwk(); + DmDistributedHardwareLoad::GetInstance().InitDistributedHardwareLoadCount(); + DmDistributedHardwareLoad::GetInstance().LoadDistributedHardwareFwk(); LOGI("OnDeviceOnline function is called back with pkgName: %s", pkgName.c_str()); RegisterOffLineTimer(info); RegisterProfileListener(pkgName, info); diff --git a/utils/include/fwkload/lite/dm_distributed_hardware_load.h b/utils/include/fwkload/lite/dm_distributed_hardware_load.h index 94a1f1cd..7a2d54c2 100644 --- a/utils/include/fwkload/lite/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/lite/dm_distributed_hardware_load.h @@ -13,14 +13,14 @@ * limitations under the License. */ -#ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_FWK_H -#define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_FWK_H +#ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H +#define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #include #include "single_instance.h" namespace OHOS { namespace DistributedHardware { -class DmDistributedHhardwareLoad { - DECLARE_SINGLE_INSTANCE(DmDistributedHhardwareLoad); +class DmDistributedHardwareLoad { + DECLARE_SINGLE_INSTANCE(DmDistributedHardwareLoad); public: void LoadDistributedHardwareFwk(void); void InitDistributedHardwareLoadCount(void); diff --git a/utils/include/fwkload/standard/dm_distributed_hardware_load.h b/utils/include/fwkload/standard/dm_distributed_hardware_load.h index d8977439..3f47ffd0 100644 --- a/utils/include/fwkload/standard/dm_distributed_hardware_load.h +++ b/utils/include/fwkload/standard/dm_distributed_hardware_load.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_FWK_H -#define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_FWK_H +#ifndef OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H +#define OHOS_DM_DISTRIBUTEED_HARDWARE_LOAD_H #include "if_system_ability_manager.h" #include "iservice_registry.h" #include "single_instance.h" @@ -29,8 +29,8 @@ public: void OnLoadSystemAbilityFail(int32_t systemAbilityId) override; }; -class DmDistributedHhardwareLoad { - DECLARE_SINGLE_INSTANCE(DmDistributedHhardwareLoad); +class DmDistributedHardwareLoad { + DECLARE_SINGLE_INSTANCE(DmDistributedHardwareLoad); public: void LoadDistributedHardwareFwk(void); void InitDistributedHardwareLoadCount(void); diff --git a/utils/src/fwkload/lite/dm_distributed_hardware_load.cpp b/utils/src/fwkload/lite/dm_distributed_hardware_load.cpp index 21e1e268..bdc2a89d 100644 --- a/utils/src/fwkload/lite/dm_distributed_hardware_load.cpp +++ b/utils/src/fwkload/lite/dm_distributed_hardware_load.cpp @@ -18,16 +18,16 @@ namespace OHOS { namespace DistributedHardware { -IMPLEMENT_SINGLE_INSTANCE(DmDistributedHhardwareLoad); -void DmDistributedHhardwareLoad::LoadDistributedHardwareFwk(void) +IMPLEMENT_SINGLE_INSTANCE(DmDistributedHardwareLoad); +void DmDistributedHardwareLoad::LoadDistributedHardwareFwk(void) { return; } -void DmDistributedHhardwareLoad::InitDistributedHardwareLoadCount(void) +void DmDistributedHardwareLoad::InitDistributedHardwareLoadCount(void) { return; } -uint32_t DmDistributedHhardwareLoad::getDistributedHardwareLoadCount(void) +uint32_t DmDistributedHardwareLoad::getDistributedHardwareLoadCount(void) { return 0; } diff --git a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp index f13eed48..c349c7de 100644 --- a/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp +++ b/utils/src/fwkload/standard/dm_distributed_hardware_load.cpp @@ -14,12 +14,11 @@ */ #include "dm_constants.h" -#include "dm_distributed_hardware_load.h" #include "dm_log.h" +#include "dm_distributed_hardware_load.h" namespace OHOS { namespace DistributedHardware { - void DistributedHardwareLoadCallback::OnLoadSystemAbilitySuccess( int32_t systemAbilityId, const sptr &remoteObject) { @@ -30,21 +29,20 @@ void DistributedHardwareLoadCallback::OnLoadSystemAbilitySuccess( return; } } - void DistributedHardwareLoadCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId) { LOGE("DmDistributedHhardware Load SA failed, systemAbilityId:%d", systemAbilityId); uint32_t maxLoadValue = 3; - if (DmDistributedHhardwareLoad::GetInstance().getDistributedHardwareLoadCount() < maxLoadValue) { - DmDistributedHhardwareLoad::GetInstance().LoadDistributedHardwareFwk(); + if (DmDistributedHardwareLoad::GetInstance().getDistributedHardwareLoadCount() < maxLoadValue) { + DmDistributedHardwareLoad::GetInstance().LoadDistributedHardwareFwk(); } return; } -IMPLEMENT_SINGLE_INSTANCE(DmDistributedHhardwareLoad); -void DmDistributedHhardwareLoad::LoadDistributedHardwareFwk(void) +IMPLEMENT_SINGLE_INSTANCE(DmDistributedHardwareLoad); +void DmDistributedHardwareLoad::LoadDistributedHardwareFwk(void) { - LOGI("enter DmDistributedHhardwareLoad::LoadDistributedHardwareFwk"); + LOGI("enter DmDistributedHardwareLoad::LoadDistributedHardwareFwk"); sptr samgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (samgr == nullptr) { LOGE("failed to get system ability mgr."); @@ -58,11 +56,11 @@ void DmDistributedHhardwareLoad::LoadDistributedHardwareFwk(void) } return; } -void DmDistributedHhardwareLoad::InitDistributedHardwareLoadCount(void) +void DmDistributedHardwareLoad::InitDistributedHardwareLoadCount(void) { nLoadCount_ = 0; } -uint32_t DmDistributedHhardwareLoad::getDistributedHardwareLoadCount() +uint32_t DmDistributedHardwareLoad::getDistributedHardwareLoadCount() { return nLoadCount_; }