From 696034e0987871d3973666096eeff6bb4042d712 Mon Sep 17 00:00:00 2001 From: jessica_2029 Date: Mon, 25 Jul 2022 17:25:58 +0800 Subject: [PATCH] fix:remove time interval parameter of Watchdog::GetInstance().AddThread Signed-off-by: jessica_2029 --- service/native/src/display_power_mgr_service.cpp | 8 +------- service/native/src/gradual_animator.cpp | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/service/native/src/display_power_mgr_service.cpp b/service/native/src/display_power_mgr_service.cpp index c2f3837..0e53a6d 100644 --- a/service/native/src/display_power_mgr_service.cpp +++ b/service/native/src/display_power_mgr_service.cpp @@ -15,11 +15,6 @@ #include "display_power_mgr_service.h" -#include -#include -#include -#include -#include #include #include #include @@ -35,7 +30,6 @@ namespace OHOS { namespace DisplayPowerMgr { namespace { constexpr const char* DISPLAY_SERVICE_NAME = "DisplayPowerManagerService"; -constexpr int32_t WATCH_DOG_DELAY_S = 60; } DisplayPowerMgrService::DisplayPowerMgrService() { @@ -56,7 +50,7 @@ void DisplayPowerMgrService::Init() handler_ = std::make_shared(eventRunner_, DelayedSpSingleton::GetInstance()); std::string handlerName("DisplayPowerEventHandler"); - HiviewDFX::Watchdog::GetInstance().AddThread(handlerName, handler_, WATCH_DOG_DELAY_S); + HiviewDFX::Watchdog::GetInstance().AddThread(handlerName, handler_); } std::vector displayIds = ScreenAction::GetAllDisplayId(); diff --git a/service/native/src/gradual_animator.cpp b/service/native/src/gradual_animator.cpp index b020b00..69d1b00 100644 --- a/service/native/src/gradual_animator.cpp +++ b/service/native/src/gradual_animator.cpp @@ -63,8 +63,7 @@ void GradualAnimator::StartAnimation(uint32_t from, uint32_t to, uint32_t durati return; } handler_ = std::make_shared(eventRunner_, shared_from_this()); - const int32_t WATCH_DOG_DELAY_S = 60; - HiviewDFX::Watchdog::GetInstance().AddThread(name_, handler_, WATCH_DOG_DELAY_S); + HiviewDFX::Watchdog::GetInstance().AddThread(name_, handler_); } animating_ = true; handler_->SendEvent(EVENT_STEP, 0, updateTime_); -- Gitee