From b867f3ba4f4bf6507ec80a6c80032b3f77769628 Mon Sep 17 00:00:00 2001 From: z00454238 Date: Sat, 21 Jun 2025 15:57:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=89=B9=E6=AE=8A=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=85=A8=E5=9C=BA=E6=99=AF=E5=8D=8F=E5=90=8C=20?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9=20Signed-off-by:=20z004542?= =?UTF-8?q?38=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frameworks/js/napi/src/common_convert_content.cpp | 1 + services/ans/src/notification_extension_wrapper.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frameworks/js/napi/src/common_convert_content.cpp b/frameworks/js/napi/src/common_convert_content.cpp index e77e49c6f..8f2a02008 100644 --- a/frameworks/js/napi/src/common_convert_content.cpp +++ b/frameworks/js/napi/src/common_convert_content.cpp @@ -335,6 +335,7 @@ napi_value Common::SetNotificationMultiLineContent( if (lineWantAgents.size() > 0) { napi_value lineWantAgentsArr = nullptr; int lineWantAgentCount = 0; + napi_create_array(env, &lineWantAgentsArr); for (auto item: lineWantAgents) { value = CreateWantAgentByJS(env, item); napi_set_element(env, lineWantAgentsArr, lineWantAgentCount++, value); diff --git a/services/ans/src/notification_extension_wrapper.cpp b/services/ans/src/notification_extension_wrapper.cpp index 90d9c7604..ba3dac82d 100644 --- a/services/ans/src/notification_extension_wrapper.cpp +++ b/services/ans/src/notification_extension_wrapper.cpp @@ -239,13 +239,13 @@ int32_t ExtensionWrapper::BannerControl(const std::string &bundleName) } #ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER -void ExtensionWrapper::IsPrivilegeMessage(const sptr &request) +bool ExtensionWrapper::IsPrivilegeMessage(const sptr &request) { if (isPrivilegeMessage_ == nullptr) { ANS_LOGE("IsPrivilegeMessage wrapper symbol failed"); - return; + return false; } - return isPrivilegeMessage_(bundleOption, request, isAgentController); + return isPrivilegeMessage_(request); } void ExtensionWrapper::HandlePrivilegeMessage(const sptr& bundleOption, -- Gitee