From adf04073eda542f3c20ae6a826cd0b421e030fb5 Mon Sep 17 00:00:00 2001 From: fengyang Date: Mon, 16 Jun 2025 16:27:50 +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_core.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/common/src/bundle_active_core.cpp b/services/common/src/bundle_active_core.cpp index e31432e..c1fb547 100644 --- a/services/common/src/bundle_active_core.cpp +++ b/services/common/src/bundle_active_core.cpp @@ -29,6 +29,7 @@ #include "hisysevent.h" #include "bundle_active_report_controller.h" #include "bundle_active_event_reporter.h" +#include "os_account_constants.h" namespace OHOS { namespace DeviceUsageStats { @@ -549,7 +550,7 @@ void BundleActiveCore::OnUserRemoved(const int32_t userId) { BUNDLE_ACTIVE_LOGD("OnUserRemoved called"); std::lock_guard lock(mutex_); - if (MIN_USER_ID > userId || userId > INT32_MAX) { + if (MIN_USER_ID > userId || userId > AccountSA::Constants::MAX_USER_ID) { return; } auto it = userStatServices_.find(userId); -- Gitee