From 500f0e9146ba1bd84fbf5003527d12ccc1fd7aa8 Mon Sep 17 00:00:00 2001 From: houdisheng Date: Mon, 14 Mar 2022 18:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E5=8F=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=91=A8=E6=9C=9F=E6=80=A7=E5=88=B7=E7=9B=98?= =?UTF-8?q?=E6=97=B6=E5=88=A0=E9=99=A4handler=E4=BA=8B=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houdisheng --- services/common/src/bundle_active_core.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/services/common/src/bundle_active_core.cpp b/services/common/src/bundle_active_core.cpp index 65d56b8..655043c 100644 --- a/services/common/src/bundle_active_core.cpp +++ b/services/common/src/bundle_active_core.cpp @@ -281,7 +281,7 @@ void BundleActiveCore::RestoreToDatabaseLocked(const int userId) } if (!handler_.expired()) { BUNDLE_ACTIVE_LOGI("RestoreToDatabaseLocked remove flush to disk event"); - handler_.lock()->RemoveEvent(BundleActiveReportHandler::MSG_FLUSH_TO_DISK, userId); + handler_.lock()->RemoveEvent(BundleActiveReportHandler::MSG_FLUSH_TO_DISK); } } @@ -344,7 +344,7 @@ int64_t BundleActiveCore::CheckTimeChangeAndGetWallTime(int userId) it->second->LoadActiveStats(actualSystemTime, true, true); if (!handler_.expired()) { BUNDLE_ACTIVE_LOGI("CheckTimeChangeAndGetWallTime remove flush to disk event"); - handler_.lock()->RemoveEvent(BundleActiveReportHandler::MSG_FLUSH_TO_DISK, userId); + handler_.lock()->RemoveEvent(BundleActiveReportHandler::MSG_FLUSH_TO_DISK); } } realTimeShot_ = actualRealTime; @@ -389,10 +389,6 @@ void BundleActiveCore::OnUserSwitched(const int userId) it->second->RestoreStats(true); } } - if (!handler_.expired()) { - BUNDLE_ACTIVE_LOGI("OnUserSwitched remove flush to disk event"); - handler_.lock()->RemoveEvent(BundleActiveReportHandler::MSG_FLUSH_TO_DISK); - } std::vector activatedOsAccountIds; GetAllActiveUser(activatedOsAccountIds); if (activatedOsAccountIds.size() == 0) { -- Gitee