diff --git a/services/common/src/bundle_active_core.cpp b/services/common/src/bundle_active_core.cpp index 65d56b81a3db6bad20aa01bd479662bf18aca839..655043c1f2ab92a3b8f2c04360e17dc5c4022e73 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) {