From 8abf4e949feaa078c1eea5958d1007e267cd00f7 Mon Sep 17 00:00:00 2001 From: zhengzhuolan Date: Tue, 4 Mar 2025 18:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E9=80=9A=E7=9F=A5=E5=AD=90?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhengzhuolan --- frameworks/ans/BUILD.gn | 82 ++++++++++++++++++- .../IAnsDialogCallback.idl} | 28 ++----- frameworks/ans/src/ans_dialog_host_client.cpp | 9 +- .../core/include/ans_dialog_callback_proxy.h | 38 --------- .../core/include/ans_manager_interface.h | 8 +- frameworks/core/include/ans_manager_proxy.h | 6 +- frameworks/core/include/ans_manager_stub.h | 6 +- ...lback_interface.h => dialog_status_data.h} | 27 +----- ...k_interface.cpp => dialog_status_data.cpp} | 4 +- .../listener/ans_dialog_callback_proxy.cpp | 47 ----------- .../src/listener/ans_dialog_callback_stub.cpp | 38 --------- .../src/manager/ans_manager_proxy_bundle.cpp | 6 +- .../src/manager/ans_manager_stub_invalid.cpp | 6 +- .../ans_notification_branch_test.cpp | 8 +- .../js/napi/src/js_ans_dialog_callback.cpp | 4 +- frameworks/reminder/BUILD.gn | 7 +- .../ans_dialog_callback_native_interface.h | 4 +- .../kits/native/ans_dialog_host_client.h | 4 +- .../include/advanced_notification_service.h | 8 +- .../ans/include/notification_dialog_manager.h | 13 +-- .../advanced_notification_publish_service.cpp | 8 +- services/ans/src/ans_manager_stub.cpp | 6 +- services/ans/src/ans_manager_stub_invalid.cpp | 6 +- .../ans/src/notification_dialog_manager.cpp | 8 +- ...nced_notification_publish_service_test.cpp | 4 +- .../advanced_notification_service_test.cpp | 4 +- .../test/unittest/ans_manager_stub_test.cpp | 4 +- .../advancednotificationservice_fuzzer.cpp | 4 +- .../ansmanagerstub_fuzzer.cpp | 4 +- .../ansmanagerstubannex_fuzzer.cpp | 4 +- .../ansmanagerstubannexthree_fuzzer.cpp | 4 +- 31 files changed, 164 insertions(+), 245 deletions(-) rename frameworks/{core/include/ans_dialog_callback_stub.h => ans/IAnsDialogCallback.idl} (44%) delete mode 100644 frameworks/core/include/ans_dialog_callback_proxy.h rename frameworks/core/include/{ans_dialog_callback_interface.h => dialog_status_data.h} (63%) rename frameworks/core/src/{listener/ans_dialog_callback_interface.cpp => dialog_status_data.cpp} (92%) delete mode 100644 frameworks/core/src/listener/ans_dialog_callback_proxy.cpp delete mode 100644 frameworks/core/src/listener/ans_dialog_callback_stub.cpp diff --git a/frameworks/ans/BUILD.gn b/frameworks/ans/BUILD.gn index 822e942a1..f16c5d553 100644 --- a/frameworks/ans/BUILD.gn +++ b/frameworks/ans/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2024 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -12,8 +12,17 @@ # limitations under the License. import("//base/notification/distributed_notification_service/notification.gni") +import("//build/config/components/idl_tool/idl.gni") import("//build/ohos.gni") +idl_gen_interface("ans_dialog_callback_interface") { + src_idl = rebase_path("IAnsDialogCallback.idl") + log_domainid = "0xD001203" + log_tag = "Ans" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" +} + group("ans_client") { deps = [ ":ans_innerkits" ] } @@ -27,6 +36,20 @@ config("ans_innerkits_public_config") { "${core_path}/common/include", "${core_path}/include", "//third_party/json/single_include", + "${target_gen_dir}", + ] + configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] +} + +config("ans_innerkits_config") { + visibility = [ "./../../*" ] + + include_dirs = [ + "${inner_api_path}", + "${interfaces_path}/kits/native", + "${core_path}/common/include", + "${core_path}/include", + "${target_gen_dir}", ] configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] } @@ -48,9 +71,7 @@ ohos_shared_library("ans_innerkits") { "${core_path}/common/src/ans_convert_enum.cpp", "${core_path}/src/ans_image_util.cpp", "${core_path}/src/ans_notification.cpp", - "${core_path}/src/listener/ans_dialog_callback_interface.cpp", - "${core_path}/src/listener/ans_dialog_callback_proxy.cpp", - "${core_path}/src/listener/ans_dialog_callback_stub.cpp", + "${core_path}/src/dialog_status_data.cpp", "${core_path}/src/listener/ans_subscriber_listener.cpp", "${core_path}/src/listener/ans_subscriber_local_live_view_proxy.cpp", "${core_path}/src/listener/ans_subscriber_local_live_view_stub.cpp", @@ -117,6 +138,11 @@ ohos_shared_library("ans_innerkits") { defines = [] + deps = [ + ":ans_dialog_callback_proxy", + ":ans_dialog_callback_stub", + ] + external_deps = [ "ability_base:want", "ability_base:zuri", @@ -159,3 +185,51 @@ ohos_shared_library("ans_innerkits") { subsystem_name = "${subsystem_name}" part_name = "${component_name}" } + +ohos_source_set("ans_dialog_callback_proxy") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + public_configs = [ ":ans_innerkits_config" ] + output_values = get_target_outputs(":ans_dialog_callback_interface") + sources = filter_include(output_values, [ "*_proxy.cpp" ]) + deps = [ ":ans_dialog_callback_interface" ] + external_deps = [ + "ability_base:want", + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_core", + "samgr:samgr_proxy", + ] + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" +} + +ohos_source_set("ans_dialog_callback_stub") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + public_configs = [ ":ans_innerkits_config" ] + output_values = get_target_outputs(":ans_dialog_callback_interface") + sources = filter_include(output_values, [ "*_stub.cpp" ]) + deps = [ ":ans_dialog_callback_interface" ] + external_deps = [ + "ability_base:want", + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_core", + "samgr:samgr_proxy", + ] + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" +} diff --git a/frameworks/core/include/ans_dialog_callback_stub.h b/frameworks/ans/IAnsDialogCallback.idl similarity index 44% rename from frameworks/core/include/ans_dialog_callback_stub.h rename to frameworks/ans/IAnsDialogCallback.idl index e18c42917..403220126 100644 --- a/frameworks/core/include/ans_dialog_callback_stub.h +++ b/frameworks/ans/IAnsDialogCallback.idl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,25 +13,7 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_STUB_H -#define BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_STUB_H - -#include "ans_dialog_callback_interface.h" - -#include - -#include "iremote_stub.h" - -namespace OHOS::Notification { -class AnsDialogCallbackStub : public IRemoteStub { -public: - AnsDialogCallbackStub() = default; - ~AnsDialogCallbackStub() override = default; - DISALLOW_COPY_AND_MOVE(AnsDialogCallbackStub); - - int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, - MessageParcel& reply, MessageOption& option) override; -}; -} // namespace OHOS::Notification - -#endif // BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_STUB_H +sequenceable OHOS.Notification.DialogStatusData; +interface OHOS.Notification.IAnsDialogCallback { + void OnDialogStatusChanged([in] DialogStatusData statusData); +} diff --git a/frameworks/ans/src/ans_dialog_host_client.cpp b/frameworks/ans/src/ans_dialog_host_client.cpp index 2696a1559..719e6c0c0 100644 --- a/frameworks/ans/src/ans_dialog_host_client.cpp +++ b/frameworks/ans/src/ans_dialog_host_client.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -55,17 +55,18 @@ bool AnsDialogHostClient::SetDialogCallbackInterface( return true; } -void AnsDialogHostClient::OnDialogStatusChanged(const DialogStatusData& statusData) +ErrCode AnsDialogHostClient::OnDialogStatusChanged(const DialogStatusData& statusData) { ANS_LOGD("enter"); if (dialogCallbackInterface_ == nullptr) { ANS_LOGE("AnsDialogCallbackNativeInterface is null."); - return; + return ERR_OK; } if (hasBeenCalled.exchange(true)) { ANS_LOGE("Has been called."); - return; + return ERR_INVALID_DATA; } dialogCallbackInterface_->ProcessDialogStatusChanged(statusData); + return ERR_OK; } } // namespace OHOS::Notification diff --git a/frameworks/core/include/ans_dialog_callback_proxy.h b/frameworks/core/include/ans_dialog_callback_proxy.h deleted file mode 100644 index e626bd85b..000000000 --- a/frameworks/core/include/ans_dialog_callback_proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_PROXY_H -#define BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_PROXY_H - -#include "ans_dialog_callback_interface.h" - -#include "iremote_proxy.h" - -namespace OHOS::Notification { -class AnsDialogCallbackProxy : public IRemoteProxy { -public: - explicit AnsDialogCallbackProxy(const sptr &impl) - : IRemoteProxy(impl) {} - ~AnsDialogCallbackProxy() override = default; - DISALLOW_COPY_AND_MOVE(AnsDialogCallbackProxy); - - void OnDialogStatusChanged(const DialogStatusData& statusData) override; - -private: - static inline BrokerDelegator delegator_; -}; -} // namespace OHOS::Notification - -#endif // BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_PROXY_H diff --git a/frameworks/core/include/ans_manager_interface.h b/frameworks/core/include/ans_manager_interface.h index 88a8343af..02fe29005 100644 --- a/frameworks/core/include/ans_manager_interface.h +++ b/frameworks/core/include/ans_manager_interface.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,7 +19,7 @@ #include #include -#include "ans_dialog_callback_interface.h" +#include "ians_dialog_callback.h" #include "ans_subscriber_interface.h" #include "ans_subscriber_local_live_view_interface.h" #include "iremote_broker.h" @@ -393,7 +393,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ virtual ErrCode RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) = 0; /** @@ -519,7 +519,7 @@ public: * @param canPop True if can pop enable notification dialog * @return Returns is canPop result. */ - virtual ErrCode CanPopEnableNotificationDialog(const sptr &callback, + virtual ErrCode CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) = 0; /** diff --git a/frameworks/core/include/ans_manager_proxy.h b/frameworks/core/include/ans_manager_proxy.h index 0049b83c7..472e21a78 100644 --- a/frameworks/core/include/ans_manager_proxy.h +++ b/frameworks/core/include/ans_manager_proxy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -373,7 +373,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ ErrCode RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) override; /** @@ -500,7 +500,7 @@ public: * @param canPop True if can pop enable notification dialog * @return Returns is canPop result. */ - ErrCode CanPopEnableNotificationDialog(const sptr &callback, + ErrCode CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) override; /** diff --git a/frameworks/core/include/ans_manager_stub.h b/frameworks/core/include/ans_manager_stub.h index 91e10f234..c74e5789a 100644 --- a/frameworks/core/include/ans_manager_stub.h +++ b/frameworks/core/include/ans_manager_stub.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -376,7 +376,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ ErrCode RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) override; /** @@ -498,7 +498,7 @@ public: * @param canPop True if can pop enable notification dialog * @return Returns is canPop result. */ - ErrCode CanPopEnableNotificationDialog(const sptr &callback, + ErrCode CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) override; /** diff --git a/frameworks/core/include/ans_dialog_callback_interface.h b/frameworks/core/include/dialog_status_data.h similarity index 63% rename from frameworks/core/include/ans_dialog_callback_interface.h rename to frameworks/core/include/dialog_status_data.h index c2a8cbdae..1f083b77a 100644 --- a/frameworks/core/include/ans_dialog_callback_interface.h +++ b/frameworks/core/include/dialog_status_data.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,14 +13,13 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_INTERFACE_H -#define BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_INTERFACE_H +#ifndef BASE_NOTIFICATION_DIALOG_STATUS_DATA_H +#define BASE_NOTIFICATION_DIALOG_STATUS_DATA_H #include "iremote_broker.h" #include "nocopyable.h" #include "parcel.h" - namespace OHOS::Notification { enum class EnabledDialogStatus { @@ -28,7 +27,6 @@ enum class EnabledDialogStatus { DENY_CLICKED, CRASHED }; - class DialogStatusData : public Parcelable { public: explicit DialogStatusData(EnabledDialogStatus status): status_(static_cast(status)) {} @@ -41,22 +39,5 @@ public: private: int32_t status_; }; - -class AnsDialogCallback : public IRemoteBroker { -public: - DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Notification.AnsDialogCallback"); - - AnsDialogCallback() = default; - ~AnsDialogCallback() override = default; - DISALLOW_COPY_AND_MOVE(AnsDialogCallback); - - virtual void OnDialogStatusChanged(const DialogStatusData& statusData) = 0; - - enum { - // ipc id for OnDialogStatusChanged - ON_DIALOG_STATUS_CHANGED = 1, - }; -}; } // namespace OHOS::Notification - -#endif // BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_INTERFACE_H +#endif // BASE_NOTIFICATION_DIALOG_STATUS_DATA_H diff --git a/frameworks/core/src/listener/ans_dialog_callback_interface.cpp b/frameworks/core/src/dialog_status_data.cpp similarity index 92% rename from frameworks/core/src/listener/ans_dialog_callback_interface.cpp rename to frameworks/core/src/dialog_status_data.cpp index 3c02047a9..86c698543 100644 --- a/frameworks/core/src/listener/ans_dialog_callback_interface.cpp +++ b/frameworks/core/src/dialog_status_data.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "ans_dialog_callback_interface.h" +#include "dialog_status_data.h" #include "ans_log_wrapper.h" diff --git a/frameworks/core/src/listener/ans_dialog_callback_proxy.cpp b/frameworks/core/src/listener/ans_dialog_callback_proxy.cpp deleted file mode 100644 index 9764cb314..000000000 --- a/frameworks/core/src/listener/ans_dialog_callback_proxy.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ans_dialog_callback_proxy.h" - -#include "ans_log_wrapper.h" - -namespace OHOS::Notification { -void AnsDialogCallbackProxy::OnDialogStatusChanged(const DialogStatusData& statusData) -{ - ANS_LOGD("enter"); - MessageParcel data; - if (!data.WriteInterfaceToken(AnsDialogCallback::GetDescriptor())) { - ANS_LOGE("Write interface token failed."); - return; - } - if (!data.WriteParcelable(&statusData)) { - ANS_LOGE("Write statusData failed."); - return; - } - - sptr remote = Remote(); - if (remote == nullptr) { - ANS_LOGE("Remote is NULL"); - return; - } - - MessageParcel reply; - MessageOption option; - int error = remote->SendRequest(ON_DIALOG_STATUS_CHANGED, data, reply, option); - if (error != ERR_OK) { - ANS_LOGE("SendRequest fail, error: %{public}d", error); - } -} -} // namespace OHOS::Notification diff --git a/frameworks/core/src/listener/ans_dialog_callback_stub.cpp b/frameworks/core/src/listener/ans_dialog_callback_stub.cpp deleted file mode 100644 index ae3a2207d..000000000 --- a/frameworks/core/src/listener/ans_dialog_callback_stub.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ans_dialog_callback_stub.h" - -#include "ans_log_wrapper.h" - -namespace OHOS::Notification { -int32_t AnsDialogCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& data, - MessageParcel& reply, MessageOption& option) -{ - if (code != AnsDialogCallback::ON_DIALOG_STATUS_CHANGED || - data.ReadInterfaceToken() != AnsDialogCallback::GetDescriptor()) { - ANS_LOGE("Invalid request."); - return ERR_INVALID_STATE; - } - - std::unique_ptr result(data.ReadParcelable()); - if (result == nullptr) { - ANS_LOGE("DialogStatusData is nullptr"); - return ERR_INVALID_STATE; - } - OnDialogStatusChanged(*result); - return ERR_NONE; -} -} // namespace OHOS::Notification diff --git a/frameworks/core/src/manager/ans_manager_proxy_bundle.cpp b/frameworks/core/src/manager/ans_manager_proxy_bundle.cpp index 6f92fa870..35f92bc42 100644 --- a/frameworks/core/src/manager/ans_manager_proxy_bundle.cpp +++ b/frameworks/core/src/manager/ans_manager_proxy_bundle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -116,7 +116,7 @@ ErrCode AnsManagerProxy::HasNotificationPolicyAccessPermission(bool &granted) } ErrCode AnsManagerProxy::RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) { ANS_LOGD("enter"); @@ -477,7 +477,7 @@ ErrCode AnsManagerProxy::IsAllowedNotifySelf(bool &allowed) return result; } -ErrCode AnsManagerProxy::CanPopEnableNotificationDialog(const sptr &callback, +ErrCode AnsManagerProxy::CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) { MessageParcel data; diff --git a/frameworks/core/src/manager/ans_manager_stub_invalid.cpp b/frameworks/core/src/manager/ans_manager_stub_invalid.cpp index 7c1af250c..eab3937c1 100644 --- a/frameworks/core/src/manager/ans_manager_stub_invalid.cpp +++ b/frameworks/core/src/manager/ans_manager_stub_invalid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -262,7 +262,7 @@ ErrCode AnsManagerStub::UpdateSlots( } ErrCode AnsManagerStub::RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) { ANS_LOGE("AnsManagerStub::RequestEnableNotification called!"); @@ -351,7 +351,7 @@ ErrCode AnsManagerStub::IsAllowedNotifySelf(bool &allowed) return ERR_INVALID_OPERATION; } -ErrCode AnsManagerStub::CanPopEnableNotificationDialog(const sptr &callback, +ErrCode AnsManagerStub::CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) { ANS_LOGE("AnsManagerStub::CanPopEnableNotificationDialog called!"); 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 56d4f08b0..1f6b7ae88 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,7 +23,7 @@ #include "ans_manager_proxy.h" #undef private #undef protected -#include "ans_dialog_callback_interface.h" +#include "ians_dialog_callback.h" #include "ans_inner_errors.h" #include "ipc_types.h" #include "notification.h" @@ -222,7 +222,7 @@ public: } ErrCode RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) override { return ERR_ANS_INVALID_PARAM; @@ -318,7 +318,7 @@ public: return ERR_ANS_INVALID_PARAM; } - ErrCode CanPopEnableNotificationDialog(const sptr &callback, + ErrCode CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) override { return ERR_ANS_INVALID_PARAM; diff --git a/frameworks/js/napi/src/js_ans_dialog_callback.cpp b/frameworks/js/napi/src/js_ans_dialog_callback.cpp index cf8a3f964..6a9d55dcb 100644 --- a/frameworks/js/napi/src/js_ans_dialog_callback.cpp +++ b/frameworks/js/napi/src/js_ans_dialog_callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,7 +17,7 @@ #include -#include "ans_dialog_callback_interface.h" +#include "ians_dialog_callback.h" #include "ans_inner_errors.h" #include "ans_log_wrapper.h" diff --git a/frameworks/reminder/BUILD.gn b/frameworks/reminder/BUILD.gn index 4598a3d8a..35f1f04e2 100644 --- a/frameworks/reminder/BUILD.gn +++ b/frameworks/reminder/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -55,7 +55,10 @@ ohos_shared_library("reminder_innerkits") { branch_protector_ret = "pac_ret" include_dirs = [ "${inner_api_path}" ] - public_configs = [ ":reminder_innerkits_public_config" ] + public_configs = [ + ":reminder_innerkits_public_config", + "${frameworks_path}/ans:ans_innerkits_config", + ] output_values = get_target_outputs(":reminder_service_interface") sources = [ "${frameworks_module_reminder_path}/src/reminder_helper.cpp", diff --git a/interfaces/kits/native/ans_dialog_callback_native_interface.h b/interfaces/kits/native/ans_dialog_callback_native_interface.h index 2270081fd..7697d8fc8 100644 --- a/interfaces/kits/native/ans_dialog_callback_native_interface.h +++ b/interfaces/kits/native/ans_dialog_callback_native_interface.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,7 +16,7 @@ #ifndef BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_NATIVE_INTERFACE_H #define BASE_NOTIFICATION_ANS_DIALOG_CALLBACK_NATIVE_INTERFACE_H -#include "ans_dialog_callback_interface.h" +#include "ians_dialog_callback.h" #include "nocopyable.h" namespace OHOS::Notification { diff --git a/interfaces/kits/native/ans_dialog_host_client.h b/interfaces/kits/native/ans_dialog_host_client.h index 633a39c8c..782051ff3 100644 --- a/interfaces/kits/native/ans_dialog_host_client.h +++ b/interfaces/kits/native/ans_dialog_host_client.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -36,7 +36,7 @@ public: virtual ~AnsDialogHostClient() = default; DISALLOW_COPY_AND_MOVE(AnsDialogHostClient); - void OnDialogStatusChanged(const DialogStatusData& statusData) override; + ErrCode OnDialogStatusChanged(const DialogStatusData& statusData) override; private: inline static sptr instance_ = nullptr; diff --git a/services/ans/include/advanced_notification_service.h b/services/ans/include/advanced_notification_service.h index 8ae8e4f8e..16020e411 100644 --- a/services/ans/include/advanced_notification_service.h +++ b/services/ans/include/advanced_notification_service.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -450,7 +450,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ ErrCode RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) override; /** @@ -576,7 +576,7 @@ public: * @param canPop True if can pop enable notification dialog * @return Returns is canPop result. */ - ErrCode CanPopEnableNotificationDialog(const sptr &callback, + ErrCode CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) override; /** @@ -1448,7 +1448,7 @@ private: void SetClassificationWithVoip(const sptr &request); void UpdateCollaborateTimerInfo(const std::shared_ptr &record); ErrCode CommonRequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken, const sptr bundleOption, const bool innerLake); diff --git a/services/ans/include/notification_dialog_manager.h b/services/ans/include/notification_dialog_manager.h index dc5f848cd..f51bbc44a 100644 --- a/services/ans/include/notification_dialog_manager.h +++ b/services/ans/include/notification_dialog_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -26,7 +26,7 @@ #include "common_event_subscribe_info.h" #include "refbase.h" -#include "ans_dialog_callback_interface.h" +#include "ians_dialog_callback.h" #include "ans_inner_errors.h" namespace OHOS::Notification { @@ -73,7 +73,7 @@ public: struct DialogInfo { sptr bundleOption; // When multi devices are going to be supported, a deviceId need to be stored - sptr callback; + sptr callback; }; /** @@ -83,7 +83,7 @@ public: */ ErrCode RequestEnableNotificationDailog( const sptr& bundle, - const sptr& callback, + const sptr& callback, const sptr& callerToken, const bool innerLake ); @@ -101,7 +101,7 @@ public: * AddDialogInfo * @return ERR_OK when add Dialog successfully */ - ErrCode AddDialogInfo(const sptr& bundle, const sptr& callback); + ErrCode AddDialogInfo(const sptr& bundle, const sptr& callback); /* * RemoveDialogInfoByBundleOption @@ -118,7 +118,8 @@ private: static bool SetHasPoppedDialog(const sptr& bundleOption, bool hasPopped); // bundle need to be not null - bool AddDialogInfoIfNotExist(const sptr& bundle, const sptr& callback); + bool AddDialogInfoIfNotExist( + const sptr& bundle, const sptr& callback); sptr GetBundleOptionByBundleName(const std::string& bundleName, const int32_t& uid); void RemoveAllDialogInfos(std::list>& dialogInfosRemoved); diff --git a/services/ans/src/advanced_notification_publish_service.cpp b/services/ans/src/advanced_notification_publish_service.cpp index 07b500820..8f077fed7 100644 --- a/services/ans/src/advanced_notification_publish_service.cpp +++ b/services/ans/src/advanced_notification_publish_service.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -997,7 +997,7 @@ ErrCode AdvancedNotificationService::GetShowBadgeEnabled(bool &enabled) } ErrCode AdvancedNotificationService::RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) { ANS_LOGD("%{public}s", __FUNCTION__); @@ -1019,7 +1019,7 @@ ErrCode AdvancedNotificationService::RequestEnableNotification(const std::string } ErrCode AdvancedNotificationService::CommonRequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken, const sptr bundleOption, const bool innerLake) @@ -1237,7 +1237,7 @@ ErrCode AdvancedNotificationService::IsAllowedNotifySelf(bool &allowed) } ErrCode AdvancedNotificationService::CanPopEnableNotificationDialog( - const sptr &callback, bool &canPop, std::string &bundleName) + const sptr &callback, bool &canPop, std::string &bundleName) { ANS_LOGD("%{public}s", __FUNCTION__); canPop = false; diff --git a/services/ans/src/ans_manager_stub.cpp b/services/ans/src/ans_manager_stub.cpp index 505444440..9ad870a42 100644 --- a/services/ans/src/ans_manager_stub.cpp +++ b/services/ans/src/ans_manager_stub.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -1292,7 +1292,7 @@ ErrCode AnsManagerStub::HandleRequestEnableNotification(MessageParcel &data, Mes callerToken = data.ReadRemoteObject(); } - ErrCode result = RequestEnableNotification(deviceId, iface_cast(callback), callerToken); + ErrCode result = RequestEnableNotification(deviceId, iface_cast(callback), callerToken); if (!reply.WriteInt32(result)) { ANS_LOGE("[HandleRequestEnableNotification] fail: write result failed, ErrCode=%{public}d", result); return ERR_ANS_PARCELABLE_FAILED; @@ -1613,7 +1613,7 @@ ErrCode AnsManagerStub::HandleCanPopEnableNotificationDialog(MessageParcel &data } bool canPop = false; std::string bundleName; - ErrCode result = CanPopEnableNotificationDialog(iface_cast(callback), canPop, bundleName); + ErrCode result = CanPopEnableNotificationDialog(iface_cast(callback), canPop, bundleName); if (!reply.WriteInt32(result)) { ANS_LOGE("[HandleCanPopEnableNotificationDialog] fail: write result failed, ErrCode=%{public}d", result); return ERR_ANS_PARCELABLE_FAILED; diff --git a/services/ans/src/ans_manager_stub_invalid.cpp b/services/ans/src/ans_manager_stub_invalid.cpp index 99015e0f8..72c37c858 100644 --- a/services/ans/src/ans_manager_stub_invalid.cpp +++ b/services/ans/src/ans_manager_stub_invalid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -262,7 +262,7 @@ ErrCode AnsManagerStub::UpdateSlots( } ErrCode AnsManagerStub::RequestEnableNotification(const std::string &deviceId, - const sptr &callback, + const sptr &callback, const sptr &callerToken) { ANS_LOGE("AnsManagerStub::RequestEnableNotification called!"); @@ -351,7 +351,7 @@ ErrCode AnsManagerStub::IsAllowedNotifySelf(bool &allowed) return ERR_INVALID_OPERATION; } -ErrCode AnsManagerStub::CanPopEnableNotificationDialog(const sptr &callback, +ErrCode AnsManagerStub::CanPopEnableNotificationDialog(const sptr &callback, bool &canPop, std::string &bundleName) { ANS_LOGE("AnsManagerStub::CanPopEnableNotificationDialog called!"); diff --git a/services/ans/src/notification_dialog_manager.cpp b/services/ans/src/notification_dialog_manager.cpp index 80e17b778..6b32f0b2a 100644 --- a/services/ans/src/notification_dialog_manager.cpp +++ b/services/ans/src/notification_dialog_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -87,7 +87,7 @@ bool NotificationDialogManager::Init() ErrCode NotificationDialogManager::RequestEnableNotificationDailog( const sptr& bundle, - const sptr& callback, + const sptr& callback, const sptr& callerToken, const bool innerLake) { @@ -143,7 +143,7 @@ ErrCode NotificationDialogManager::OnBundleEnabledStatusChanged( } ErrCode NotificationDialogManager::AddDialogInfo(const sptr& bundle, - const sptr& callback) + const sptr& callback) { if (!AddDialogInfoIfNotExist(bundle, callback)) { return ERR_ANS_DIALOG_IS_POPPING; @@ -153,7 +153,7 @@ ErrCode NotificationDialogManager::AddDialogInfo(const sptr& bundle, - const sptr& callback) + const sptr& callback) { std::lock_guard lock(dialogsMutex_); std::string name = bundle->GetBundleName(); diff --git a/services/ans/test/unittest/advanced_notification_publish_service_test.cpp b/services/ans/test/unittest/advanced_notification_publish_service_test.cpp index 4e5888816..a2f62f004 100644 --- a/services/ans/test/unittest/advanced_notification_publish_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_publish_service_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -1108,7 +1108,7 @@ HWTEST_F(AnsPublishServiceTest, PublishRemoveDuplicateEvent_00003, Function | Sm */ HWTEST_F(AnsPublishServiceTest, CanPopEnableNotificationDialog_001, Function | SmallTest | Level1) { - sptr callback = nullptr; + sptr callback = nullptr; bool canPop = false; std::string bundleName = ""; ErrCode result = advancedNotificationService_->CanPopEnableNotificationDialog(callback, canPop, bundleName); diff --git a/services/ans/test/unittest/advanced_notification_service_test.cpp b/services/ans/test/unittest/advanced_notification_service_test.cpp index 3dbca2c84..c4693a008 100644 --- a/services/ans/test/unittest/advanced_notification_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_service_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -816,7 +816,7 @@ HWTEST_F(AdvancedNotificationServiceTest, AdvancedNotificationServiceTest_13100, sptr req = new NotificationRequest(); EXPECT_NE(req, nullptr); std::string deviceId = "DeviceId"; - sptr callback = nullptr; + sptr callback = nullptr; sptr callerToken = nullptr; ASSERT_EQ(advancedNotificationService_->RequestEnableNotification(deviceId, callback, callerToken), (int)ERR_ANS_INVALID_PARAM); diff --git a/services/ans/test/unittest/ans_manager_stub_test.cpp b/services/ans/test/unittest/ans_manager_stub_test.cpp index b3bff9055..8b61e14fa 100644 --- a/services/ans/test/unittest/ans_manager_stub_test.cpp +++ b/services/ans/test/unittest/ans_manager_stub_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -3927,7 +3927,7 @@ HWTEST_F(AnsManagerStubTest, UpdateSlots01, Function | SmallTest | Level1) HWTEST_F(AnsManagerStubTest, RequestEnableNotification01, Function | SmallTest | Level1) { std::string deviceId = "this is deviceId"; - sptr callback = nullptr; + sptr callback = nullptr; sptr callerToken = nullptr; ErrCode result = ansManagerStub_->RequestEnableNotification(deviceId, callback, callerToken); EXPECT_EQ(result, (int)ERR_INVALID_OPERATION); diff --git a/test/fuzztest/advancednotificationservice_fuzzer/advancednotificationservice_fuzzer.cpp b/test/fuzztest/advancednotificationservice_fuzzer/advancednotificationservice_fuzzer.cpp index 55f6f9b6c..86161c0d2 100644 --- a/test/fuzztest/advancednotificationservice_fuzzer/advancednotificationservice_fuzzer.cpp +++ b/test/fuzztest/advancednotificationservice_fuzzer/advancednotificationservice_fuzzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -142,7 +142,7 @@ namespace OHOS { service->GetSyncNotificationEnabledWithoutApp(userId, enabled); int32_t badgeNum = fuzzData->ConsumeIntegral(); service->SetBadgeNumber(badgeNum, fuzzData->ConsumeRandomLengthString()); - sptr dialogCallback = new Notification::AnsDialogCallbackProxy(nullptr); + sptr dialogCallback = new Notification::AnsDialogCallbackProxy(nullptr); sptr callerToken = new Notification::AnsSubscriberStub(); std::shared_ptr groupInfo; service->RequestEnableNotification(stringData, dialogCallback, callerToken); diff --git a/test/fuzztest/ansmanagerstub_fuzzer/ansmanagerstub_fuzzer.cpp b/test/fuzztest/ansmanagerstub_fuzzer/ansmanagerstub_fuzzer.cpp index 8bae3c40f..bf942d4cb 100644 --- a/test/fuzztest/ansmanagerstub_fuzzer/ansmanagerstub_fuzzer.cpp +++ b/test/fuzztest/ansmanagerstub_fuzzer/ansmanagerstub_fuzzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -379,7 +379,7 @@ namespace OHOS { ansManagerStub.DeleteAll(); ansManagerStub.GetSlotsByBundle(bundleOption, slots); ansManagerStub.UpdateSlots(bundleOption, slots); - sptr dialogCallback = nullptr; + sptr dialogCallback = nullptr; sptr callerToken = nullptr; ansManagerStub.RequestEnableNotification(stringData, dialogCallback, callerToken); bool enabled = fuzzData->ConsumeBool(); diff --git a/test/fuzztest/ansmanagerstubannex_fuzzer/ansmanagerstubannex_fuzzer.cpp b/test/fuzztest/ansmanagerstubannex_fuzzer/ansmanagerstubannex_fuzzer.cpp index 3d74a3721..f8fcc2b8a 100644 --- a/test/fuzztest/ansmanagerstubannex_fuzzer/ansmanagerstubannex_fuzzer.cpp +++ b/test/fuzztest/ansmanagerstubannex_fuzzer/ansmanagerstubannex_fuzzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -375,7 +375,7 @@ namespace OHOS { ansManagerStub.DeleteAll(); ansManagerStub.GetSlotsByBundle(bundleOption, slots); ansManagerStub.UpdateSlots(bundleOption, slots); - sptr dialogCallback = nullptr; + sptr dialogCallback = nullptr; sptr callerToken = nullptr; ansManagerStub.RequestEnableNotification(stringData, dialogCallback, callerToken); bool enabled = fuzzData->ConsumeBool(); diff --git a/test/fuzztest/ansmanagerstubannexthree_fuzzer/ansmanagerstubannexthree_fuzzer.cpp b/test/fuzztest/ansmanagerstubannexthree_fuzzer/ansmanagerstubannexthree_fuzzer.cpp index 3f1202388..5b0183433 100644 --- a/test/fuzztest/ansmanagerstubannexthree_fuzzer/ansmanagerstubannexthree_fuzzer.cpp +++ b/test/fuzztest/ansmanagerstubannexthree_fuzzer/ansmanagerstubannexthree_fuzzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -367,7 +367,7 @@ namespace OHOS { ansManagerStub.DeleteAll(); ansManagerStub.GetSlotsByBundle(bundleOption, slots); ansManagerStub.UpdateSlots(bundleOption, slots); - sptr dialogCallback = nullptr; + sptr dialogCallback = nullptr; sptr callerToken = nullptr; ansManagerStub.RequestEnableNotification(stringData, dialogCallback, callerToken); bool enabled = fuzzData->ConsumeBool(); -- Gitee