From 511bb433ea5fa95b709a3eecd230b89bc103dba3 Mon Sep 17 00:00:00 2001 From: fengyang Date: Mon, 23 Jun 2025 20:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0RSS=20report=20Event=20?= =?UTF-8?q?=E6=9D=83=E9=99=90?= 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/common/src/bundle_active_service.cpp b/services/common/src/bundle_active_service.cpp index 134ffb4..60a9e3f 100644 --- a/services/common/src/bundle_active_service.cpp +++ b/services/common/src/bundle_active_service.cpp @@ -44,7 +44,8 @@ static const int32_t PERIOD_BEST_JS = 0; static const int32_t PERIOD_YEARLY_JS = 4; static const int32_t PERIOD_BEST_SERVICE = 4; static const int32_t DELAY_TIME = 2000 * 1000; -static const std::string PERMITTED_PROCESS_NAME = "foundation"; +static const std::string PERMITTED_PROCESS_NAME_FOUNDATION = "foundation"; +static const std::string PERMITTED_PROCESS_NAME_RSS = "resource_schedule_service"; static const int32_t MAXNUM_UP_LIMIT = 1000; const int32_t EVENTS_PARAM = 5; static constexpr int32_t NO_DUMP_PARAM_NUMS = 0; @@ -248,7 +249,8 @@ ErrCode BundleActiveService::ReportEvent(const BundleActiveEvent& event, int32_t int32_t callingUid = OHOS::IPCSkeleton::GetCallingUid(); BUNDLE_ACTIVE_LOGD("calling process name is %{public}s, uid is %{public}d", callingTokenInfo.processName.c_str(), callingUid); - if (callingTokenInfo.processName != PERMITTED_PROCESS_NAME) { + if (callingTokenInfo.processName != PERMITTED_PROCESS_NAME_FOUNDATION && + callingTokenInfo.processName != PERMITTED_PROCESS_NAME_RSS) { BUNDLE_ACTIVE_LOGE("token does not belong to fms service process, return"); return ERR_PERMISSION_DENIED; } -- Gitee