From 7df6682529c182a4147dea52b40c0de214b5b46c Mon Sep 17 00:00:00 2001 From: z00454238 Date: Wed, 4 Jun 2025 17:18:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E4=BE=8B=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20Signed-off-by:=20z00454238=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frameworks/ans/src/notification_slot.cpp | 6 ------ frameworks/ans/test/unittest/notification_test.cpp | 2 +- services/ans/src/enable_manager/enable_manager.cpp | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frameworks/ans/src/notification_slot.cpp b/frameworks/ans/src/notification_slot.cpp index 59385e761..07497aca9 100644 --- a/frameworks/ans/src/notification_slot.cpp +++ b/frameworks/ans/src/notification_slot.cpp @@ -156,9 +156,6 @@ void NotificationSlot::SetType(NotificationConstant::SlotType type) SetName("CONTENT_INFORMATION"); SetLockscreenVisibleness(NotificationConstant::VisiblenessType::SECRET); SetEnableVibration(false); -#ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER - SetSound(DEFAULT_NOTIFICATION_SOUND); -#endif SetLevel(LEVEL_MIN); break; case NotificationConstant::SlotType::LIVE_VIEW: @@ -191,9 +188,6 @@ void NotificationSlot::SetType(NotificationConstant::SlotType type) SetName("OTHER"); SetLockscreenVisibleness(NotificationConstant::VisiblenessType::SECRET); SetEnableVibration(false); -#ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER - SetSound(DEFAULT_NOTIFICATION_SOUND); -#endif SetLevel(LEVEL_MIN); break; default: diff --git a/frameworks/ans/test/unittest/notification_test.cpp b/frameworks/ans/test/unittest/notification_test.cpp index efd6ae753..7d8af190e 100644 --- a/frameworks/ans/test/unittest/notification_test.cpp +++ b/frameworks/ans/test/unittest/notification_test.cpp @@ -324,7 +324,7 @@ HWTEST_F(NotificationTest, Dump_00001, Function | SmallTest | Level1) "notificationBundleOption = null, agentBundle = null, creatorUserId = -1, ownerUserId = -1, " "receiverUserId = -1, updateDeadLine = 0, finishDeadLine = 0, sound = , distributed = 0: " "flag: 0, unifiedGroupInfo_ = null }, postTime = 0, " - "sound = nullptr, vibrationStyle = [], updateTimer = 0, finishTimer = 0, archiveTimer = 0 }"; + "sound = nullptr, vibrationStyle = [], updateTimer = 0, finishTimer = 0, archiveTimer = 0, isPrivileged = false }"; EXPECT_EQ(rrc->Dump(), ret); } diff --git a/services/ans/src/enable_manager/enable_manager.cpp b/services/ans/src/enable_manager/enable_manager.cpp index 7a5aa7677..d33db2748 100644 --- a/services/ans/src/enable_manager/enable_manager.cpp +++ b/services/ans/src/enable_manager/enable_manager.cpp @@ -148,6 +148,9 @@ ErrCode AdvancedNotificationService::CommonRequestEnableNotification(const std:: NotificationAnalyticsUtil::ReportModifyEvent(message); return ERR_ANS_NOT_ALLOWED; #ifdef ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER + } else { + ANS_LOGI("duplicated popped."); + message.Append(" duplicated popped."); } #endif } -- Gitee