From af3eec0da3617be8c81887c64035800c560b85da Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 14 May 2025 10:23:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B3=A8=E9=94=80=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- frameworks/core/common/include/ans_convert_enum.h | 1 + frameworks/core/common/src/ans_convert_enum.cpp | 3 +++ interfaces/inner_api/notification_constant.h | 5 +++++ .../ans/include/advanced_notification_service.h | 3 ++- services/ans/include/interface_system_event.h | 1 + .../src/advanced_notification_publish_service.cpp | 2 +- .../ans/src/advanced_notification_service.cpp | 9 ++++++--- services/ans/src/advanced_notification_utils.cpp | 15 ++++++++++++++- services/ans/src/system_event_observer.cpp | 10 ++++++++++ 9 files changed, 43 insertions(+), 6 deletions(-) diff --git a/frameworks/core/common/include/ans_convert_enum.h b/frameworks/core/common/include/ans_convert_enum.h index 893711752..8272a34ae 100644 --- a/frameworks/core/common/include/ans_convert_enum.h +++ b/frameworks/core/common/include/ans_convert_enum.h @@ -87,6 +87,7 @@ enum class RemoveReason { RECOVER_LIVE_VIEW_DELETE = 30, DISABLE_NOTIFICATION_FEATURE_REASON_DELETE = 31, DISTRIBUTED_COLLABORATIVE_DELETE = 32, + USER_CANCELED_REASON_DELETE = 33, APP_CANCEL_REASON_OTHER = 100, }; diff --git a/frameworks/core/common/src/ans_convert_enum.cpp b/frameworks/core/common/src/ans_convert_enum.cpp index d50f08bf9..0db2a922d 100644 --- a/frameworks/core/common/src/ans_convert_enum.cpp +++ b/frameworks/core/common/src/ans_convert_enum.cpp @@ -282,6 +282,9 @@ bool AnsEnumUtil::ReasonCToJS(const int &inType, int &outType) case NotificationConstant::FLOW_CONTROL_REASON_DELETE: outType = static_cast(RemoveReason::FLOW_CONTROL_REASON_DELETE); break; + case NotificationConstant::USER_CANCELED_REASON_DELETE: + outType = static_cast(RemoveReason::USER_CANCELED_REASON_DELETE); + break; default: ReasonCToJSExt(inType, outType); break; diff --git a/interfaces/inner_api/notification_constant.h b/interfaces/inner_api/notification_constant.h index 8e6bfb2de..fded04330 100644 --- a/interfaces/inner_api/notification_constant.h +++ b/interfaces/inner_api/notification_constant.h @@ -307,6 +307,11 @@ public: */ static const int32_t DISTRIBUTED_COLLABORATIVE_DELETE = 32; + /** + * Indicates that a notification is deleted because this user is removed. + */ + static const int32_t USER_CANCELED_REASON_DELETE = 33; + /** * Indicates that a notification is deleted for other reasons. */ diff --git a/services/ans/include/advanced_notification_service.h b/services/ans/include/advanced_notification_service.h index 93ce0ab67..0e0226976 100644 --- a/services/ans/include/advanced_notification_service.h +++ b/services/ans/include/advanced_notification_service.h @@ -892,6 +892,7 @@ public: void OnScreenOff(); #endif void OnResourceRemove(int32_t userId); + void OnUserStopped(int32_t userId); void OnBundleDataCleared(const sptr &bundleOption); /** @@ -1344,7 +1345,7 @@ private: ErrCode RemoveFromNotificationList(const std::string &key, sptr ¬ification, bool isCancel, int32_t removeReason); ErrCode RemoveFromNotificationListForDeleteAll(const std::string &key, - const int32_t &userId, sptr ¬ification); + const int32_t &userId, sptr ¬ification, int32_t deleteReason); bool RemoveFromDelayedNotificationList(const std::string &key); std::shared_ptr GetFromNotificationList(const std::string &key); std::shared_ptr GetFromNotificationList(const int32_t ownerUid, const int32_t notificationId); diff --git a/services/ans/include/interface_system_event.h b/services/ans/include/interface_system_event.h index 71cf783da..063ca7123 100644 --- a/services/ans/include/interface_system_event.h +++ b/services/ans/include/interface_system_event.h @@ -30,6 +30,7 @@ struct ISystemEvent { std::function onScreenOff; #endif std::function onResourceRemove; + std::function OnUserStopped; std::function &)> onBundleDataCleared; std::function &)> onBundleAdd; std::function &)> onBundleUpdate; diff --git a/services/ans/src/advanced_notification_publish_service.cpp b/services/ans/src/advanced_notification_publish_service.cpp index 63624547c..9ec02434f 100644 --- a/services/ans/src/advanced_notification_publish_service.cpp +++ b/services/ans/src/advanced_notification_publish_service.cpp @@ -885,7 +885,7 @@ ErrCode AdvancedNotificationService::DeleteAll() #endif sptr notification = nullptr; - result = RemoveFromNotificationListForDeleteAll(key, activeUserId, notification); + result = RemoveFromNotificationListForDeleteAll(key, activeUserId, notification, reason); if ((result != ERR_OK) || (notification == nullptr)) { continue; } diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index 2c25b77a0..e05fea8a2 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -336,6 +336,7 @@ AdvancedNotificationService::AdvancedNotificationService() std::bind(&AdvancedNotificationService::OnScreenOff, this), #endif std::bind(&AdvancedNotificationService::OnResourceRemove, this, std::placeholders::_1), + std::bind(&AdvancedNotificationService::OnUserStopped, this, std::placeholders::_1), std::bind(&AdvancedNotificationService::OnBundleDataCleared, this, std::placeholders::_1), std::bind(&AdvancedNotificationService::OnBundleDataAdd, this, std::placeholders::_1), std::bind(&AdvancedNotificationService::OnBundleDataUpdate, this, std::placeholders::_1), @@ -1476,15 +1477,17 @@ ErrCode AdvancedNotificationService::RemoveFromNotificationList( } ErrCode AdvancedNotificationService::RemoveFromNotificationListForDeleteAll( - const std::string &key, const int32_t &userId, sptr ¬ification) + const std::string &key, const int32_t &userId, sptr ¬ification, int32_t deleteReason) { for (auto record : notificationList_) { if ((record->notification->GetKey() == key) && (record->notification->GetUserId() == userId)) { - if (!record->notification->IsRemoveAllowed()) { + if (!record->notification->IsRemoveAllowed() && + deleteReason != NotificationConstant::USER_CANCELED_REASON_DELETE) { return ERR_ANS_NOTIFICATION_IS_UNALLOWED_REMOVEALLOWED; } - if (record->request->IsUnremovable()) { + if (record->request->IsUnremovable() && + deleteReason != NotificationConstant::USER_CANCELED_REASON_DELETE) { return ERR_ANS_NOTIFICATION_IS_UNREMOVABLE; } diff --git a/services/ans/src/advanced_notification_utils.cpp b/services/ans/src/advanced_notification_utils.cpp index ce5c3d913..97d59ccda 100644 --- a/services/ans/src/advanced_notification_utils.cpp +++ b/services/ans/src/advanced_notification_utils.cpp @@ -1442,6 +1442,19 @@ void AdvancedNotificationService::OnUserRemoved(const int32_t &userId) DeleteAllByUserInner(userId, NotificationConstant::USER_REMOVED_REASON_DELETE, true); } +void AdvancedNotificationService::OnUserStopped(int32_t userId) +{ + bool isSubsystem = AccessTokenHelper::VerifyNativeToken(IPCSkeleton::GetCallingTokenID()); + if (!isSubsystem && !AccessTokenHelper::IsSystemApp()) { + std::string message = "not system app."; + OHOS::Notification::HaMetaMessage haMetaMessage = HaMetaMessage(6, 11) + .ErrorCode(ERR_ANS_NON_SYSTEM_APP); + ReportDeleteFailedEventPush(haMetaMessage, NotificationConstant::USER_REMOVED_REASON_DELETE, message); + ANS_LOGE("%{public}s", message.c_str()); + } + DeleteAllByUserInner(userId, NotificationConstant::USER_CANCELED_REASON_DELETE, true); +} + ErrCode AdvancedNotificationService::DeleteAllByUser(int32_t userId) { bool isSubsystem = AccessTokenHelper::VerifyNativeToken(IPCSkeleton::GetCallingTokenID()); @@ -1493,7 +1506,7 @@ ErrCode AdvancedNotificationService::DeleteAllByUserInner(const int32_t &userId, #endif sptr notification = nullptr; - *result = RemoveFromNotificationListForDeleteAll(key, userId, notification); + *result = RemoveFromNotificationListForDeleteAll(key, userId, notification, deleteReason); if ((*result != ERR_OK) || (notification == nullptr)) { continue; } diff --git a/services/ans/src/system_event_observer.cpp b/services/ans/src/system_event_observer.cpp index 7c03a469a..db7602425 100644 --- a/services/ans/src/system_event_observer.cpp +++ b/services/ans/src/system_event_observer.cpp @@ -40,6 +40,7 @@ SystemEventObserver::SystemEventObserver(const ISystemEvent &callbacks) : callba #endif matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_USER_SWITCHED); matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_USER_REMOVED); + matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_USER_STOPPED); matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_DATA_CLEARED); matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_ADDED); matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED); @@ -133,6 +134,15 @@ void SystemEventObserver::OnReceiveEvent(const EventFwk::CommonEventData &data) if (callbacks_.onResourceRemove != nullptr) { callbacks_.onResourceRemove(userId); } + } else if (action == EventFwk::CommonEventSupport::COMMON_EVENT_USER_STOPPED) { + int32_t userId = data.GetCode(); + if (userId <= SUBSCRIBE_USER_INIT) { + ANS_LOGE("Illegal userId, userId[%{public}d].", userId); + return; + } + if (callbacks_.OnUserStopped != nullptr) { + callbacks_.OnUserStopped(userId); + } } else if (action == EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_DATA_CLEARED) { if (callbacks_.onBundleDataCleared != nullptr) { sptr bundleOption = GetBundleOptionDataCleared(want); -- Gitee From 6f33ed64e0a0acad47dbffe701b57d47a824d2d3 Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 14 May 2025 15:47:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B3=A8=E9=94=80=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- .../core/common/include/ans_convert_enum.h | 2 +- .../core/common/src/ans_convert_enum.cpp | 4 +-- interfaces/inner_api/notification_constant.h | 2 +- .../include/advanced_notification_service.h | 4 +-- .../advanced_notification_publish_service.cpp | 2 +- .../ans/src/advanced_notification_service.cpp | 2 +- .../ans/src/advanced_notification_utils.cpp | 14 +++-------- .../advanced_notification_service_test.cpp | 25 +++++++++++++++++++ 8 files changed, 36 insertions(+), 19 deletions(-) diff --git a/frameworks/core/common/include/ans_convert_enum.h b/frameworks/core/common/include/ans_convert_enum.h index 8272a34ae..eb1a5961a 100644 --- a/frameworks/core/common/include/ans_convert_enum.h +++ b/frameworks/core/common/include/ans_convert_enum.h @@ -87,7 +87,7 @@ enum class RemoveReason { RECOVER_LIVE_VIEW_DELETE = 30, DISABLE_NOTIFICATION_FEATURE_REASON_DELETE = 31, DISTRIBUTED_COLLABORATIVE_DELETE = 32, - USER_CANCELED_REASON_DELETE = 33, + USER_LOGOUT_REASON_DELETE = 33, APP_CANCEL_REASON_OTHER = 100, }; diff --git a/frameworks/core/common/src/ans_convert_enum.cpp b/frameworks/core/common/src/ans_convert_enum.cpp index 0db2a922d..8bde20522 100644 --- a/frameworks/core/common/src/ans_convert_enum.cpp +++ b/frameworks/core/common/src/ans_convert_enum.cpp @@ -282,8 +282,8 @@ bool AnsEnumUtil::ReasonCToJS(const int &inType, int &outType) case NotificationConstant::FLOW_CONTROL_REASON_DELETE: outType = static_cast(RemoveReason::FLOW_CONTROL_REASON_DELETE); break; - case NotificationConstant::USER_CANCELED_REASON_DELETE: - outType = static_cast(RemoveReason::USER_CANCELED_REASON_DELETE); + case NotificationConstant::USER_LOGOUT_REASON_DELETE: + outType = static_cast(RemoveReason::USER_LOGOUT_REASON_DELETE); break; default: ReasonCToJSExt(inType, outType); diff --git a/interfaces/inner_api/notification_constant.h b/interfaces/inner_api/notification_constant.h index fded04330..909b908e4 100644 --- a/interfaces/inner_api/notification_constant.h +++ b/interfaces/inner_api/notification_constant.h @@ -310,7 +310,7 @@ public: /** * Indicates that a notification is deleted because this user is removed. */ - static const int32_t USER_CANCELED_REASON_DELETE = 33; + static const int32_t USER_LOGOUT_REASON_DELETE = 33; /** * Indicates that a notification is deleted for other reasons. diff --git a/services/ans/include/advanced_notification_service.h b/services/ans/include/advanced_notification_service.h index 0e0226976..ac426115c 100644 --- a/services/ans/include/advanced_notification_service.h +++ b/services/ans/include/advanced_notification_service.h @@ -1345,7 +1345,7 @@ private: ErrCode RemoveFromNotificationList(const std::string &key, sptr ¬ification, bool isCancel, int32_t removeReason); ErrCode RemoveFromNotificationListForDeleteAll(const std::string &key, - const int32_t &userId, sptr ¬ification, int32_t deleteReason); + const int32_t &userId, sptr ¬ification, bool removeAll = false); bool RemoveFromDelayedNotificationList(const std::string &key); std::shared_ptr GetFromNotificationList(const std::string &key); std::shared_ptr GetFromNotificationList(const int32_t ownerUid, const int32_t notificationId); @@ -1514,7 +1514,7 @@ private: static ErrCode SetLockScreenPictureToDb(const sptr &request); static ErrCode GetLockScreenPictureFromDb(NotificationRequest *request); void RemoveDoNotDisturbProfileTrustList(const sptr &bundleOption); - ErrCode DeleteAllByUserInner(const int32_t &userId, int32_t reason, bool isAsync = false); + ErrCode DeleteAllByUserInner(const int32_t &userId, int32_t reason, bool isAsync = false, bool removeAll = false); ErrCode RemoveAllNotificationsInner(const sptr &bundleOption, int32_t reason); ErrCode AssignValidNotificationSlot(const std::shared_ptr &record, const sptr &bundleOption); diff --git a/services/ans/src/advanced_notification_publish_service.cpp b/services/ans/src/advanced_notification_publish_service.cpp index 9ec02434f..63624547c 100644 --- a/services/ans/src/advanced_notification_publish_service.cpp +++ b/services/ans/src/advanced_notification_publish_service.cpp @@ -885,7 +885,7 @@ ErrCode AdvancedNotificationService::DeleteAll() #endif sptr notification = nullptr; - result = RemoveFromNotificationListForDeleteAll(key, activeUserId, notification, reason); + result = RemoveFromNotificationListForDeleteAll(key, activeUserId, notification); if ((result != ERR_OK) || (notification == nullptr)) { continue; } diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index e05fea8a2..567cf84ae 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -1477,7 +1477,7 @@ ErrCode AdvancedNotificationService::RemoveFromNotificationList( } ErrCode AdvancedNotificationService::RemoveFromNotificationListForDeleteAll( - const std::string &key, const int32_t &userId, sptr ¬ification, int32_t deleteReason) + const std::string &key, const int32_t &userId, sptr ¬ification, bool removeAll = false) { for (auto record : notificationList_) { if ((record->notification->GetKey() == key) && diff --git a/services/ans/src/advanced_notification_utils.cpp b/services/ans/src/advanced_notification_utils.cpp index 97d59ccda..3f399025e 100644 --- a/services/ans/src/advanced_notification_utils.cpp +++ b/services/ans/src/advanced_notification_utils.cpp @@ -1444,15 +1444,7 @@ void AdvancedNotificationService::OnUserRemoved(const int32_t &userId) void AdvancedNotificationService::OnUserStopped(int32_t userId) { - bool isSubsystem = AccessTokenHelper::VerifyNativeToken(IPCSkeleton::GetCallingTokenID()); - if (!isSubsystem && !AccessTokenHelper::IsSystemApp()) { - std::string message = "not system app."; - OHOS::Notification::HaMetaMessage haMetaMessage = HaMetaMessage(6, 11) - .ErrorCode(ERR_ANS_NON_SYSTEM_APP); - ReportDeleteFailedEventPush(haMetaMessage, NotificationConstant::USER_REMOVED_REASON_DELETE, message); - ANS_LOGE("%{public}s", message.c_str()); - } - DeleteAllByUserInner(userId, NotificationConstant::USER_CANCELED_REASON_DELETE, true); + DeleteAllByUserInner(userId, NotificationConstant::USER_LOGOUT_REASON_DELETE, true, true); } ErrCode AdvancedNotificationService::DeleteAllByUser(int32_t userId) @@ -1474,7 +1466,7 @@ ErrCode AdvancedNotificationService::DeleteAllByUser(int32_t userId) } ErrCode AdvancedNotificationService::DeleteAllByUserInner(const int32_t &userId, int32_t deleteReason, - bool isAsync) + bool isAsync, bool removeAll = false) { ANS_LOGD("%{public}s", __FUNCTION__); @@ -1506,7 +1498,7 @@ ErrCode AdvancedNotificationService::DeleteAllByUserInner(const int32_t &userId, #endif sptr notification = nullptr; - *result = RemoveFromNotificationListForDeleteAll(key, userId, notification, deleteReason); + *result = RemoveFromNotificationListForDeleteAll(key, userId, notification, removeAll); if ((*result != ERR_OK) || (notification == nullptr)) { continue; } diff --git a/services/ans/test/unittest/advanced_notification_service_test.cpp b/services/ans/test/unittest/advanced_notification_service_test.cpp index 65738f8e4..82c8dcb39 100644 --- a/services/ans/test/unittest/advanced_notification_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_service_test.cpp @@ -2649,6 +2649,31 @@ HWTEST_F(AdvancedNotificationServiceTest, AdvancedNotificationServiceTest_20600, GTEST_LOG_(INFO) << "OnResourceRemove_0100 test end"; } +/** + * @tc.number : OnUserStopped_0100 + * @tc.name : OnUserStopped_0100 + * @tc.desc : Test OnUserStopped function + * @tc.require : #I61RF2 + */ +HWTEST_F(AdvancedNotificationServiceTest, OnUserStopped_0100, Function | SmallTest | Level1) +{ + GTEST_LOG_(INFO) << "OnResourceRemove_0100 test start"; + int32_t userId = 2; + sptr request = new (std::nothrow) NotificationRequest(); + request->SetCreatorUserId(userId); + sptr notification = new (std::nothrow) Notification(request); + auto record = std::make_shared(); + record->request = request; + record->notification = notification; + advancedNotificationService_->PublishInNotificationList(record); + + MockIsSystemApp(true); + advancedNotificationService_->OnUserStopped(userId); + ASSERT_EQ(advancedNotificationService_->notificationList_.size(), 0); + + GTEST_LOG_(INFO) << "OnResourceRemove_0100 test end"; +} + /** * @tc.number : AdvancedNotificationServiceTest_20700 * @tc.name : OnBundleDataCleared_0100 -- Gitee From 484081ac8cdafd7e40238f692db5f87064348b7e Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 14 May 2025 15:57:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B3=A8=E9=94=80=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- services/ans/src/advanced_notification_service.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index 567cf84ae..d8ab4119e 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -1482,12 +1482,10 @@ ErrCode AdvancedNotificationService::RemoveFromNotificationListForDeleteAll( for (auto record : notificationList_) { if ((record->notification->GetKey() == key) && (record->notification->GetUserId() == userId)) { - if (!record->notification->IsRemoveAllowed() && - deleteReason != NotificationConstant::USER_CANCELED_REASON_DELETE) { + if (!record->notification->IsRemoveAllowed() && !removeAll) { return ERR_ANS_NOTIFICATION_IS_UNALLOWED_REMOVEALLOWED; } - if (record->request->IsUnremovable() && - deleteReason != NotificationConstant::USER_CANCELED_REASON_DELETE) { + if (record->request->IsUnremovable() && !removeAll) { return ERR_ANS_NOTIFICATION_IS_UNREMOVABLE; } -- Gitee From 7372c686cfc765afe72ee6316893365d9e81350b Mon Sep 17 00:00:00 2001 From: songbao1 Date: Wed, 14 May 2025 17:05:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B3=A8=E9=94=80=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songbao1 --- services/ans/src/advanced_notification_service.cpp | 2 +- services/ans/src/advanced_notification_utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index d8ab4119e..53677f0cb 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -1477,7 +1477,7 @@ ErrCode AdvancedNotificationService::RemoveFromNotificationList( } ErrCode AdvancedNotificationService::RemoveFromNotificationListForDeleteAll( - const std::string &key, const int32_t &userId, sptr ¬ification, bool removeAll = false) + const std::string &key, const int32_t &userId, sptr ¬ification, bool removeAll) { for (auto record : notificationList_) { if ((record->notification->GetKey() == key) && diff --git a/services/ans/src/advanced_notification_utils.cpp b/services/ans/src/advanced_notification_utils.cpp index 3f399025e..5377183fc 100644 --- a/services/ans/src/advanced_notification_utils.cpp +++ b/services/ans/src/advanced_notification_utils.cpp @@ -1466,7 +1466,7 @@ ErrCode AdvancedNotificationService::DeleteAllByUser(int32_t userId) } ErrCode AdvancedNotificationService::DeleteAllByUserInner(const int32_t &userId, int32_t deleteReason, - bool isAsync, bool removeAll = false) + bool isAsync, bool removeAll) { ANS_LOGD("%{public}s", __FUNCTION__); -- Gitee