diff --git a/frameworks/ans/src/notification_helper.cpp b/frameworks/ans/src/notification_helper.cpp index 3107e6860397db32a79fcb5b237a078b37835c84..ab73a69451e96fe61bec7d8adcc221798104d60e 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 246bc67bb6261fc54d069412714ec520f3a4d565..e0d4c1986e9b66c32f1e65bf52173901d0e75d26 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 6be0277da0552aab66f63f295ac4820b7228cf14..c5b0d2c99cf0d556e95d9a822dbbdf838df601e5 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 70b79cc4919274069ddf1d38ab9c96ff4f61db83..e1b2acfacd9639d320bcd88aed6c7851030dc888 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 caf337ac828e7442ce58690b0ced668101119f75..b937411e7ad3235f8b557003ffcaebb7d5e2eab0 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 b17ef316dd1a4243d2b5def2075728a7b5620657..31968b21e47c29f3dcacfc9cc121fba392fa9741 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 6655bfa7cd69e0516070c950134609f6d1dace40..f7fa48efc0618be17dabfcbdf76a45cc5c82cee0 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 e3d742c53344fbfca29475c2c52469abf9b510ed..9090579b21e7f01e39cacfb8d4f22dd0987c36d5 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 08c951e2bfd9393ec23d3858f3d97c236da5ef9e..d0718c802adcbe3867f8815f5d88979d17ad5998 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 6bef8b386a9312bda69208b198b813c1f590f0fc..666e5064842e30fd863bad461825e2d66bc868e5 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;