From f338f6624f0ff3d91053ad5615849551b8a12aab Mon Sep 17 00:00:00 2001 From: fengyang Date: Mon, 28 Apr 2025 14:28:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fengyang --- services/common/src/bundle_active_service.cpp | 1 - services/common/src/bundle_active_usage_database.cpp | 2 +- services/packagegroup/src/bundle_active_group_controller.cpp | 1 - test/unittest/BUILD.gn | 3 +-- test/unittest/bundle_active_total_test.cpp | 2 +- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/services/common/src/bundle_active_service.cpp b/services/common/src/bundle_active_service.cpp index ac6e092..74dd4ad 100644 --- a/services/common/src/bundle_active_service.cpp +++ b/services/common/src/bundle_active_service.cpp @@ -126,7 +126,6 @@ void BundleActiveService::InitNecessaryState() void BundleActiveService::InitService() { - HiviewDFX::Watchdog::GetInstance().InitFfrtWatchdog(); if (bundleActiveCore_ == nullptr) { bundleActiveCore_ = std::make_shared(); bundleActiveCore_->Init(); diff --git a/services/common/src/bundle_active_usage_database.cpp b/services/common/src/bundle_active_usage_database.cpp index 3da0d5e..e823a93 100644 --- a/services/common/src/bundle_active_usage_database.cpp +++ b/services/common/src/bundle_active_usage_database.cpp @@ -1085,7 +1085,7 @@ void BundleActiveUsageDatabase::FlushEventInfo(uint32_t databaseType, BundleActi } int64_t eventTableTime = ParseStartTime(eventTableName_); std::vector valuesBuckets; - for (uint32_t i = 0; i < stats.events_.Size(); i++) { + for (int32_t i = 0; i < stats.events_.Size(); i++) { NativeRdb::ValuesBucket valuesBucket; valuesBucket.PutInt(BUNDLE_ACTIVE_DB_USER_ID, stats.userId_); valuesBucket.PutString(BUNDLE_ACTIVE_DB_BUNDLE_NAME, stats.events_.events_.at(i).bundleName_); diff --git a/services/packagegroup/src/bundle_active_group_controller.cpp b/services/packagegroup/src/bundle_active_group_controller.cpp index 367e8c0..068b061 100644 --- a/services/packagegroup/src/bundle_active_group_controller.cpp +++ b/services/packagegroup/src/bundle_active_group_controller.cpp @@ -210,7 +210,6 @@ void BundleActiveGroupController::CheckIdleStatsOneTime() std::make_shared(tmpGroupHandlerObj); auto handlerEvent = AppExecFwk::InnerEvent::Get( BundleActiveGroupHandler::MSG_ONE_TIME_CHECK_BUNDLE_STATE); - auto activeGroupHandler = activeGroupHandler_.lock(); if (!activeGroupHandler_.expired()) { activeGroupHandler_.lock()->SendEvent(BundleActiveGroupHandler::MSG_ONE_TIME_CHECK_BUNDLE_STATE, handlerobjToPtr); diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 8a7f852..0173aac 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -13,8 +13,7 @@ import("//build/test.gni") import("../../device_usage_statistics.gni") -module_output_path = - "device_usage_statistics/device_usage_statistics/deviceusagestatisticstest" +module_output_path = "device_usage_statistics/deviceusagestatisticstest" config("module_private_config") { visibility = [ ":*" ] diff --git a/test/unittest/bundle_active_total_test.cpp b/test/unittest/bundle_active_total_test.cpp index a1fadbf..47ffbd0 100644 --- a/test/unittest/bundle_active_total_test.cpp +++ b/test/unittest/bundle_active_total_test.cpp @@ -20,8 +20,8 @@ #include "bundle_active_power_state_callback_service.h" #include "bundle_active_service_stub.h" -#include "bundle_active_core.h" +#include "bundle_active_core.h" #include "bundle_active_continuous_task_observer.h" #include "bundle_active_bundle_mgr_helper.h" #include "bundle_active_app_state_observer.h" -- Gitee