diff --git a/frameworks/ans/src/notification_helper.cpp b/frameworks/ans/src/notification_helper.cpp index c6d89c5e06629b62922e1a4863a5e9a72cb72c77..0277e776700f5472022092366e5160c1d8fc2ba2 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 4859292863d882fd4e62eaa66bc2b7f2de37aadf..e3901d9dab56894748c70465bba60135bcea31fb 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 9b658694ce656f70b59730a985143310ad88af45..f5f192474576d32e9668900c88ba198ab4483163 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 21a4745b3e0694845886006fe8ddb5a9d84afa7f..06e8942c72624d38225fd516512ef0a5c49b0943 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 d942f13cf040d22d4e360872495f94e262bff14b..45d3b30318a7264ba022122416d63e81f63a1275 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 d41c42388552384e5cf2378d97ccd5513dce1138..34f0ecde63eb613f8326577f637e9c5346c7eb81 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 7331d9062dd17f14a5789c3c5973fe019898f3a2..94639ac9690a2ff8950aa0a5679c6a9ee6e10ec8 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 886be6d9b93f1326937ed323b61229ee1c61462d..d77d2a489e2d785f08998692ede526474c7e26ce 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 272dd3a1dc2cc264163193b2e4cc0c0f3b2f5cd0..0ba6ff992bfe3283d5085ef5044cf6ab012e1cdc 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 3167f6f2d8ff73321aab33530468bb5de152e328..6ca64b80007975ab3b8866ae8072ddd7086a5b03 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;