From 9657ba36f704f4f4a712e594d3f0c98577472834 Mon Sep 17 00:00:00 2001 From: markYao Date: Wed, 9 Apr 2025 10:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=93=9D=E9=BB=84=E5=90=8C=E6=AD=A5=EF=BC=8CGe?= =?UTF-8?q?tDoNotDisturbProfile=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: markYao --- frameworks/ans/src/notification_helper.cpp | 2 +- frameworks/core/include/ans_manager_interface.h | 2 +- frameworks/core/include/ans_manager_proxy.h | 2 +- frameworks/core/include/ans_manager_stub.h | 2 +- frameworks/core/include/ans_notification.h | 2 +- frameworks/core/src/ans_notification.cpp | 2 +- frameworks/core/src/manager/ans_manager_proxy_disturb.cpp | 4 ++-- frameworks/core/src/manager/ans_manager_stub_invalid.cpp | 2 +- .../ans_notification_branch_test.cpp | 2 +- interfaces/inner_api/notification_helper.h | 2 +- services/ans/src/ans_manager_stub_invalid.cpp | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frameworks/ans/src/notification_helper.cpp b/frameworks/ans/src/notification_helper.cpp index 3107e6860..ab73a6945 100644 --- a/frameworks/ans/src/notification_helper.cpp +++ b/frameworks/ans/src/notification_helper.cpp @@ -626,7 +626,7 @@ ErrCode NotificationHelper::RegisterSwingCallback(const std::function &profile) +ErrCode NotificationHelper::GetDoNotDisturbProfile(int64_t id, sptr &profile) { return DelayedSingleton::GetInstance()->GetDoNotDisturbProfile(id, profile); } diff --git a/frameworks/core/include/ans_manager_interface.h b/frameworks/core/include/ans_manager_interface.h index 246bc67bb..e0d4c1986 100644 --- a/frameworks/core/include/ans_manager_interface.h +++ b/frameworks/core/include/ans_manager_interface.h @@ -974,7 +974,7 @@ public: * @param status Indicates the NotificationDoNotDisturbProfile objects. * @return Returns ERR_OK on success, others on failure. */ - virtual ErrCode GetDoNotDisturbProfile(int32_t id, sptr &profile) = 0; + virtual ErrCode GetDoNotDisturbProfile(int64_t id, sptr &profile) = 0; /** * @brief Whether reminders are allowed. diff --git a/frameworks/core/include/ans_manager_proxy.h b/frameworks/core/include/ans_manager_proxy.h index 6be0277da..c5b0d2c99 100644 --- a/frameworks/core/include/ans_manager_proxy.h +++ b/frameworks/core/include/ans_manager_proxy.h @@ -954,7 +954,7 @@ public: * @param status Indicates the NotificationDoNotDisturbProfile objects. * @return Returns ERR_OK on success, others on failure. */ - ErrCode GetDoNotDisturbProfile(int32_t id, sptr &profile) override; + ErrCode GetDoNotDisturbProfile(int64_t id, sptr &profile) override; /** * @brief Whether reminders are allowed. diff --git a/frameworks/core/include/ans_manager_stub.h b/frameworks/core/include/ans_manager_stub.h index 70b79cc49..e1b2acfac 100644 --- a/frameworks/core/include/ans_manager_stub.h +++ b/frameworks/core/include/ans_manager_stub.h @@ -964,7 +964,7 @@ public: * @param status Indicates the NotificationDoNotDisturbProfile object. * @return Returns ERR_OK on success, others on failure. */ - virtual ErrCode GetDoNotDisturbProfile(int32_t id, sptr &profile) override; + virtual ErrCode GetDoNotDisturbProfile(int64_t id, sptr &profile) override; /** * @brief Whether reminders are allowed. diff --git a/frameworks/core/include/ans_notification.h b/frameworks/core/include/ans_notification.h index caf337ac8..b937411e7 100644 --- a/frameworks/core/include/ans_notification.h +++ b/frameworks/core/include/ans_notification.h @@ -1198,7 +1198,7 @@ public: * @param status Indicates the NotificationDoNotDisturbProfile objects. * @return Returns ERR_OK on success, others on failure. */ - ErrCode GetDoNotDisturbProfile(int32_t id, sptr &profile); + ErrCode GetDoNotDisturbProfile(int64_t id, sptr &profile); /** * @brief Get the status of the target device. diff --git a/frameworks/core/src/ans_notification.cpp b/frameworks/core/src/ans_notification.cpp index b17ef316d..31968b21e 100644 --- a/frameworks/core/src/ans_notification.cpp +++ b/frameworks/core/src/ans_notification.cpp @@ -1979,7 +1979,7 @@ bool AnsNotification::IsValidDelayTime(const NotificationRequest &request) cons return request.GetPublishDelayTime() <= MAX_PUBLISH_DELAY_TIME; } -ErrCode AnsNotification::GetDoNotDisturbProfile(int32_t id, sptr &profile) +ErrCode AnsNotification::GetDoNotDisturbProfile(int64_t id, sptr &profile) { sptr proxy = GetAnsManagerProxy(); if (!proxy) { diff --git a/frameworks/core/src/manager/ans_manager_proxy_disturb.cpp b/frameworks/core/src/manager/ans_manager_proxy_disturb.cpp index 6655bfa7c..f7fa48efc 100644 --- a/frameworks/core/src/manager/ans_manager_proxy_disturb.cpp +++ b/frameworks/core/src/manager/ans_manager_proxy_disturb.cpp @@ -300,7 +300,7 @@ ErrCode AnsManagerProxy::IsNeedSilentInDoNotDisturbMode(const std::string &phone return result; } -ErrCode AnsManagerProxy::GetDoNotDisturbProfile(int32_t id, sptr &profile) +ErrCode AnsManagerProxy::GetDoNotDisturbProfile(int64_t id, sptr &profile) { MessageParcel data; if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) { @@ -308,7 +308,7 @@ ErrCode AnsManagerProxy::GetDoNotDisturbProfile(int32_t id, sptr &profile) +ErrCode AnsManagerStub::GetDoNotDisturbProfile(int64_t id, sptr &profile) { ANS_LOGE("GetDoNotDisturbProfile called!"); return ERR_INVALID_OPERATION; diff --git a/frameworks/core/test/unittest/ans_notification_branch_test/ans_notification_branch_test.cpp b/frameworks/core/test/unittest/ans_notification_branch_test/ans_notification_branch_test.cpp index e3d742c53..9090579b2 100644 --- a/frameworks/core/test/unittest/ans_notification_branch_test/ans_notification_branch_test.cpp +++ b/frameworks/core/test/unittest/ans_notification_branch_test/ans_notification_branch_test.cpp @@ -583,7 +583,7 @@ public: return ERR_ANS_INVALID_PARAM; } - ErrCode GetDoNotDisturbProfile(int32_t id, sptr &profile) + ErrCode GetDoNotDisturbProfile(int64_t id, sptr &profile) { return ERR_ANS_INVALID_PARAM; } diff --git a/interfaces/inner_api/notification_helper.h b/interfaces/inner_api/notification_helper.h index 08c951e2b..d0718c802 100644 --- a/interfaces/inner_api/notification_helper.h +++ b/interfaces/inner_api/notification_helper.h @@ -1182,7 +1182,7 @@ public: * @param status Indicates the NotificationDoNotDisturbProfile objects. * @return Returns ERR_OK on success, others on failure. */ - static ErrCode GetDoNotDisturbProfile(int32_t id, sptr &profile); + static ErrCode GetDoNotDisturbProfile(int64_t id, sptr &profile); /** * @brief Update Notification Timer by uid diff --git a/services/ans/src/ans_manager_stub_invalid.cpp b/services/ans/src/ans_manager_stub_invalid.cpp index 6bef8b386..666e50648 100644 --- a/services/ans/src/ans_manager_stub_invalid.cpp +++ b/services/ans/src/ans_manager_stub_invalid.cpp @@ -677,7 +677,7 @@ ErrCode AnsManagerStub::SetTargetDeviceStatus(const std::string &deviceType, con return ERR_INVALID_OPERATION; } -ErrCode AnsManagerStub::GetDoNotDisturbProfile(int32_t id, sptr &profile) +ErrCode AnsManagerStub::GetDoNotDisturbProfile(int64_t id, sptr &profile) { ANS_LOGE("GetDoNotDisturbProfile called!"); return ERR_INVALID_OPERATION; -- Gitee