From 034ad9e26aad1ae03d71f2333045aa0c56956f0a Mon Sep 17 00:00:00 2001 From: songbao1 Date: Fri, 27 Jun 2025 16:32:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0=E6=9D=83=E9=99=90=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- .../advanced_notification_publish.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/services/ans/src/advanced_notification_manager/advanced_notification_publish.cpp b/services/ans/src/advanced_notification_manager/advanced_notification_publish.cpp index 68e3648b9..326aa7cd2 100644 --- a/services/ans/src/advanced_notification_manager/advanced_notification_publish.cpp +++ b/services/ans/src/advanced_notification_manager/advanced_notification_publish.cpp @@ -398,11 +398,15 @@ ErrCode AdvancedNotificationService::CheckNotificationRequest(const sptrGetRemovalWantAgent(); const auto isLocalWantAgent = (wantAgent != nullptr && wantAgent->IsLocal()) || (removalWantAgent != nullptr && removalWantAgent->IsLocal()); - bool isSpecifiedAccess = (isSystemApp || isSubsystem) && isAgentController; - if (isLocalWantAgent && !isSpecifiedAccess) { - ANSR_LOGE("Local wantAgent does not support non system app"); + if (isLocalWantAgent && !(isSystemApp || isSubsystem)) { + ANS_LOGE("Local wantAgent does not support non system app"); return ERR_ANS_NON_SYSTEM_APP; } + + if (isLocalWantAgent && !isAgentController) { + ANS_LOGE("Local wantAgent does not support permission denied"); + return ERR_ANS_PERMISSION_DENIED; + } return ERR_OK; } -- Gitee From 88628e8905ec8a53cdde5923b3fca07a26442f7b Mon Sep 17 00:00:00 2001 From: songbao1 Date: Sat, 28 Jun 2025 09:08:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0=E6=9D=83=E9=99=90=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- tools/dump/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dump/BUILD.gn b/tools/dump/BUILD.gn index b0e46a0e0..2c8b22c4a 100644 --- a/tools/dump/BUILD.gn +++ b/tools/dump/BUILD.gn @@ -71,7 +71,7 @@ ohos_executable("anm") { install_enable = false if (build_variant == "root") { - install_enable = false + install_enable = true } part_name = "${component_name}" -- Gitee