diff --git a/frameworks/ans/BUILD.gn b/frameworks/ans/BUILD.gn index 3883d2f5520096851aa663dee4299031cf04533e..77a0c8f4ec62c2db36bd8bc3021ea11343f81ede 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_operation_callback_proxy.cpp", "${core_path}/src/listener/ans_operation_callback_stub.cpp", "${core_path}/src/listener/ans_subscriber_listener.cpp", @@ -120,6 +141,11 @@ ohos_shared_library("ans_innerkits") { defines = [] + deps = [ + ":ans_dialog_callback_proxy", + ":ans_dialog_callback_stub", + ] + external_deps = [ "ability_base:want", "ability_base:zuri", @@ -162,3 +188,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 e18c4291799c4ba41217b166259ef3ec5e024cf9..403220126075f950866563a3fddab155b7b504e1 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 2696a1559bce11298165d201071784e6c7eece91..719e6c0c0abc9d17966051f456a436f7956246c9 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 e626bd85b01b5d8ecb6233878e6dcfd22fca01af..0000000000000000000000000000000000000000 --- 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 cf53410c16bb82cee6a4cd68644370aa5d40d3de..0a9fed8f43ddc605fcc7aed502f166e47daec2fa 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" @@ -394,7 +394,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; /** @@ -520,7 +520,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 9260e9446c0e3841c54caebe84aa14d9c2dbdf55..a3b81ab141af0692b67b6cd5a43cf529d62cb168 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 adf0e52fb96b5ce05893c184906688352df81424..65e998711d9f27ddd3f6c95c3cb592b6ddd70dfb 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 c2a8cbdaeef89d1c0f7cd975c234674c66196b0e..1f083b77ae8427378a594502d6e1fc86c8e4e4cd 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 3c02047a9d9b3c42054e48cc35fe3dc223e7bc5e..86c69854338e8b602a12deab3acafca2921798c1 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 9764cb3140800a1a2fa1fa8ef932008f1ba15c96..0000000000000000000000000000000000000000 --- 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 ae3a2207d08b842bde7853253cab3aad950be872..0000000000000000000000000000000000000000 --- 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 6f92fa8701a81224a201639879ffa6b47b872109..35f92bc4247618c80c8d411ac60a4b980537c9bb 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 9a0b053e0958f7fd6edcb04eacd693c017356030..c6b8ae3ed621d52cd2466144dd8480d2957cdc4c 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 48d41eb4680a06313e98f11d8040555617533b4b..6ea531df18d4cd5ee69b39cfc2cfa19ecf4e0ddb 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 cf8a3f9645b2ec249cf0f932c2b7183567671aea..6a9d55dcb40b974e953899fa684a40d0986f14f4 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 4598a3d8a248ec03a903ed4e8971f412b54f1629..35f1f04e2f78db91373b1e99532d7f39afc88415 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 2270081fd3a697d631c8df8fa393ddeaa691fa05..7697d8fc848cd76f4210f2077b2889021f2a045a 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 633a39c8cdea72627b425efd32b028fd46ae65b4..782051ff3a41f1807d6423b92f2a9c3e763bd700 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 87534d53be3fbcc9fd0305b62866f5dfbb2ed6f4..936d9843190d3b2c186ba11769063069042a2804 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; /** @@ -1460,7 +1460,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 dc5f848cd314aea402024a188f24db80ba9693d8..f51bbc44a2b96afa92d4920aad3986a52cd2605f 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 fe068b353cf3b10aeb33dec52c16ef8c76e9d228..de274191b6b36b8ad747c33bad78ecf237298fea 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 @@ -1000,7 +1000,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__); @@ -1026,7 +1026,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) @@ -1244,7 +1244,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 9128f2ec7c773f0e4814baebb79d429a85cb4313..de85cf32bb6c293a501e37118cb0311eff0ac6f2 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 @@ -1296,7 +1296,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; @@ -1617,7 +1617,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 38dc632ada833b097ef50f3c2f0b0b25fa50d4f3..5c721d24c9f476a9131798ad5dfb181c1eb418eb 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 80e17b778ed2f86745e10187a2cec13953a013fa..6b32f0b2aecfc9305106b43be5980446b5ed1485 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 4e5888816464787664136b3586c58be9ad4f1006..a2f62f00411d699b469102e6eb32c06606bc00e9 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 e75a9d904dbea2a91a405c5a5a9da37c7357dff5..f8e169dda6d73b7d13e8e69f19d3b37b829f1708 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 @@ -820,7 +820,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 e9c2a43d381bc03263bf2caecf61a545cd4452e7..05348cfbf320d98ec943c4136cc4b6453ebd6e9b 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 @@ -3929,7 +3929,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 55f6f9b6c19ce78401af595941f74a818a0c60ac..86161c0d2b068aaa0a513dd33bad4108303a44b3 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 8bae3c40f959f2a52c275f864787594407193c88..bf942d4cbaef2a6feb4e32057bdb6b030e2eb00f 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 3d74a3721f3fb11bdbac93670ce3840e455eff7f..f8fcc2b8ab1ca2564ecc538f836088d65a0bd5ec 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 3f120238896bbc8ea9fa696f723f4edded66c7e7..5b01834338cf357b091b93fe1f9a37a51d71f95b 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();