From d4e3c3614f68de9e04dbd1d368bb6b98cb83e312 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 c6d89c5e0..0277e7767 100644 --- a/frameworks/ans/src/notification_helper.cpp +++ b/frameworks/ans/src/notification_helper.cpp @@ -638,7 +638,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 485929286..e3901d9da 100644 --- a/frameworks/core/include/ans_manager_interface.h +++ b/frameworks/core/include/ans_manager_interface.h @@ -975,7 +975,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 9b658694c..f5f192474 100644 --- a/frameworks/core/include/ans_manager_proxy.h +++ b/frameworks/core/include/ans_manager_proxy.h @@ -955,7 +955,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 21a4745b3..06e8942c7 100644 --- a/frameworks/core/include/ans_manager_stub.h +++ b/frameworks/core/include/ans_manager_stub.h @@ -965,7 +965,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 d942f13cf..45d3b3031 100644 --- a/frameworks/core/include/ans_notification.h +++ b/frameworks/core/include/ans_notification.h @@ -1203,7 +1203,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 d41c42388..34f0ecde6 100644 --- a/frameworks/core/src/ans_notification.cpp +++ b/frameworks/core/src/ans_notification.cpp @@ -1975,7 +1975,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 7331d9062..94639ac96 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 886be6d9b..d77d2a489 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 @@ -584,7 +584,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 272dd3a1d..0ba6ff992 100644 --- a/interfaces/inner_api/notification_helper.h +++ b/interfaces/inner_api/notification_helper.h @@ -1187,7 +1187,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 3167f6f2d..6ca64b800 100644 --- a/services/ans/src/ans_manager_stub_invalid.cpp +++ b/services/ans/src/ans_manager_stub_invalid.cpp @@ -678,7 +678,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