From d75511353d1526ee3efbca83845a2992ff37ac66 Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Thu, 16 Dec 2021 17:03:56 +0000 Subject: [PATCH] Modify delete reason for Continuous Task Signed-off-by: zhaoyuan17 --- .../ans/core/include/ans_manager_interface.h | 4 +- frameworks/ans/core/src/ans_manager_proxy.cpp | 4 +- frameworks/ans/core/src/ans_manager_stub.cpp | 4 +- .../test/moduletest/ans_fw_module_test.cpp | 16 ++++---- services/ans/include/disturb_filter.h | 39 ------------------- .../ans/src/advanced_notification_service.cpp | 2 +- 6 files changed, 15 insertions(+), 54 deletions(-) delete mode 100644 services/ans/include/disturb_filter.h diff --git a/frameworks/ans/core/include/ans_manager_interface.h b/frameworks/ans/core/include/ans_manager_interface.h index fae8fdf3e..8513f4fc5 100644 --- a/frameworks/ans/core/include/ans_manager_interface.h +++ b/frameworks/ans/core/include/ans_manager_interface.h @@ -170,8 +170,8 @@ protected: CANCEL_GROUP, REMOVE_GROUP_BY_BUNDLE, SHELL_DUMP, - PUBLISH_LONG_TASK_NOTIFICATION, - CANCEL_LONG_TASK_NOTIFICATION, + PUBLISH_CONTINUOUS_TASK_NOTIFICATION, + CANCEL_CONTINUOUS_TASK_NOTIFICATION, }; }; } // namespace Notification diff --git a/frameworks/ans/core/src/ans_manager_proxy.cpp b/frameworks/ans/core/src/ans_manager_proxy.cpp index f3889d70d..cdde8d21a 100644 --- a/frameworks/ans/core/src/ans_manager_proxy.cpp +++ b/frameworks/ans/core/src/ans_manager_proxy.cpp @@ -1894,7 +1894,7 @@ ErrCode AnsManagerProxy::PublishContinuousTaskNotification(const sptr &record) override; - -private: - void GetTimeInterval(int64_t &beginDate, int64_t &endDate); -}; -} // namespace Notification -} // namespace OHOS - -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_DISTURB_FILTER_H \ No newline at end of file diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index 1af9f6629..c0995fcd1 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -1367,7 +1367,7 @@ ErrCode AdvancedNotificationService::CancelContinuousTaskNotification(const std: } } if (notification != nullptr) { - int reason = NotificationConstant::CANCEL_REASON_DELETE; + int reason = NotificationConstant::APP_CANCEL_REASON_DELETE; UpdateRecentNotification(notification, true, reason); sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyCanceled(notification, sortingMap, reason); -- Gitee