diff --git a/frameworks/ans/src/notification_slot.cpp b/frameworks/ans/src/notification_slot.cpp index 59385e7617cd89c4d33cb3698ad42ac44ed44464..07497aca95b05677e3436089a9532973287ff620 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 efd6ae7537ebc49196ea87f279a6fd113dbe494e..7d8af190eac2de208d8eb1d79025c9d10e4d02f6 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 7a5aa7677cb66d83c3746c01fbd38895031a36ec..d33db27488ab02f27eb153b905286f39263ec632 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 }