From 66b6b12cf587e81e8c1864743289689140d881d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Wed, 18 Jun 2025 10:21:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?description:=E5=85=83=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E6=94=AF=E6=8C=81IDL=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- frameworks/cj/ffi/want_agent/BUILD.gn | 6 +- frameworks/native/ability/native/BUILD.gn | 10 +- interfaces/inner_api/ability_manager/BUILD.gn | 95 +++++++++- .../idl/IUserCallback.idl} | 42 +---- .../include/ability_manager_errors.h | 5 + .../include/ability_manager_interface.h | 4 +- .../ability_manager/include/user_callback.h | 65 ------- .../include/user_callback_proxy.h | 65 ------- interfaces/inner_api/app_manager/BUILD.gn | 122 ++++++++++++- .../IAbilityDebugResponse.idl} | 34 +--- .../IAppDebugListener.idl} | 34 +--- .../idl/IStartSpecifiedAbilityResponse.idl} | 43 ++--- .../appmgr/ability_debug_response_interface.h | 54 ------ .../appmgr/ability_debug_response_proxy.h | 56 ------ .../include/appmgr/ams_mgr_interface.h | 6 +- .../include/appmgr/ams_mgr_proxy.h | 2 +- .../include/appmgr/app_debug_listener_proxy.h | 49 ------ .../include/appmgr/app_mgr_client.h | 4 +- .../include/appmgr/app_mgr_interface.h | 4 +- .../istart_specified_ability_response.h | 59 ------- .../start_specified_ability_response_proxy.h | 56 ------ .../start_specified_ability_response_stub.h | 45 ----- .../appmgr/ability_debug_response_proxy.cpp | 131 -------------- .../appmgr/ability_debug_response_stub.cpp | 118 ------------- .../app_manager/src/appmgr/ams_mgr_stub.cpp | 2 +- .../src/appmgr/app_debug_listener_proxy.cpp | 87 --------- .../src/appmgr/app_debug_listener_stub.cpp | 98 ----------- ...start_specified_ability_response_proxy.cpp | 165 ------------------ .../start_specified_ability_response_stub.cpp | 88 ---------- interfaces/inner_api/wantagent/BUILD.gn | 6 +- services/abilitymgr/BUILD.gn | 4 +- services/abilitymgr/abilitymgr.gni | 1 - .../abilitymgr/include/ability_debug_deal.h | 10 +- .../include/ability_manager_service.h | 8 +- services/abilitymgr/include/app_scheduler.h | 18 +- .../abilitymgr/src/ability_debug_deal.cpp | 23 +-- services/abilitymgr/src/app_scheduler.cpp | 15 +- .../abilitymgr/src/user_callback_proxy.cpp | 73 -------- .../abilitymgr/src/user_callback_stub.cpp | 75 -------- services/appmgr/include/ams_mgr_scheduler.h | 2 +- services/appmgr/include/app_debug_manager.h | 4 +- .../appmgr/include/app_mgr_service_inner.h | 6 +- services/appmgr/include/app_running_manager.h | 6 +- .../fuzztest/abilitydebugdeal_fuzzer/BUILD.gn | 4 +- .../abilitydebugresponseproxy_fuzzer/BUILD.gn | 4 +- .../abilitydebugresponseproxy_fuzzer.cpp | 8 +- ...appmgrabilitydebugresponseproxy_fuzzer.cpp | 14 +- ...acesappmgrappdebuglistenerproxy_fuzzer.cpp | 12 +- ...facesappmgrappdebuglistenerstub_fuzzer.cpp | 11 +- .../usercallbackstub_fuzzer.cpp | 12 +- test/moduletest/app_mgr_client_test/BUILD.gn | 9 +- test/unittest/BUILD.gn | 5 +- .../ability_debug_response_stub_test.cpp | 6 +- .../mock_ability_debug_response_stub.h | 8 +- .../BUILD.gn | 9 +- .../BUILD.gn | 9 +- .../BUILD.gn | 9 +- .../BUILD.gn | 7 +- .../BUILD.gn | 7 +- .../ability_manager_proxy_test/BUILD.gn | 9 +- .../ability_manager_proxy_third_test/BUILD.gn | 7 +- .../ability_manager_proxy_third_test.cpp | 6 +- .../ability_manager_service_eighth_test.cpp | 9 +- .../BUILD.gn | 1 - .../BUILD.gn | 1 - .../mock/include/mock_test_object.h | 10 +- .../BUILD.gn | 7 +- .../ability_scheduler_stub_test/BUILD.gn | 9 +- .../ams_ability_running_record_test/BUILD.gn | 8 +- .../ams_mgr_scheduler_dump_test/BUILD.gn | 9 +- .../BUILD.gn | 8 +- .../app_debug_listener_proxy_test/BUILD.gn | 9 +- .../app_debug_listener_proxy_test.cpp | 17 +- .../app_debug_listener_stub_mock.h | 8 +- .../app_debug_listener_stub_test.cpp | 39 +++-- .../mock_app_debug_listener_stub.h | 6 +- test/unittest/app_mgr_client_test/BUILD.gn | 9 +- .../app_mgr_service_inner_eighth_test.cpp | 49 ++++-- .../app_mgr_service_inner_ninth_test.cpp | 26 ++- .../mock_ability_debug_response_stub.h | 8 +- .../app_mgr_service_inner_seventh_test.cpp | 30 ++-- .../app_mgr_service_inner_tenth_test.cpp | 32 ++-- .../app_mgr_service_inner_test.cpp | 10 +- test/unittest/app_preloader_test/BUILD.gn | 3 +- .../BUILD.gn | 9 +- .../app_state_observer_manager_test/BUILD.gn | 8 +- .../BUILD.gn | 8 +- test/unittest/call_record_test/BUILD.gn | 9 +- .../data_ability_manager_test/BUILD.gn | 4 +- test/unittest/dfr_test/watchdog_test/BUILD.gn | 3 +- .../BUILD.gn | 9 +- test/unittest/mission_list_test/BUILD.gn | 3 +- test/unittest/pending_want_test/BUILD.gn | 8 +- .../quick_fix_manager_service_test/BUILD.gn | 9 +- .../service_extension_context_test/BUILD.gn | 9 +- test/unittest/state_utils_test/BUILD.gn | 2 +- .../stop_user_callback_proxy_test/BUILD.gn | 9 +- .../stop_user_callback_proxy_test.cpp | 6 +- .../stop_user_callback_stub_mock.h | 10 +- .../stop_user_callback_stub_test/BUILD.gn | 9 +- .../stop_user_callback_stub_test.cpp | 22 +-- .../timeout_state_utils_test/BUILD.gn | 5 +- test/unittest/unlock_screen_test/BUILD.gn | 3 +- test/unittest/user_controller_test/BUILD.gn | 8 +- .../user_controller_test.cpp | 15 +- test/unittest/want_sender_info_test/BUILD.gn | 9 +- tools/aa/BUILD.gn | 3 +- 107 files changed, 708 insertions(+), 1736 deletions(-) rename interfaces/inner_api/{app_manager/include/appmgr/app_debug_listener_interface.h => ability_manager/idl/IUserCallback.idl} (32%) delete mode 100644 interfaces/inner_api/ability_manager/include/user_callback.h delete mode 100644 interfaces/inner_api/ability_manager/include/user_callback_proxy.h rename interfaces/inner_api/app_manager/{include/appmgr/app_debug_listener_stub.h => idl/IAbilityDebugResponse.idl} (39%) rename interfaces/inner_api/app_manager/{include/appmgr/ability_debug_response_stub.h => idl/IAppDebugListener.idl} (35%) rename interfaces/inner_api/{ability_manager/include/user_callback_stub.h => app_manager/idl/IStartSpecifiedAbilityResponse.idl} (35%) delete mode 100644 interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_interface.h delete mode 100644 interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_proxy.h delete mode 100644 interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_proxy.h delete mode 100644 interfaces/inner_api/app_manager/include/appmgr/istart_specified_ability_response.h delete mode 100644 interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_proxy.h delete mode 100644 interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_stub.h delete mode 100644 interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_proxy.cpp delete mode 100644 interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_stub.cpp delete mode 100644 interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_proxy.cpp delete mode 100644 interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_stub.cpp delete mode 100644 interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_proxy.cpp delete mode 100644 interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_stub.cpp delete mode 100644 services/abilitymgr/src/user_callback_proxy.cpp delete mode 100644 services/abilitymgr/src/user_callback_stub.cpp diff --git a/frameworks/cj/ffi/want_agent/BUILD.gn b/frameworks/cj/ffi/want_agent/BUILD.gn index b6e9447be76..12d69329e06 100644 --- a/frameworks/cj/ffi/want_agent/BUILD.gn +++ b/frameworks/cj/ffi/want_agent/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 @@ -35,6 +35,10 @@ config("cj_want_agent_public_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", ] + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] } ohos_shared_library("cj_want_agent_ffi") { diff --git a/frameworks/native/ability/native/BUILD.gn b/frameworks/native/ability/native/BUILD.gn index 0b8fcb13732..b725ff79c14 100644 --- a/frameworks/native/ability/native/BUILD.gn +++ b/frameworks/native/ability/native/BUILD.gn @@ -43,6 +43,7 @@ config("ability_config") { "${ability_runtime_napi_path}/featureAbility", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -140,7 +141,7 @@ config("abilitykit_utils_public_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app", "${ability_runtime_innerkits_path}/app_manager/include/appmgr", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] if (ability_runtime_graphics) { defines = [ "SUPPORT_GRAPHICS" ] } @@ -333,6 +334,7 @@ ohos_shared_library("abilitykit_native") { public_configs = [ ":ability_public_config", "${ability_runtime_native_path}/ability:ability_context_public_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", "${ability_runtime_innerkits_path}/wantagent:wantagent_innerkits_public_config", ] @@ -550,7 +552,7 @@ config("extensionkit_public_config") { "${ability_runtime_innerkits_path}/app_manager/include/appmgr", "${ability_runtime_services_path}/common/include", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] if (ability_runtime_graphics) { defines = [ "SUPPORT_GRAPHICS" ] } @@ -758,7 +760,7 @@ config("uiability_config") { "${ability_runtime_services_path}/abilitymgr/include/utils", "${ability_runtime_services_path}/abilitymgr/include", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] if (ability_runtime_graphics) { defines = [ "SUPPORT_GRAPHICS", @@ -2224,7 +2226,7 @@ config("embedded_ui_extension_module_config") { "${ability_runtime_napi_path}/inner/napi_common", "${ability_runtime_napi_path}/featureAbility", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/interfaces/inner_api/ability_manager/BUILD.gn b/interfaces/inner_api/ability_manager/BUILD.gn index 55d58d3ea7a..0480803a9b5 100644 --- a/interfaces/inner_api/ability_manager/BUILD.gn +++ b/interfaces/inner_api/ability_manager/BUILD.gn @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build/config/components/idl_tool/idl.gni") import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") @@ -40,8 +41,9 @@ config("ability_manager_public_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/dfr", "${ability_runtime_path}/interfaces/kits/native/appkit", "${ability_runtime_innerkits_path}/dataobs_manager/include", + "${target_gen_dir}", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] defines = [] if (ability_command_for_test) { @@ -62,7 +64,94 @@ config("ability_manager_public_config") { } } +idl_gen_interface("ability_manager_innerkits") { + sources = [ + "idl/IUserCallback.idl", + ] + sources_callback = [ + ] + sources_common =[ + ] + log_domainid = "0xD001336" + log_tag = "AbilityMgr" + subsystem_name = "ability" + part_name = "ability_runtime" +} + +config("ability_manager_innerkits_config") { + include_dirs = [ "${target_gen_dir}" ] +} + +ohos_source_set("ability_manager_innerkits_include") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + cfi_vcall_icall_only = true + debug = false + } + + public_configs = [ + ":ability_manager_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + + deps = [ ":ability_manager_innerkits" ] + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_core", + "samgr:samgr_proxy", + ] + + subsystem_name = "ability" + part_name = "ability_runtime" +} + +ohos_source_set("ability_manager_innerkits_source") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + cfi_vcall_icall_only = true + debug = false + } + output_values = get_target_outputs(":ability_manager_innerkits") + source_values = [ "*.cpp", ] + sources = filter_include(output_values, source_values) + + public_configs = [ + ":ability_manager_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + + deps = [ ":ability_manager_innerkits" ] + + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + ] + + subsystem_name = "ability" + part_name = "ability_runtime" +} + ohos_shared_library("ability_manager") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + cfi_vcall_icall_only = true + debug = false + } use_exceptions = true branch_protector_ret = "pac_ret" @@ -108,8 +197,6 @@ ohos_shared_library("ability_manager") { "${ability_runtime_services_path}/abilitymgr/src/ui_extension/ui_extension_ability_connect_info.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension/ui_extension_host_info.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension/ui_extension_session_info.cpp", - "${ability_runtime_services_path}/abilitymgr/src/user_callback_proxy.cpp", - "${ability_runtime_services_path}/abilitymgr/src/user_callback_stub.cpp", "${ability_runtime_services_path}/abilitymgr/src/window_config.cpp", "${ability_runtime_services_path}/abilitymgr/src/kiosk_status.cpp", "src/aa_tools/ability_start_with_wait_data.cpp", @@ -139,6 +226,8 @@ ohos_shared_library("ability_manager") { public_deps = [ ":ability_connect_callback_stub" ] deps = [ + ":ability_manager_innerkits_include", + ":ability_manager_innerkits_source", ":ability_start_options", ":ability_start_setting", ":mission_info", diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_interface.h b/interfaces/inner_api/ability_manager/idl/IUserCallback.idl similarity index 32% rename from interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_interface.h rename to interfaces/inner_api/ability_manager/idl/IUserCallback.idl index 113002837ee..4651d4c37b8 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_interface.h +++ b/interfaces/inner_api/ability_manager/idl/IUserCallback.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,38 +13,8 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_INTERFACE_H -#define OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_INTERFACE_H - -#include "app_debug_info.h" -#include "iremote_broker.h" - -namespace OHOS { -namespace AppExecFwk { -/** - * @brief Interface to monitor when debug mode. - */ -class IAppDebugListener : public IRemoteBroker { -public: - DECLARE_INTERFACE_DESCRIPTOR(u"ohos.AppExecFwk.AppDebugListener"); - - /** - * @brief Notification of application information registered in listening and debugging mode. - * @param tokens The app info of app running record. - */ - virtual void OnAppDebugStarted(const std::vector &debugInfos) = 0; - - /** - * @brief Notification of application information registered in listening and remove debug mode. - * @param tokens The app info of app running record. - */ - virtual void OnAppDebugStoped(const std::vector &debugInfos) = 0; - - enum class Message { - ON_APP_DEBUG_STARTED = 0, - ON_APP_DEBUG_STOPED, - }; -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_INTERFACE_H +interface OHOS.AAFwk.IUserCallback { + [oneway] void OnStopUserDone([in] int userId, [in] int errcode); + [oneway] void OnStartUserDone([in] int userId, [in] int errcode); + [oneway] void OnLogoutUserDone([in] int userId, [in] int errcode); +} \ No newline at end of file diff --git a/interfaces/inner_api/ability_manager/include/ability_manager_errors.h b/interfaces/inner_api/ability_manager/include/ability_manager_errors.h index 87c485af117..08b2c5c6ace 100644 --- a/interfaces/inner_api/ability_manager/include/ability_manager_errors.h +++ b/interfaces/inner_api/ability_manager/include/ability_manager_errors.h @@ -903,6 +903,11 @@ enum { */ ERR_SA_INTERCEPTOR_READ_PARAMS_FAILED = 2097361, + /* + * Result(2097362) for abilitys debug empty tokens. + */ + ERR_ABILITY_DEBUG_EMPTY_TOKENS = 2097362, + /** * Native error(3000000) for target bundle not exist. */ diff --git a/interfaces/inner_api/ability_manager/include/ability_manager_interface.h b/interfaces/inner_api/ability_manager/include/ability_manager_interface.h index 1785a9b14f7..20529bbc02c 100644 --- a/interfaces/inner_api/ability_manager/include/ability_manager_interface.h +++ b/interfaces/inner_api/ability_manager/include/ability_manager_interface.h @@ -29,7 +29,6 @@ #include "ability_start_setting.h" #include "ability_state.h" #include "ability_state_data.h" -#include "app_debug_listener_interface.h" #include "auto_startup_info.h" #include "dms_continueInfo.h" #include "exit_reason.h" @@ -38,9 +37,11 @@ #include "iability_controller.h" #include "iability_manager_collaborator.h" #include "iacquire_share_data_callback_interface.h" +#include "iapp_debug_listener.h" #include "insight_intent/insight_intent_execute_param.h" #include "insight_intent/insight_intent_execute_result.h" #include "insight_intent/insight_intent_info_for_query.h" +#include "iuser_callback.h" #include "iprepare_terminate_callback_interface.h" #include "keep_alive_info.h" #include "mission_info.h" @@ -51,7 +52,6 @@ #include "sa_interceptor_interface.h" #include "sender_info.h" #include "start_options.h" -#include "user_callback.h" #include "system_memory_attr.h" #include "ui_extension/ui_extension_ability_connect_info.h" #include "ui_extension/ui_extension_host_info.h" diff --git a/interfaces/inner_api/ability_manager/include/user_callback.h b/interfaces/inner_api/ability_manager/include/user_callback.h deleted file mode 100644 index f2fd6373927..00000000000 --- a/interfaces/inner_api/ability_manager/include/user_callback.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2021-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 OHOS_ABILITY_RUNTIME_USER_CALLBACK_H -#define OHOS_ABILITY_RUNTIME_USER_CALLBACK_H - -#include "iremote_broker.h" - -namespace OHOS { -namespace AAFwk { -/** - * @class IUserCallback - * user callback. - */ -class IUserCallback : public OHOS::IRemoteBroker { -public: - DECLARE_INTERFACE_DESCRIPTOR(u"ohos.aafwk.UserCallback"); - - virtual void OnStopUserDone(int userId, int errcode) = 0; - - /** - * @brief OnStartUserDone. - * - * @param userId userId. - * @param errcode errcode. - */ - virtual void OnStartUserDone(int userId, int errcode) = 0; - - /** - * @brief OnLogoutUserDone. - * - * @param userId userId. - * @param errcode errcode. - */ - virtual void OnLogoutUserDone(int userId, int errcode) {} - - enum UserCallbackCmd { - // ipc id for OnStopUserDone - ON_STOP_USER_DONE = 0, - - // ipc id for OnStartUserDone - ON_START_USER_DONE = 1, - - // ipc id for OnLogoutUserDone - ON_LOGOUT_USER_DONE = 2, - - // maximum of enum - CMD_MAX - }; -}; -} // namespace AAFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_USER_CALLBACK_H diff --git a/interfaces/inner_api/ability_manager/include/user_callback_proxy.h b/interfaces/inner_api/ability_manager/include/user_callback_proxy.h deleted file mode 100644 index e469b70b04d..00000000000 --- a/interfaces/inner_api/ability_manager/include/user_callback_proxy.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2021-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 OHOS_ABILITY_RUNTIME_STOP_USER_CALLBACK_PROXY_H -#define OHOS_ABILITY_RUNTIME_STOP_USER_CALLBACK_PROXY_H - -#include -#include "iremote_proxy.h" -#include "user_callback.h" - -namespace OHOS { -namespace AAFwk { -/** - * interface for UserCallbackProxy. - */ -class UserCallbackProxy : public IRemoteProxy { -public: - explicit UserCallbackProxy(const sptr &impl) : IRemoteProxy(impl) - {} - ~UserCallbackProxy() = default; - - /** - * @brief OnStopUserDone. - * - * @param userId userId. - * @param errcode errcode. - */ - virtual void OnStopUserDone(int userId, int errcode) override; - - /** - * @brief OnStartUserDone. - * - * @param userId userId. - * @param errcode errcode. - */ - virtual void OnStartUserDone(int userId, int errcode) override; - - /** - * @brief OnLogoutUserDone. - * - * @param userId userId. - * @param errcode errcode. - */ - virtual void OnLogoutUserDone(int userId, int errcode) override; -private: - void SendRequestCommon(int userId, int errcode, IUserCallback::UserCallbackCmd cmd); - -private: - static inline BrokerDelegator delegator_; -}; -} // namespace AAFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_STOP_USER_CALLBACK_PROXY_H diff --git a/interfaces/inner_api/app_manager/BUILD.gn b/interfaces/inner_api/app_manager/BUILD.gn index c9658b81753..59318b86d69 100644 --- a/interfaces/inner_api/app_manager/BUILD.gn +++ b/interfaces/inner_api/app_manager/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023 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 @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build/config/components/idl_tool/idl.gni") import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") @@ -40,9 +41,116 @@ config("appmgr_core_config") { } } +idl_gen_interface("appmgr_innerkits") { + sources = [ + "idl/IAbilityDebugResponse.idl", + "idl/IAppDebugListener.idl", + "idl/IStartSpecifiedAbilityResponse.idl", + ] + log_domainid = "0xD001311" + log_tag = "AppMgr" + subsystem_name = "ability" + part_name = "ability_runtime" +} + +config("appmgr_innerkits_config") { + include_dirs = [ "${target_gen_dir}" ] +} + +ohos_source_set("appmgr_innerkits_include") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + cfi_vcall_icall_only = true + debug = false + } + + public_configs = [ + ":appmgr_innerkits_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", + "${ability_runtime_path}/utils/server/startup:startup_util_config", + ] + + deps = [ + ":appmgr_innerkits", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits", + "${ability_runtime_path}/utils/server/startup:startup_util", + ] + external_deps = [ + "bundle_framework:appexecfwk_base", + "c_utils:utils", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "samgr:samgr_proxy", + "ability_base:configuration", + ] + subsystem_name = "ability" + part_name = "ability_runtime" +} + +ohos_source_set("appmgr_innerkits_source") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + cfi_vcall_icall_only = true + debug = false + } + configs = [ + ":appmgr_core_config", + ":appmgr_sdk_config", + ] + + public_configs = [ + ":appmgr_innerkits_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", + "${ability_runtime_path}/utils/server/startup:startup_util_config", + ] + + output_values = get_target_outputs(":appmgr_innerkits") + sources = filter_include(output_values, [ "*.cpp" ]) + + deps = [ + ":appmgr_innerkits", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits", + "${ability_runtime_path}/utils/server/startup:startup_util", + ] + external_deps = [ + "c_utils:utils", + "faultloggerd:libfaultloggerd", + "ffrt:libffrt", + "hilog:libhilog", + "hisysevent:libhisysevent", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "samgr:samgr_proxy", + "ability_base:configuration", + "ability_base:session_info", + "ability_base:want", + "bundle_framework:appexecfwk_base", + ] + + subsystem_name = "ability" + part_name = "ability_runtime" +} + ohos_shared_library("app_manager") { + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + cfi_vcall_icall_only = true + debug = false + } branch_protector_ret = "pac_ret" - include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/dfr", "${ability_runtime_path}/utils/global/time/include", @@ -57,8 +165,6 @@ ohos_shared_library("app_manager") { "${ability_runtime_services_path}/appdfr/src/appfreeze_util.cpp", "src/appmgr/ability_controller_proxy.cpp", "src/appmgr/ability_controller_stub.cpp", - "src/appmgr/ability_debug_response_proxy.cpp", - "src/appmgr/ability_debug_response_stub.cpp", "src/appmgr/ability_foreground_state_observer_proxy.cpp", "src/appmgr/ability_foreground_state_observer_stub.cpp", "src/appmgr/ability_info_callback_proxy.cpp", @@ -67,8 +173,6 @@ ohos_shared_library("app_manager") { "src/appmgr/ams_mgr_proxy.cpp", "src/appmgr/ams_mgr_stub.cpp", "src/appmgr/app_debug_info.cpp", - "src/appmgr/app_debug_listener_proxy.cpp", - "src/appmgr/app_debug_listener_stub.cpp", "src/appmgr/app_foreground_state_observer_proxy.cpp", "src/appmgr/app_foreground_state_observer_stub.cpp", "src/appmgr/app_jsheap_mem_info.cpp", @@ -120,15 +224,16 @@ ohos_shared_library("app_manager") { "src/appmgr/render_state_observer_stub.cpp", "src/appmgr/running_multi_info.cpp", "src/appmgr/running_process_info.cpp", - "src/appmgr/start_specified_ability_response_proxy.cpp", - "src/appmgr/start_specified_ability_response_stub.cpp", "src/appmgr/system_memory_attr.cpp", "src/appmgr/process_bind_data.cpp", ] public_configs = [ ":appmgr_core_config", + ":appmgr_innerkits_config", ":appmgr_sdk_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", + "${ability_runtime_path}/utils/server/startup:startup_util_config", ] defines = [ "AMS_LOG_TAG = \"AppexecfwkCore\"" ] @@ -138,6 +243,7 @@ ohos_shared_library("app_manager") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + ":appmgr_innerkits_source", "${ability_runtime_path}/utils/global/freeze:freeze_util", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/common:app_util", diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_stub.h b/interfaces/inner_api/app_manager/idl/IAbilityDebugResponse.idl similarity index 39% rename from interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_stub.h rename to interfaces/inner_api/app_manager/idl/IAbilityDebugResponse.idl index 3aab199f486..8f71029a117 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_stub.h +++ b/interfaces/inner_api/app_manager/idl/IAbilityDebugResponse.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,30 +13,10 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_STUB_H -#define OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_STUB_H +sequenceable OHOS.IRemoteObject; -#include - -#include "iremote_stub.h" -#include "app_debug_listener_interface.h" - -namespace OHOS { -namespace AppExecFwk { -class AppDebugListenerStub : public IRemoteStub { -public: - AppDebugListenerStub(); - virtual ~AppDebugListenerStub(); - - virtual int OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; - -private: - int32_t HandleOnAppDebugStarted(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnAppDebugStoped(MessageParcel &data, MessageParcel &reply); - - DISALLOW_COPY_AND_MOVE(AppDebugListenerStub); -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_STUB_H +interface OHOS.AppExecFwk.IAbilityDebugResponse { + void OnAbilitysDebugStarted([in] List tokens); + void OnAbilitysDebugStoped([in] List tokens); + void OnAbilitysAssertDebugChange([in] List tokens, [in] boolean isAssertDebug); +} \ No newline at end of file diff --git a/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_stub.h b/interfaces/inner_api/app_manager/idl/IAppDebugListener.idl similarity index 35% rename from interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_stub.h rename to interfaces/inner_api/app_manager/idl/IAppDebugListener.idl index 9753d7051b3..2020004d5fc 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_stub.h +++ b/interfaces/inner_api/app_manager/idl/IAppDebugListener.idl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 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,31 +13,9 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_ABILIYT_DEBUG_RESPONSE_STUB_H -#define OHOS_ABILITY_RUNTIME_ABILIYT_DEBUG_RESPONSE_STUB_H +sequenceable app_debug_info..AppDebugInfo; -#include - -#include "ability_debug_response_interface.h" -#include "iremote_stub.h" - -namespace OHOS { -namespace AppExecFwk { -class AbilityDebugResponseStub : public IRemoteStub { -public: - AbilityDebugResponseStub(); - virtual ~AbilityDebugResponseStub(); - - virtual int OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; - -private: - int32_t HandleOnAbilitysDebugStarted(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnAbilitysDebugStoped(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnAbilitysAssertDebugChange(MessageParcel &data, MessageParcel &reply); - - DISALLOW_COPY_AND_MOVE(AbilityDebugResponseStub); -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_ABILIYT_DEBUG_RESPONSE_STUB_H +interface OHOS.AppExecFwk.IAppDebugListener { + [oneway] void OnAppDebugStarted([in] List debugInfos); + [oneway] void OnAppDebugStoped([in] List debugInfos); +} \ No newline at end of file diff --git a/interfaces/inner_api/ability_manager/include/user_callback_stub.h b/interfaces/inner_api/app_manager/idl/IStartSpecifiedAbilityResponse.idl similarity index 35% rename from interfaces/inner_api/ability_manager/include/user_callback_stub.h rename to interfaces/inner_api/app_manager/idl/IStartSpecifiedAbilityResponse.idl index bed99d5a402..652fa7c75ba 100644 --- a/interfaces/inner_api/ability_manager/include/user_callback_stub.h +++ b/interfaces/inner_api/app_manager/idl/IStartSpecifiedAbilityResponse.idl @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-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,37 +13,14 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_USER_CALLBACK_STUB_H -#define OHOS_ABILITY_RUNTIME_USER_CALLBACK_STUB_H +sequenceable want..OHOS.AAFwk.Want; -#include -#include -#include +interface OHOS.AAFwk.IUserCallback; -#include "user_callback.h" -#include "nocopyable.h" - -namespace OHOS { -namespace AAFwk { -/** - * @class UserCallbackStub - * UserCallbackStub. - */ -class UserCallbackStub : public IRemoteStub { -public: - UserCallbackStub(); - virtual ~UserCallbackStub() = default; - - virtual int OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; - -private: - DISALLOW_COPY_AND_MOVE(UserCallbackStub); - - int OnStopUserDoneInner(MessageParcel &data, MessageParcel &reply); - int OnStartUserDoneInner(MessageParcel &data, MessageParcel &reply); - int OnLogoutUserDoneInner(MessageParcel &data, MessageParcel &reply); -}; -} // namespace AAFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_USER_CALLBACK_STUB_H +interface OHOS.AppExecFwk.IStartSpecifiedAbilityResponse { + [oneway] void OnAcceptWantResponse([in] Want want, [in] String flag, [in] int requestId); + [oneway] void OnTimeoutResponse([in] int requestId); + [oneway] void OnNewProcessRequestResponse([in] String flag, [in] int requestId); + [oneway] void OnNewProcessRequestTimeoutResponse([in] int requestId); + [oneway] void OnStartSpecifiedFailed([in] int requestId); +} \ No newline at end of file diff --git a/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_interface.h b/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_interface.h deleted file mode 100644 index 87ec00b7b17..00000000000 --- a/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_interface.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_RESPONSE_INTERFACE_H -#define OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_RESPONSE_INTERFACE_H - -#include "iremote_broker.h" - -namespace OHOS { -namespace AppExecFwk { -class IAbilityDebugResponse : public IRemoteBroker { -public: - DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.AbilityDebugResponse"); - - /** - * @brief Set ability attach debug flag to ability manager service. - * @param tokens The token of ability token. - */ - virtual void OnAbilitysDebugStarted(const std::vector> &tokens) = 0; - - /** - * @brief Cancel ability attach debug flag to ability manager service. - * @param tokens The token of ability token. - */ - virtual void OnAbilitysDebugStoped(const std::vector> &tokens) = 0; - - /** - * @brief Change ability assert debug flag. - * @param tokens The token of ability records. - * @param isAssertDebug Assert debug flag. - */ - virtual void OnAbilitysAssertDebugChange(const std::vector> &tokens, bool isAssertDebug) = 0; - - enum class Message { - ON_ABILITYS_DEBUG_STARTED = 0, - ON_ABILITYS_DEBUG_STOPED, - ON_ABILITYS_ASSERT_DEBUG, - }; -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_RESPONSE_INTERFACE_H diff --git a/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_proxy.h b/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_proxy.h deleted file mode 100644 index 1bdac574de5..00000000000 --- a/interfaces/inner_api/app_manager/include/appmgr/ability_debug_response_proxy.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_RESPONSE_PROXY_H -#define OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_RESPONSE_PROXY_H - -#include "ability_debug_response_interface.h" -#include "iremote_object.h" -#include "iremote_proxy.h" - -namespace OHOS { -namespace AppExecFwk { -class AbilityDebugResponseProxy : public IRemoteProxy { -public: - explicit AbilityDebugResponseProxy(const sptr &impl); - virtual ~AbilityDebugResponseProxy() = default; - - /** - * @brief Set ability attach debug flag through proxy project. - * @param tokens The token of ability token. - */ - void OnAbilitysDebugStarted(const std::vector> &tokens) override; - - /** - * @brief Cancel ability attach debug flag through proxy project. - * @param tokens The token of ability token. - */ - void OnAbilitysDebugStoped(const std::vector> &tokens) override; - - /** - * @brief Change ability assert debug flag. - * @param tokens The token of ability records. - * @param isAssertDebug Assert debug flag. - */ - void OnAbilitysAssertDebugChange(const std::vector> &tokens, bool isAssertDebug) override; - -private: - bool WriteInterfaceToken(MessageParcel &data); - void SendRequest(const IAbilityDebugResponse::Message &message, const std::vector> &tokens); - static inline BrokerDelegator delegator_; -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_RESPONSE_PROXY_H diff --git a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h index d919a230212..2df1661f0b0 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h +++ b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h @@ -16,9 +16,9 @@ #ifndef OHOS_ABILITY_RUNTIME_AMS_MGR_INTERFACE_H #define OHOS_ABILITY_RUNTIME_AMS_MGR_INTERFACE_H -#include "ability_debug_response_interface.h" +#include "iability_debug_response.h" #include "ability_info.h" -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" #include "app_record_id.h" #include "application_info.h" #include "configuration.h" @@ -26,8 +26,8 @@ #include "iremote_broker.h" #include "iremote_object.h" #include "istart_specified_ability_response.h" +#include "iuser_callback.h" #include "running_process_info.h" -#include "user_callback.h" namespace OHOS { namespace AbilityRuntime { diff --git a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h index fec486a478f..411dd010e6b 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h +++ b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h @@ -17,7 +17,7 @@ #define OHOS_ABILITY_RUNTIME_AMS_MGR_PROXY_H #include "ams_mgr_interface.h" -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" #include "iremote_proxy.h" namespace OHOS { diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_proxy.h b/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_proxy.h deleted file mode 100644 index a309079a938..00000000000 --- a/interfaces/inner_api/app_manager/include/appmgr/app_debug_listener_proxy.h +++ /dev/null @@ -1,49 +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 OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_PROXY_H -#define OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_PROXY_H - -#include "app_debug_info.h" -#include "app_debug_listener_interface.h" -#include "iremote_proxy.h" - -namespace OHOS { -namespace AppExecFwk { -class AppDebugListenerProxy : public IRemoteProxy { -public: - explicit AppDebugListenerProxy(const sptr &impl); - virtual ~AppDebugListenerProxy() = default; - - /** - * @brief Notification of application information registered in listening and debugging mode. - * @param tokens The app info of app running record. - */ - void OnAppDebugStarted(const std::vector &debugInfos) override; - - /** - * @brief Notification of application information registered in listening and remove debug mode. - * @param tokens The app info of app running record. - */ - void OnAppDebugStoped(const std::vector &debugInfos) override; - -private: - bool WriteInterfaceToken(MessageParcel &data); - void SendRequest(const IAppDebugListener::Message &message, const std::vector &debugInfos); - static inline BrokerDelegator delegator_; -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_APP_DEBUG_LISTENER_PROXY_H diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h b/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h index 3a5e83250bc..5eec5d778fb 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h +++ b/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h @@ -16,9 +16,7 @@ #ifndef OHOS_ABILITY_RUNTIME_APP_MGR_CLIENT_H #define OHOS_ABILITY_RUNTIME_APP_MGR_CLIENT_H -#include "ability_debug_response_interface.h" #include "ability_info.h" -#include "app_debug_listener_interface.h" #include "app_malloc_info.h" #include "app_mem_info.h" #include "app_mgr_constants.h" @@ -27,6 +25,8 @@ #include "application_info.h" #include "bundle_info.h" #include "fault_data.h" +#include "iability_debug_response.h" +#include "iapp_debug_listener.h" #include "iapplication_state_observer.h" #include "iapp_state_callback.h" #include "iconfiguration_observer.h" diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_mgr_interface.h b/interfaces/inner_api/app_manager/include/appmgr/app_mgr_interface.h index 78c33ca8ff1..f0d1dbfabbf 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_mgr_interface.h +++ b/interfaces/inner_api/app_manager/include/appmgr/app_mgr_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 @@ -450,7 +450,7 @@ public: /** * UpdateConfigurationForBackgroundApp - * + * * @param appInfos Background application information. * @param policy Update policy. * @param userId configuration for the user diff --git a/interfaces/inner_api/app_manager/include/appmgr/istart_specified_ability_response.h b/interfaces/inner_api/app_manager/include/appmgr/istart_specified_ability_response.h deleted file mode 100644 index 0777f67ee1d..00000000000 --- a/interfaces/inner_api/app_manager/include/appmgr/istart_specified_ability_response.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2022 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 OHOS_ABILITY_RUNTIME_ISTART_SPECIFIED_ABILITY_RESPONSE_H -#define OHOS_ABILITY_RUNTIME_ISTART_SPECIFIED_ABILITY_RESPONSE_H - -#include "iremote_broker.h" -#include "iremote_object.h" -#include "want.h" - -namespace OHOS { -namespace AppExecFwk { -class IStartSpecifiedAbilityResponse : public IRemoteBroker { -public: - DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.startSpecifiedAbilityResponse"); - - /** - * @brief called when the module's onAcceptWant done to notify ability mgr to continue - * @param want request param being accepted - * @param flag specified flag return by application - * @param requestId a number represents a request - */ - virtual void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) = 0; - - /** - * @brief called when the module's onAcceptWant happens time out - * @param requestId a number represents a request - */ - virtual void OnTimeoutResponse(int32_t requestId) = 0; - - virtual void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) = 0; - - virtual void OnNewProcessRequestTimeoutResponse(int32_t requestId) = 0; - - virtual void OnStartSpecifiedFailed(int32_t requestId) {}; - - enum Message { - ON_ACCEPT_WANT_RESPONSE = 0, - ON_TIMEOUT_RESPONSE, - ON_NEW_PROCESS_REQUEST_RESPONSE, - ON_NEW_PROCESS_REQUEST_TIMEOUT_RESPONSE, - ON_START_SPECIFIED_FAILED - }; -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_ISTART_SPECIFIED_ABILITY_RESPONSE_H diff --git a/interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_proxy.h b/interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_proxy.h deleted file mode 100644 index bf2037afc01..00000000000 --- a/interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_proxy.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2022-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 OHOS_ABILITY_RUNTIME_START_SPECIFIED_ABILITY_RESPONSE_PROXY_H -#define OHOS_ABILITY_RUNTIME_START_SPECIFIED_ABILITY_RESPONSE_PROXY_H - -#include "iremote_proxy.h" -#include "istart_specified_ability_response.h" -namespace OHOS { -namespace AppExecFwk { -class StartSpecifiedAbilityResponseProxy : public IRemoteProxy { -public: - explicit StartSpecifiedAbilityResponseProxy(const sptr &impl); - virtual ~StartSpecifiedAbilityResponseProxy() = default; - - /** - * @brief called when the module's onAcceptWant done to notify ability mgr to continue - * @param want request param being accepted - * @param flag specified flag return by application - * @param requestId a number represents a request - */ - virtual void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, - int32_t requestId) override; - - /** - * @brief called when the module's onAcceptWant happens time out - * @param requestId a number represents a request - */ - virtual void OnTimeoutResponse(int32_t requestId) override; - - virtual void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId = 0) override; - - virtual void OnNewProcessRequestTimeoutResponse(int32_t requestId) override; - - virtual void OnStartSpecifiedFailed(int32_t requestId) override; - -private: - bool WriteInterfaceToken(MessageParcel &data); - static inline BrokerDelegator delegator_; - int32_t SendTransactCmd(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option); -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_START_SPECIFIED_ABILITY_RESPONSE_PROXY_H diff --git a/interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_stub.h b/interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_stub.h deleted file mode 100644 index 041320de260..00000000000 --- a/interfaces/inner_api/app_manager/include/appmgr/start_specified_ability_response_stub.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2022 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 OHOS_ABILITY_RUNTIME_START_SPECIFIED_ABILITY_RESPONSE_STUB_H -#define OHOS_ABILITY_RUNTIME_START_SPECIFIED_ABILITY_RESPONSE_STUB_H - -#include "iremote_stub.h" -#include "nocopyable.h" -#include "string_ex.h" -#include "istart_specified_ability_response.h" - -namespace OHOS { -namespace AppExecFwk { -class StartSpecifiedAbilityResponseStub : public IRemoteStub { -public: - StartSpecifiedAbilityResponseStub() = default; - virtual ~StartSpecifiedAbilityResponseStub() = default; - - virtual int OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; - -private: - int32_t HandleOnAcceptWantResponse(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnTimeoutResponse(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnNewProcessRequestResponse(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnNewProcessRequestTimeoutResponse(MessageParcel &data, MessageParcel &reply); - int32_t HandleOnStartSpecifiedFailed(MessageParcel &data, MessageParcel &reply); - - DISALLOW_COPY_AND_MOVE(StartSpecifiedAbilityResponseStub); -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_START_SPECIFIED_ABILITY_RESPONSE_STUB_H diff --git a/interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_proxy.cpp b/interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_proxy.cpp deleted file mode 100644 index 5736f1b596c..00000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_proxy.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 "ability_debug_response_proxy.h" - -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" - -namespace OHOS { -namespace AppExecFwk { -namespace { -constexpr int32_t CYCLE_LIMIT_MIN = 0; -constexpr int32_t CYCLE_LIMIT_MAX = 1000; -} -AbilityDebugResponseProxy::AbilityDebugResponseProxy( - const sptr &impl) : IRemoteProxy(impl) -{} - -bool AbilityDebugResponseProxy::WriteInterfaceToken(MessageParcel &data) -{ - if (!data.WriteInterfaceToken(AbilityDebugResponseProxy::GetDescriptor())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write token failed"); - return false; - } - return true; -} - -void AbilityDebugResponseProxy::OnAbilitysDebugStarted(const std::vector> &tokens) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - SendRequest(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STARTED, tokens); -} - -void AbilityDebugResponseProxy::OnAbilitysDebugStoped(const std::vector> &tokens) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - SendRequest(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STOPED, tokens); -} - -void AbilityDebugResponseProxy::OnAbilitysAssertDebugChange( - const std::vector> &tokens, bool isAssertDebug) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - MessageParcel data; - if (!WriteInterfaceToken(data)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write token failed"); - return; - } - - if (tokens.size() <= CYCLE_LIMIT_MIN || tokens.size() > CYCLE_LIMIT_MAX || - !data.WriteInt32(tokens.size())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data size failed"); - return; - } - - for (const auto &item : tokens) { - if (!data.WriteRemoteObject(item)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write token failed"); - return; - } - } - - if (!data.WriteBool(isAssertDebug)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write flag failed"); - return; - } - - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "null remote"); - return; - } - - MessageParcel reply; - MessageOption option; - auto ret = remote->SendRequest(static_cast(Message::ON_ABILITYS_ASSERT_DEBUG), data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGE(AAFwkTag::APPMGR, "SendRequest err: %{public}d", ret); - } -} - -void AbilityDebugResponseProxy::SendRequest( - const IAbilityDebugResponse::Message &message, const std::vector> &tokens) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - MessageParcel data; - if (!WriteInterfaceToken(data)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write token failed"); - return; - } - - if (tokens.size() <= CYCLE_LIMIT_MIN || tokens.size() > CYCLE_LIMIT_MAX || - !data.WriteInt32(tokens.size())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data size failed"); - return; - } - - for (auto iter = tokens.begin(); iter != tokens.end(); iter++) { - if (!data.WriteRemoteObject(iter->GetRefPtr())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write token failed"); - return; - } - } - - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "null remote"); - return; - } - - MessageParcel reply; - MessageOption option(MessageOption::TF_SYNC); - auto ret = remote->SendRequest(static_cast(message), data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGE(AAFwkTag::APPMGR, "SendRequest err: %{public}d", ret); - } -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_stub.cpp b/interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_stub.cpp deleted file mode 100644 index daf6a577ae8..00000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/ability_debug_response_stub.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 "ability_debug_response_stub.h" - -#include "appexecfwk_errors.h" -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" -#include "iremote_object.h" - -namespace OHOS { -namespace AppExecFwk { -namespace { -constexpr int32_t CYCLE_LIMIT_MIN = 0; -constexpr int32_t CYCLE_LIMIT_MAX = 1000; -} -AbilityDebugResponseStub::AbilityDebugResponseStub() {} - -AbilityDebugResponseStub::~AbilityDebugResponseStub() {} - -int32_t AbilityDebugResponseStub::HandleOnAbilitysDebugStarted(MessageParcel &data, MessageParcel &reply) -{ - auto tokenSize = data.ReadInt32(); - if (tokenSize <= CYCLE_LIMIT_MIN || tokenSize > CYCLE_LIMIT_MAX) { - TAG_LOGE(AAFwkTag::APPMGR, "Token size exceeds limit"); - return ERR_INVALID_DATA; - } - - std::vector> tokens; - for (int32_t index = 0; index < tokenSize; index++) { - auto token = data.ReadRemoteObject(); - if (token == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "null token"); - return ERR_INVALID_DATA; - } - tokens.push_back(token); - } - OnAbilitysDebugStarted(tokens); - return NO_ERROR; -} - -int32_t AbilityDebugResponseStub::HandleOnAbilitysDebugStoped(MessageParcel &data, MessageParcel &reply) -{ - auto tokenSize = data.ReadInt32(); - if (tokenSize <= CYCLE_LIMIT_MIN || tokenSize > CYCLE_LIMIT_MAX) { - TAG_LOGE(AAFwkTag::APPMGR, "Token size exceeds limit"); - return ERR_INVALID_DATA; - } - - std::vector> tokens; - for (int32_t index = 0; index < tokenSize; index++) { - auto token = data.ReadRemoteObject(); - if (token == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "null token"); - return ERR_INVALID_DATA; - } - tokens.push_back(token); - } - OnAbilitysDebugStoped(tokens); - return NO_ERROR; -} - -int32_t AbilityDebugResponseStub::HandleOnAbilitysAssertDebugChange(MessageParcel &data, MessageParcel &reply) -{ - auto tokenSize = data.ReadInt32(); - if (tokenSize <= CYCLE_LIMIT_MIN || tokenSize > CYCLE_LIMIT_MAX) { - TAG_LOGE(AAFwkTag::APPMGR, "Token size exceeds limit"); - return ERR_INVALID_DATA; - } - - std::vector> tokens; - for (int32_t index = 0; index < tokenSize; index++) { - auto token = data.ReadRemoteObject(); - if (token == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "null token"); - return ERR_INVALID_DATA; - } - tokens.push_back(token); - } - auto isAssertDebug = data.ReadBool(); - OnAbilitysAssertDebugChange(tokens, isAssertDebug); - return NO_ERROR; -} - -int AbilityDebugResponseStub::OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) -{ - TAG_LOGD(AAFwkTag::APPMGR, "code: %{public}u, flags: %{public}d", code, option.GetFlags()); - std::u16string descriptor = AbilityDebugResponseStub::GetDescriptor(); - std::u16string remoteDescriptor = data.ReadInterfaceToken(); - if (descriptor != remoteDescriptor) { - TAG_LOGE(AAFwkTag::APPMGR, "invalid descriptor"); - return ERR_INVALID_STATE; - } - - switch (code) { - case static_cast(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STARTED): - return HandleOnAbilitysDebugStarted(data, reply); - case static_cast(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STOPED): - return HandleOnAbilitysDebugStoped(data, reply); - } - - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/interfaces/inner_api/app_manager/src/appmgr/ams_mgr_stub.cpp b/interfaces/inner_api/app_manager/src/appmgr/ams_mgr_stub.cpp index 4fc28df4288..33684654877 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/ams_mgr_stub.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/ams_mgr_stub.cpp @@ -16,12 +16,12 @@ #include "ams_mgr_stub.h" #include "ability_manager_errors.h" #include "ability_info.h" -#include "app_debug_listener_interface.h" #include "app_mgr_proxy.h" #include "app_scheduler_interface.h" #include "appexecfwk_errors.h" #include "hilog_tag_wrapper.h" #include "hitrace_meter.h" +#include "iapp_debug_listener.h" #include "iapp_state_callback.h" #include "ipc_skeleton.h" #include "ipc_types.h" diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_proxy.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_proxy.cpp deleted file mode 100644 index fc271be274a..00000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_proxy.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 "app_debug_listener_proxy.h" - -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" - -namespace OHOS { -namespace AppExecFwk { -namespace { -constexpr int32_t CYCLE_LIMIT_MIN = 0; -constexpr int32_t CYCLE_LIMIT_MAX = 1000; -} -AppDebugListenerProxy::AppDebugListenerProxy( - const sptr &impl) : IRemoteProxy(impl) -{} - -bool AppDebugListenerProxy::WriteInterfaceToken(MessageParcel &data) -{ - if (!data.WriteInterfaceToken(AppDebugListenerProxy::GetDescriptor())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write interface token failed."); - return false; - } - return true; -} - -void AppDebugListenerProxy::OnAppDebugStarted(const std::vector &debugInfos) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - SendRequest(IAppDebugListener::Message::ON_APP_DEBUG_STARTED, debugInfos); -} - -void AppDebugListenerProxy::OnAppDebugStoped(const std::vector &debugInfos) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - SendRequest(IAppDebugListener::Message::ON_APP_DEBUG_STOPED, debugInfos); -} - -void AppDebugListenerProxy::SendRequest( - const IAppDebugListener::Message &message, const std::vector &debugInfos) -{ - MessageParcel data; - if (!WriteInterfaceToken(data)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write interface token failed."); - return; - } - - if (debugInfos.size() <= CYCLE_LIMIT_MIN || debugInfos.size() > CYCLE_LIMIT_MAX || - !data.WriteInt32(debugInfos.size())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write debug info size failed."); - return; - } - for (auto &debugInfo : debugInfos) { - if (!data.WriteParcelable(&debugInfo)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write debug info failed."); - return; - } - }; - - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Remote is nullptr."); - return; - } - - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - int32_t ret = remote->SendRequest(static_cast(message), data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGE(AAFwkTag::APPMGR, "SendRequest is failed, error code: %{public}d", ret); - } -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_stub.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_stub.cpp deleted file mode 100644 index ae20e2535b8..00000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/app_debug_listener_stub.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2023-2024 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 "app_debug_listener_stub.h" - -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" -#include "iremote_object.h" - -namespace OHOS { -namespace AppExecFwk { -namespace { -constexpr int32_t CYCLE_LIMIT_MIN = 0; -constexpr int32_t CYCLE_LIMIT_MAX = 1000; -} -AppDebugListenerStub::AppDebugListenerStub() {} - -AppDebugListenerStub::~AppDebugListenerStub() {} - -int AppDebugListenerStub::OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) -{ - TAG_LOGD(AAFwkTag::APPMGR, "code = %{public}u, flags= %{public}d", code, option.GetFlags()); - std::u16string descriptor = AppDebugListenerStub::GetDescriptor(); - std::u16string remoteDescriptor = data.ReadInterfaceToken(); - if (descriptor != remoteDescriptor) { - TAG_LOGE(AAFwkTag::APPMGR, "Local descriptor is not equal to remote."); - return ERR_INVALID_STATE; - } - - switch (code) { - case static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STARTED): - return HandleOnAppDebugStarted(data, reply); - case static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STOPED): - return HandleOnAppDebugStoped(data, reply); - } - - TAG_LOGD(AAFwkTag::APPMGR, "AppDebugListenerStub::OnRemoteRequest end"); - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); -} - -int32_t AppDebugListenerStub::HandleOnAppDebugStarted(MessageParcel &data, MessageParcel &reply) -{ - auto infoSize = data.ReadInt32(); - if (infoSize <= CYCLE_LIMIT_MIN || infoSize > CYCLE_LIMIT_MAX) { - TAG_LOGE(AAFwkTag::APPMGR, "Token size exceeds limit."); - return ERR_INVALID_DATA; - } - - std::vector appDebugInfos; - for (int32_t index = 0; index < infoSize; index++) { - std::unique_ptr appDebugInfo(data.ReadParcelable()); - if (appDebugInfo == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Read app debug infos failed."); - return ERR_INVALID_DATA; - } - appDebugInfos.emplace_back(*appDebugInfo); - } - - OnAppDebugStarted(appDebugInfos); - return NO_ERROR; -} - -int32_t AppDebugListenerStub::HandleOnAppDebugStoped(MessageParcel &data, MessageParcel &reply) -{ - auto infoSize = data.ReadInt32(); - if (infoSize <= CYCLE_LIMIT_MIN || infoSize > CYCLE_LIMIT_MAX) { - TAG_LOGE(AAFwkTag::APPMGR, "Token size exceeds limit."); - return ERR_INVALID_DATA; - } - - std::vector appDebugInfos; - for (int32_t index = 0; index < infoSize; index++) { - std::unique_ptr appDebugInfo(data.ReadParcelable()); - if (appDebugInfo == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Read app debug infos failed."); - return ERR_INVALID_DATA; - } - appDebugInfos.emplace_back(*appDebugInfo); - } - - OnAppDebugStoped(appDebugInfos); - return NO_ERROR; -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_proxy.cpp b/interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_proxy.cpp deleted file mode 100644 index 024dfee1d07..00000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_proxy.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2022-2024 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 "start_specified_ability_response_proxy.h" -#include "ipc_types.h" -#include "hilog_tag_wrapper.h" - -namespace OHOS { -namespace AppExecFwk { -StartSpecifiedAbilityResponseProxy::StartSpecifiedAbilityResponseProxy(const sptr &impl) - : IRemoteProxy(impl) -{} - -bool StartSpecifiedAbilityResponseProxy::WriteInterfaceToken(MessageParcel &data) -{ - if (!data.WriteInterfaceToken(StartSpecifiedAbilityResponseProxy::GetDescriptor())) { - TAG_LOGE(AAFwkTag::APPMGR, "write interface token failed"); - return false; - } - return true; -} - -void StartSpecifiedAbilityResponseProxy::OnAcceptWantResponse( - const AAFwk::Want &want, const std::string &flag, int32_t requestId) -{ - TAG_LOGD(AAFwkTag::APPMGR, "On accept want by proxy."); - MessageParcel data; - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - if (!WriteInterfaceToken(data)) { - return; - } - if (!data.WriteParcelable(&want) || !data.WriteString(flag) || - !data.WriteInt32(requestId)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data failed."); - return; - } - - int32_t ret = SendTransactCmd( - static_cast(IStartSpecifiedAbilityResponse::Message::ON_ACCEPT_WANT_RESPONSE), data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGW(AAFwkTag::APPMGR, "SendRequest is failed, error code: %{public}d", ret); - } -} - -void StartSpecifiedAbilityResponseProxy::OnTimeoutResponse(int32_t requestId) -{ - TAG_LOGD(AAFwkTag::APPMGR, "On timeout response by proxy."); - MessageParcel data; - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - if (!WriteInterfaceToken(data)) { - return; - } - if (!data.WriteInt32(requestId)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data failed."); - return; - } - - int32_t ret = SendTransactCmd(static_cast( - IStartSpecifiedAbilityResponse::Message::ON_TIMEOUT_RESPONSE), data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGW(AAFwkTag::APPMGR, "SendRequest is failed, error code: %{public}d", ret); - } -} - -int32_t StartSpecifiedAbilityResponseProxy::SendTransactCmd(uint32_t code, MessageParcel &data, - MessageParcel &reply, MessageOption &option) -{ - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Remote is nullptr."); - return ERR_NULL_OBJECT; - } - - return remote->SendRequest(code, data, reply, option); -} - -void StartSpecifiedAbilityResponseProxy::OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) -{ - TAG_LOGD(AAFwkTag::APPMGR, "On satrt specified process response by proxy."); - MessageParcel data; - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - if (!WriteInterfaceToken(data)) { - return; - } - if (!data.WriteString(flag) || !data.WriteInt32(requestId)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data failed."); - return; - } - - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Remote is nullptr."); - return; - } - int32_t ret = remote->SendRequest( - static_cast(IStartSpecifiedAbilityResponse::Message::ON_NEW_PROCESS_REQUEST_RESPONSE), - data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGW(AAFwkTag::APPMGR, "SendRequest is failed, error code: %{public}d", ret); - } -} - -void StartSpecifiedAbilityResponseProxy::OnNewProcessRequestTimeoutResponse(int32_t requestId) -{ - TAG_LOGD(AAFwkTag::APPMGR, "On start specified process timeout response by proxy."); - MessageParcel data; - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - if (!WriteInterfaceToken(data)) { - return; - } - if (data.WriteInt32(requestId)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data failed."); - return; - } - - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Remote is nullptr."); - return; - } - int32_t ret = remote->SendRequest(static_cast( - IStartSpecifiedAbilityResponse::Message::ON_NEW_PROCESS_REQUEST_TIMEOUT_RESPONSE), - data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGW(AAFwkTag::APPMGR, "SendRequest is failed, error code: %{public}d", ret); - } -} - -void StartSpecifiedAbilityResponseProxy::OnStartSpecifiedFailed(int32_t requestId) -{ - MessageParcel data; - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - if (!WriteInterfaceToken(data)) { - return; - } - if (!data.WriteInt32(requestId)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write data failed."); - return; - } - - int32_t ret = SendTransactCmd( - static_cast(IStartSpecifiedAbilityResponse::Message::ON_START_SPECIFIED_FAILED), data, reply, option); - if (ret != NO_ERROR) { - TAG_LOGW(AAFwkTag::APPMGR, "SendRequest is failed, error code: %{public}d", ret); - } -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_stub.cpp b/interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_stub.cpp deleted file mode 100644 index 690da42b84a..00000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/start_specified_ability_response_stub.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2022-2024 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 "start_specified_ability_response_stub.h" -#include "appexecfwk_errors.h" -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" -#include "iremote_object.h" - -namespace OHOS { -namespace AppExecFwk { -int32_t StartSpecifiedAbilityResponseStub::HandleOnAcceptWantResponse(MessageParcel &data, MessageParcel &reply) -{ - AAFwk::Want *want = data.ReadParcelable(); - if (want == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "want is nullptr"); - return ERR_INVALID_VALUE; - } - - auto flag = Str16ToStr8(data.ReadString16()); - OnAcceptWantResponse(*want, flag, data.ReadInt32()); - delete want; - return NO_ERROR; -} - -int32_t StartSpecifiedAbilityResponseStub::HandleOnTimeoutResponse(MessageParcel &data, MessageParcel &reply) -{ - OnTimeoutResponse(data.ReadInt32()); - return NO_ERROR; -} - -int32_t StartSpecifiedAbilityResponseStub::HandleOnNewProcessRequestResponse(MessageParcel &data, MessageParcel &reply) -{ - auto flag = Str16ToStr8(data.ReadString16()); - OnNewProcessRequestResponse(flag, data.ReadInt32()); - return NO_ERROR; -} - -int32_t StartSpecifiedAbilityResponseStub::HandleOnNewProcessRequestTimeoutResponse(MessageParcel &data, - MessageParcel &reply) -{ - OnNewProcessRequestTimeoutResponse(data.ReadInt32()); - return NO_ERROR; -} - -int32_t StartSpecifiedAbilityResponseStub::HandleOnStartSpecifiedFailed(MessageParcel &data, - MessageParcel &reply) -{ - OnStartSpecifiedFailed(data.ReadInt32()); - return NO_ERROR; -} - -int StartSpecifiedAbilityResponseStub::OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) -{ - TAG_LOGI(AAFwkTag::APPMGR, "StartSpecifiedAbilityResponseStub::OnReceived, code = %{public}u, flags= %{public}d.", - code, option.GetFlags()); - std::u16string descriptor = StartSpecifiedAbilityResponseStub::GetDescriptor(); - std::u16string remoteDescriptor = data.ReadInterfaceToken(); - if (descriptor != remoteDescriptor) { - TAG_LOGE(AAFwkTag::APPMGR, "local descriptor is not equal to remote"); - return ERR_INVALID_STATE; - } - - switch (code) { - case Message::ON_ACCEPT_WANT_RESPONSE: return HandleOnAcceptWantResponse(data, reply); - case Message::ON_TIMEOUT_RESPONSE: return HandleOnTimeoutResponse(data, reply); - case Message::ON_NEW_PROCESS_REQUEST_RESPONSE: return HandleOnNewProcessRequestResponse(data, reply); - case Message::ON_NEW_PROCESS_REQUEST_TIMEOUT_RESPONSE: - return HandleOnNewProcessRequestTimeoutResponse(data, reply); - case Message::ON_START_SPECIFIED_FAILED: return HandleOnStartSpecifiedFailed(data, reply); - default: return IPCObjectStub::OnRemoteRequest(code, data, reply, option); - } -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/interfaces/inner_api/wantagent/BUILD.gn b/interfaces/inner_api/wantagent/BUILD.gn index 046af722829..c9656d1558f 100644 --- a/interfaces/inner_api/wantagent/BUILD.gn +++ b/interfaces/inner_api/wantagent/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 @@ -43,6 +43,10 @@ config("wantagent_innerkits_public_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", ] + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] } ohos_shared_library("wantagent_innerkits") { diff --git a/services/abilitymgr/BUILD.gn b/services/abilitymgr/BUILD.gn index 110c0850362..c87128b77fb 100644 --- a/services/abilitymgr/BUILD.gn +++ b/services/abilitymgr/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 @@ -64,7 +64,7 @@ config("abilityms_config") { "${ability_runtime_path}/utils/global/time/include", "${ability_runtime_utils_path}/server/constant", ] - + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config" ] defines = [] if (ability_command_for_test) { diff --git a/services/abilitymgr/abilitymgr.gni b/services/abilitymgr/abilitymgr.gni index 3f646c121f6..398c8a9c216 100644 --- a/services/abilitymgr/abilitymgr.gni +++ b/services/abilitymgr/abilitymgr.gni @@ -80,7 +80,6 @@ abilityms_files = [ "src/ui_extension_record/ui_extension_record_factory.cpp", "src/screen_lock/unlock_screen_manager.cpp", "src/start_options.cpp", - "src/user_callback_proxy.cpp", "src/call_container.cpp", "src/call_record.cpp", "src/inner_mission_info.cpp", diff --git a/services/abilitymgr/include/ability_debug_deal.h b/services/abilitymgr/include/ability_debug_deal.h index 13e446b090b..64dc7d60637 100644 --- a/services/abilitymgr/include/ability_debug_deal.h +++ b/services/abilitymgr/include/ability_debug_deal.h @@ -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 @@ -16,8 +16,8 @@ #ifndef OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_DEAL_H #define OHOS_ABILITY_RUNTIME_ABILITY_DEBUG_DEAL_H -#include "ability_debug_response_interface.h" #include "ability_debug_response_stub.h" +#include "iability_debug_response.h" namespace OHOS { namespace AAFwk { @@ -60,9 +60,9 @@ public: virtual ~AbilityDebugResponse() = default; private: - void OnAbilitysDebugStarted(const std::vector> &tokens) override; - void OnAbilitysDebugStoped(const std::vector> &tokens) override; - void OnAbilitysAssertDebugChange(const std::vector> &tokens, bool isAssertDebug) override; + ErrCode OnAbilitysDebugStarted(const std::vector> &tokens) override; + ErrCode OnAbilitysDebugStoped(const std::vector> &tokens) override; + ErrCode OnAbilitysAssertDebugChange(const std::vector> &tokens, bool isAssertDebug) override; std::weak_ptr abilityDebugDeal_; }; diff --git a/services/abilitymgr/include/ability_manager_service.h b/services/abilitymgr/include/ability_manager_service.h index 2f3e8026390..ded50025797 100644 --- a/services/abilitymgr/include/ability_manager_service.h +++ b/services/abilitymgr/include/ability_manager_service.h @@ -37,7 +37,6 @@ #include "ability_keep_alive_service.h" #include "ability_start_with_wait_observer_utils.h" #include "ams_configuration_parameter.h" -#include "app_debug_listener_interface.h" #include "app_exit_reason_helper.h" #include "app_mgr_interface.h" #include "app_scheduler.h" @@ -52,6 +51,7 @@ #include "event_report.h" #include "free_install_manager.h" #include "iacquire_share_data_callback_interface.h" +#include "iapp_debug_listener.h" #include "interceptor/ability_interceptor_executer.h" #include "iremote_object.h" #include "mission_list_manager_interface.h" @@ -2172,7 +2172,7 @@ protected: int32_t GetCollaboratorType(const std::string &codePath) const; int32_t KillProcessForCollaborator(int32_t collaboratorType, const std::string &bundleName, int32_t userId); - + /** * Check if Caller is allowed to start AppServiceExtension(Stage). * @@ -2784,9 +2784,9 @@ private: ErrCode IntentOpenLinkInner(const std::shared_ptr ¶m, AbilityRuntime::ExtractInsightIntentGenericInfo &linkInfo, const int32_t userId); - + AbilityRuntime::ExtractInsightIntentGenericInfo GetInsightIntentGenericInfo(const InsightIntentExecuteParam ¶m); - + void CombinLinkInfo( const std::vector ¶mMappings, std::string &uri, AAFwk::Want &want); diff --git a/services/abilitymgr/include/app_scheduler.h b/services/abilitymgr/include/app_scheduler.h index b2de5a39511..e1eb97bf0de 100644 --- a/services/abilitymgr/include/app_scheduler.h +++ b/services/abilitymgr/include/app_scheduler.h @@ -19,20 +19,20 @@ #include #include -#include "ability_debug_response_interface.h" +#include "iability_debug_response.h" #include "ability_info.h" #include "ability_manager_client.h" -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" #include "application_info.h" #include "appmgr/app_mgr_client.h" #include "appmgr/app_state_callback_host.h" -#include "appmgr/start_specified_ability_response_stub.h" #include "bundle_info.h" #include "fault_data.h" #include "iremote_object.h" #include "refbase.h" #include "running_process_info.h" #include "singleton.h" +#include "start_specified_ability_response_stub.h" #include "system_memory_attr.h" #include "want.h" @@ -114,7 +114,7 @@ public: * @param abilityTokens abilities in died process. */ virtual void OnAppRemoteDied(const std::vector> &abilityTokens) {} - + virtual void OnStartProcessFailed(sptr token) {} virtual void OnCacheExitInfo(uint32_t accessTokenId, const AppExecFwk::RunningProcessInfo &exitInfo, @@ -127,14 +127,14 @@ public: StartSpecifiedAbilityResponse() = default; virtual ~StartSpecifiedAbilityResponse() = default; - virtual void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, + virtual ErrCode OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override; - virtual void OnTimeoutResponse(int32_t requestId) override; + virtual ErrCode OnTimeoutResponse(int32_t requestId) override; - virtual void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override; - virtual void OnNewProcessRequestTimeoutResponse(int32_t requestId) override; + virtual ErrCode OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override; + virtual ErrCode OnNewProcessRequestTimeoutResponse(int32_t requestId) override; - virtual void OnStartSpecifiedFailed(int32_t requestId) override; + virtual ErrCode OnStartSpecifiedFailed(int32_t requestId) override; }; /** diff --git a/services/abilitymgr/src/ability_debug_deal.cpp b/services/abilitymgr/src/ability_debug_deal.cpp index 9493ef44d47..236b88d2721 100644 --- a/services/abilitymgr/src/ability_debug_deal.cpp +++ b/services/abilitymgr/src/ability_debug_deal.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 @@ -74,50 +74,53 @@ void AbilityDebugDeal::OnAbilitysAssertDebugChange(const std::vector> &tokens) +ErrCode AbilityDebugResponse::OnAbilitysDebugStarted(const std::vector> &tokens) { if (tokens.empty()) { TAG_LOGW(AAFwkTag::ABILITYMGR, "tokens empty"); - return; + return ERR_ABILITY_DEBUG_EMPTY_TOKENS; } auto deal = abilityDebugDeal_.lock(); if (deal == nullptr) { TAG_LOGE(AAFwkTag::ABILITYMGR, "deal null"); - return; + return INNER_ERR; } deal->OnAbilitysDebugStarted(tokens); + return ERR_OK; } -void AbilityDebugResponse::OnAbilitysDebugStoped(const std::vector> &tokens) +ErrCode AbilityDebugResponse::OnAbilitysDebugStoped(const std::vector> &tokens) { if (tokens.empty()) { TAG_LOGW(AAFwkTag::ABILITYMGR, "tokens empty"); - return; + return ERR_ABILITY_DEBUG_EMPTY_TOKENS; } auto deal = abilityDebugDeal_.lock(); if (deal == nullptr) { TAG_LOGE(AAFwkTag::ABILITYMGR, "deal null"); - return; + return INNER_ERR; } deal->OnAbilitysDebugStoped(tokens); + return ERR_OK; } -void AbilityDebugResponse::OnAbilitysAssertDebugChange( +ErrCode AbilityDebugResponse::OnAbilitysAssertDebugChange( const std::vector> &tokens, bool isAssertDebug) { if (tokens.empty()) { TAG_LOGW(AAFwkTag::ABILITYMGR, "tokens empty"); - return; + return ERR_ABILITY_DEBUG_EMPTY_TOKENS; } auto deal = abilityDebugDeal_.lock(); if (deal == nullptr) { TAG_LOGW(AAFwkTag::ABILITYMGR, "deal null"); - return; + return INNER_ERR; } deal->OnAbilitysAssertDebugChange(tokens, isAssertDebug); + return ERR_OK; } } // namespace AAFwk } // namespace OHOS diff --git a/services/abilitymgr/src/app_scheduler.cpp b/services/abilitymgr/src/app_scheduler.cpp index d6385c53b44..d26e6d7ffe6 100644 --- a/services/abilitymgr/src/app_scheduler.cpp +++ b/services/abilitymgr/src/app_scheduler.cpp @@ -386,10 +386,11 @@ void AppScheduler::StartSpecifiedAbility(const AAFwk::Want &want, const AppExecF IN_PROCESS_CALL_WITHOUT_RET(appMgrClient_->StartSpecifiedAbility(want, abilityInfo, requestId)); } -void StartSpecifiedAbilityResponse::OnAcceptWantResponse( +ErrCode StartSpecifiedAbilityResponse::OnAcceptWantResponse( const AAFwk::Want &want, const std::string &flag, int32_t requestId) { DelayedSingleton::GetInstance()->OnAcceptWantResponse(want, flag, requestId); + return ERR_OK; } void AppScheduler::PrepareTerminateApp(const pid_t pid, const std::string &moduleName) @@ -398,9 +399,10 @@ void AppScheduler::PrepareTerminateApp(const pid_t pid, const std::string &modul IN_PROCESS_CALL_WITHOUT_RET(appMgrClient_->PrepareTerminateApp(pid, moduleName)); } -void StartSpecifiedAbilityResponse::OnTimeoutResponse(int32_t requestId) +ErrCode StartSpecifiedAbilityResponse::OnTimeoutResponse(int32_t requestId) { DelayedSingleton::GetInstance()->OnStartSpecifiedAbilityTimeoutResponse(requestId); + return ERR_OK; } void AppScheduler::StartSpecifiedProcess( @@ -410,19 +412,22 @@ void AppScheduler::StartSpecifiedProcess( IN_PROCESS_CALL_WITHOUT_RET(appMgrClient_->StartSpecifiedProcess(want, abilityInfo, requestId)); } -void StartSpecifiedAbilityResponse::OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) +ErrCode StartSpecifiedAbilityResponse::OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) { DelayedSingleton::GetInstance()->OnStartSpecifiedProcessResponse(flag, requestId); + return ERR_OK; } -void StartSpecifiedAbilityResponse::OnNewProcessRequestTimeoutResponse(int32_t requestId) +ErrCode StartSpecifiedAbilityResponse::OnNewProcessRequestTimeoutResponse(int32_t requestId) { DelayedSingleton::GetInstance()->OnStartSpecifiedProcessTimeoutResponse(requestId); + return ERR_OK; } -void StartSpecifiedAbilityResponse::OnStartSpecifiedFailed(int32_t requestId) +ErrCode StartSpecifiedAbilityResponse::OnStartSpecifiedFailed(int32_t requestId) { DelayedSingleton::GetInstance()->OnStartSpecifiedFailed(requestId); + return ERR_OK; } int AppScheduler::GetProcessRunningInfos(std::vector &info) diff --git a/services/abilitymgr/src/user_callback_proxy.cpp b/services/abilitymgr/src/user_callback_proxy.cpp deleted file mode 100644 index a94521710d7..00000000000 --- a/services/abilitymgr/src/user_callback_proxy.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2021-2024 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 "user_callback_proxy.h" - -#include "hilog_tag_wrapper.h" - -namespace OHOS { -namespace AAFwk { -void UserCallbackProxy::OnStopUserDone(int userId, int errcode) -{ - SendRequestCommon(userId, errcode, IUserCallback::UserCallbackCmd::ON_STOP_USER_DONE); -} - -void UserCallbackProxy::OnStartUserDone(int userId, int errcode) -{ - SendRequestCommon(userId, errcode, IUserCallback::UserCallbackCmd::ON_START_USER_DONE); -} - -void UserCallbackProxy::OnLogoutUserDone(int userId, int errcode) -{ - SendRequestCommon(userId, errcode, IUserCallback::UserCallbackCmd::ON_LOGOUT_USER_DONE); -} - -void UserCallbackProxy::SendRequestCommon(int userId, int errcode, IUserCallback::UserCallbackCmd cmd) -{ - MessageParcel data; - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - - TAG_LOGI(AAFwkTag::ABILITYMGR, - "UserCallbackProxy, sendrequest, cmd:%{public}d, userId:%{public}d, errcode:%{public}d", cmd, userId, errcode); - if (!data.WriteInterfaceToken(IUserCallback::GetDescriptor())) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write interface token failed"); - return; - } - - if (!data.WriteInt32(userId)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write userId error"); - return; - } - - if (!data.WriteInt32(errcode)) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "write errcode error"); - return; - } - - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "null remote object"); - return; - } - - int error = remote->SendRequest(cmd, data, reply, option); - if (error != NO_ERROR) { - TAG_LOGE(AAFwkTag::ABILITYMGR, "SendRequest fail, error: %{public}d", error); - return; - } -} -} // namespace AAFwk -} // namespace OHOS diff --git a/services/abilitymgr/src/user_callback_stub.cpp b/services/abilitymgr/src/user_callback_stub.cpp deleted file mode 100644 index fe078586ffd..00000000000 --- a/services/abilitymgr/src/user_callback_stub.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2021-2024 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 "user_callback_stub.h" - -#include "hilog_tag_wrapper.h" - -namespace OHOS { -namespace AAFwk { -UserCallbackStub::UserCallbackStub() {} - -int UserCallbackStub::OnStopUserDoneInner(MessageParcel &data, MessageParcel &reply) -{ - auto accountId = data.ReadInt32(); - auto errCode = data.ReadInt32(); - OnStopUserDone(accountId, errCode); - return NO_ERROR; -} - -int UserCallbackStub::OnStartUserDoneInner(MessageParcel &data, MessageParcel &reply) -{ - auto accountId = data.ReadInt32(); - auto errCode = data.ReadInt32(); - OnStartUserDone(accountId, errCode); - return NO_ERROR; -} - -int UserCallbackStub::OnLogoutUserDoneInner(MessageParcel &data, MessageParcel &reply) -{ - auto accountId = data.ReadInt32(); - auto errCode = data.ReadInt32(); - OnLogoutUserDone(accountId, errCode); - return NO_ERROR; -} - -int UserCallbackStub::OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) -{ - std::u16string descriptor = UserCallbackStub::GetDescriptor(); - std::u16string remoteDescriptor = data.ReadInterfaceToken(); - if (descriptor != remoteDescriptor) { - TAG_LOGI(AAFwkTag::ABILITYMGR, "local descriptor invalid"); - return ERR_INVALID_STATE; - } - - if (code < UserCallbackCmd::CMD_MAX && code >= 0) { - switch (code) { - case UserCallbackCmd::ON_STOP_USER_DONE: - return OnStopUserDoneInner(data, reply); - break; - case UserCallbackCmd::ON_START_USER_DONE: - return OnStartUserDoneInner(data, reply); - break; - case UserCallbackCmd::ON_LOGOUT_USER_DONE: - return OnLogoutUserDoneInner(data, reply); - break; - } - } - - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); -} -} // namespace AAFwk -} // namespace OHOS diff --git a/services/appmgr/include/ams_mgr_scheduler.h b/services/appmgr/include/ams_mgr_scheduler.h index 69af744e93a..28f6b3e78ff 100644 --- a/services/appmgr/include/ams_mgr_scheduler.h +++ b/services/appmgr/include/ams_mgr_scheduler.h @@ -19,7 +19,6 @@ #include "ability_info.h" #include "ability_running_record.h" #include "ams_mgr_stub.h" -#include "app_debug_listener_interface.h" #include "app_mgr_constants.h" #include "app_mgr_service_inner.h" #include "app_record_id.h" @@ -27,6 +26,7 @@ #include "app_scheduler_proxy.h" #include "appexecfwk_errors.h" #include "application_info.h" +#include "iapp_debug_listener.h" #include "if_system_ability_manager.h" #include "nocopyable.h" #include "system_ability.h" diff --git a/services/appmgr/include/app_debug_manager.h b/services/appmgr/include/app_debug_manager.h index 8da182c9428..aae9db220db 100644 --- a/services/appmgr/include/app_debug_manager.h +++ b/services/appmgr/include/app_debug_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 @@ -19,7 +19,7 @@ #include #include -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" namespace OHOS { namespace AppExecFwk { diff --git a/services/appmgr/include/app_mgr_service_inner.h b/services/appmgr/include/app_mgr_service_inner.h index 9bc66b07c2f..4f4588802e2 100644 --- a/services/appmgr/include/app_mgr_service_inner.h +++ b/services/appmgr/include/app_mgr_service_inner.h @@ -24,12 +24,11 @@ #include #include -#include "ability_debug_response_interface.h" #include "ability_foreground_state_observer_interface.h" #include "ability_info.h" #include "advanced_security_mode_manager.h" #include "app_death_recipient.h" -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" #include "app_debug_manager.h" #include "app_foreground_state_observer_interface.h" #include "app_malloc_info.h" @@ -58,6 +57,7 @@ #include "fault_data.h" #include "fd_guard.h" #include "hisysevent.h" +#include "iability_debug_response.h" #include "iapp_state_callback.h" #include "iapplication_state_observer.h" #include "iconfiguration_observer.h" @@ -81,7 +81,7 @@ #include "app_cjheap_mem_info.h" #include "running_multi_info.h" #include "multi_user_config_mgr.h" -#include "user_callback.h" +#include "iuser_callback.h" #include "native_child_notify_interface.h" namespace OHOS { diff --git a/services/appmgr/include/app_running_manager.h b/services/appmgr/include/app_running_manager.h index d92f1b5228b..061d13f2cd6 100644 --- a/services/appmgr/include/app_running_manager.h +++ b/services/appmgr/include/app_running_manager.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 @@ -22,7 +22,7 @@ #include #include "ability_info.h" -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" #include "app_jsheap_mem_info.h" #include "app_cjheap_mem_info.h" #include "app_malloc_info.h" @@ -420,7 +420,7 @@ public: int32_t RemoveUIExtensionBindItemById(int32_t uiExtensionBindAbilityId); std::shared_ptr GetAppRunningRecordByChildRecordPid(const pid_t pid); - + int32_t AssignRunningProcessInfoByAppRecord( std::shared_ptr appRecord, AppExecFwk::RunningProcessInfo &info) const; diff --git a/test/fuzztest/abilitydebugdeal_fuzzer/BUILD.gn b/test/fuzztest/abilitydebugdeal_fuzzer/BUILD.gn index f9c6a7be98b..8ddfb770b05 100644 --- a/test/fuzztest/abilitydebugdeal_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitydebugdeal_fuzzer/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -37,7 +37,6 @@ ohos_fuzztest("AbilityDebugDealFuzzTest") { "-fno-omit-frame-pointer", ] sources = [ - "${ability_runtime_innerkits_path}/app_manager/src/appmgr/ability_debug_response_stub.cpp", "${ability_runtime_services_path}/abilitymgr/src/ability_debug_deal.cpp", "abilitydebugdeal_fuzzer.cpp", ] @@ -50,6 +49,7 @@ ohos_fuzztest("AbilityDebugDealFuzzTest") { deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr:abilityms", ] diff --git a/test/fuzztest/abilitydebugresponseproxy_fuzzer/BUILD.gn b/test/fuzztest/abilitydebugresponseproxy_fuzzer/BUILD.gn index 768834e2a31..363a825f1b5 100755 --- a/test/fuzztest/abilitydebugresponseproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitydebugresponseproxy_fuzzer/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 @@ -36,7 +36,6 @@ ohos_fuzztest("AbilityDebugResponseProxyFuzzTest") { ] sources = [ - "${ability_runtime_innerkits_path}/app_manager/src/appmgr/ability_debug_response_proxy.cpp", "abilitydebugresponseproxy_fuzzer.cpp", ] @@ -48,6 +47,7 @@ ohos_fuzztest("AbilityDebugResponseProxyFuzzTest") { deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_native_path}/ability/native:auto_startup_callback", diff --git a/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp b/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp index 7840d93e675..04bd6c2cf48 100755 --- a/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp +++ b/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.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 @@ -68,16 +68,10 @@ void AbilityDebugResponseProxyFuzztest1(bool boolParam, std::string &stringParam std::shared_ptr proxy = std::make_shared(nullptr); // branch constructor MessageParcel data; - proxy->WriteInterfaceToken(data); // branch std::vector> tokens; proxy->OnAbilitysDebugStarted(tokens); // branch proxy->OnAbilitysDebugStoped(tokens); // branch proxy->OnAbilitysAssertDebugChange(tokens, boolParam); // branch - sptr token = GetFuzzAbilityToken(); - tokens.emplace_back(token); - proxy->SendRequest(static_cast(int32Param), tokens); // branch tokens no empty. - tokens.clear(); - proxy->SendRequest(static_cast(int32Param), tokens); // branch tokens empty. } bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) diff --git a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp index b09f529b4c3..25969b4b201 100644 --- a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.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 @@ -20,7 +20,6 @@ #define private public #include "ability_debug_response_proxy.h" -#include "ability_debug_response_interface.h" #undef private #include "securec.h" @@ -73,17 +72,6 @@ bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) infosProxy->OnAbilitysDebugStoped(tokens); bool isAssertDebug = *data % ENABLE; infosProxy->OnAbilitysAssertDebugChange(tokens, isAssertDebug); - MessageParcel parcels; - parcels.WriteInterfaceToken(AMSMGR_INTERFACE_TOKEN); - parcels.WriteBuffer(data, size); - parcels.RewindRead(0); - infosProxy->WriteInterfaceToken(parcels); - IAbilityDebugResponse::Message message = IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STARTED; - infosProxy->SendRequest(message, tokens); - message = IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STOPED; - infosProxy->SendRequest(message, tokens); - message = IAbilityDebugResponse::Message::ON_ABILITYS_ASSERT_DEBUG; - infosProxy->SendRequest(message, tokens); return true; } } diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp index bb28bb48cd9..cf99b6d40af 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.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 @@ -20,7 +20,6 @@ #define private public #include "app_debug_listener_proxy.h" -#include "app_debug_listener_interface.h" #undef private #include "securec.h" @@ -71,15 +70,6 @@ bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) std::vector debugInfos; infosProxy->OnAppDebugStarted(debugInfos); infosProxy->OnAppDebugStoped(debugInfos); - MessageParcel parcels; - parcels.WriteInterfaceToken(AMSMGR_INTERFACE_TOKEN); - parcels.WriteBuffer(data, size); - parcels.RewindRead(0); - infosProxy->WriteInterfaceToken(parcels); - IAppDebugListener::Message message = IAppDebugListener::Message::ON_APP_DEBUG_STARTED; - infosProxy->SendRequest(message, debugInfos); - message = IAppDebugListener::Message::ON_APP_DEBUG_STOPED; - infosProxy->SendRequest(message, debugInfos); return true; } } diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp index 2b94e21e8d6..79118353ee2 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.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 @@ -20,7 +20,6 @@ #define private public #include "app_debug_listener_stub.h" -#include "app_debug_listener_interface.h" #undef private #include "securec.h" @@ -55,8 +54,8 @@ public: virtual ~ AppDebugListenerStubFUZZ() {}; int OnRemoteRequest( uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override{ return 0; }; - void OnAppDebugStarted(const std::vector &debugInfos) override{}; - void OnAppDebugStoped(const std::vector &debugInfos) override{}; + ErrCode OnAppDebugStarted(const std::vector &debugInfos) override { return ERR_OK; }; + ErrCode OnAppDebugStoped(const std::vector &debugInfos) override { return ERR_OK; }; }; sptr GetFuzzAbilityToken() @@ -75,7 +74,7 @@ sptr GetFuzzAbilityToken() bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) { - uint32_t codeOne = static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STARTED); + uint32_t codeOne = static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED); MessageParcel parcel; parcel.WriteInterfaceToken(AMSMGR_INTERFACE_TOKEN); parcel.WriteBuffer(data, size); @@ -84,7 +83,7 @@ bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) MessageOption option; std::shared_ptr abmsOne = std::make_shared(); abmsOne->OnRemoteRequest(codeOne, parcel, reply, option); - uint32_t codeTwo = static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STOPED); + uint32_t codeTwo = static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STOPED); abmsOne->OnRemoteRequest(codeTwo, parcel, reply, option); return true; } diff --git a/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp b/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp index 11c5ff0e3f9..59a75929c1e 100644 --- a/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp +++ b/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.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 @@ -45,11 +45,9 @@ public: UserCallbackStubFuzzTest() = default; virtual ~UserCallbackStubFuzzTest() {} - void OnStopUserDone(int userId, int errcode) override - {} - void OnStartUserDone(int userId, int errcode) override {} - - void OnLogoutUserDone(int userId, int errcode) override {} + ErrCode OnStopUserDone(int userId, int errcode) override { return ERR_OK; } + ErrCode OnStartUserDone(int userId, int errcode) override { return ERR_OK; } + ErrCode OnLogoutUserDone(int userId, int errcode) override { return ERR_OK; } }; const std::u16string APPMGR_INTERFACE_TOKEN = u"ohos.aafwk.AppManager"; uint32_t GetU32Data(const char* ptr) @@ -70,8 +68,6 @@ bool DoSomethingInterestingWithMyAPI(const char *data, size_t size) MessageParcel reply; MessageOption option; backStub->OnRemoteRequest(code, dataParcel, reply, option); - backStub->OnStopUserDoneInner(dataParcel, reply); - backStub->OnStartUserDoneInner(dataParcel, reply); return true; } diff --git a/test/moduletest/app_mgr_client_test/BUILD.gn b/test/moduletest/app_mgr_client_test/BUILD.gn index 9a3c1e9e3ed..409c2699258 100644 --- a/test/moduletest/app_mgr_client_test/BUILD.gn +++ b/test/moduletest/app_mgr_client_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/mstabilitymgrservice" ohos_moduletest("app_mgr_client_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/common/include", "${ability_runtime_test_path}/mock/mock_sa_call", diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 07923eb6220..88c49ffabd1 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -14,8 +14,7 @@ import("//build/ohos.gni") import("//build/test.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") -import( - "//foundation/ability/ability_runtime/services/abilitymgr/abilitymgr.gni") +import("//foundation/ability/ability_runtime/services/abilitymgr/abilitymgr.gni") config("appmgr_test_config") { configs = [ @@ -43,8 +42,6 @@ ohos_source_set("appmgr_test_source") { "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_record_id.cpp", "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_scheduler_host.cpp", "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_scheduler_proxy.cpp", - "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_state_callback_host.cpp", - "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_state_callback_proxy.cpp", "${ability_runtime_innerkits_path}/app_manager/src/appmgr/fault_data.cpp", "${ability_runtime_innerkits_path}/app_manager/src/appmgr/native_child_notify_proxy.cpp", "${ability_runtime_innerkits_path}/app_manager/src/appmgr/native_child_notify_stub.cpp", diff --git a/test/unittest/ability_debug_response_stub_test/ability_debug_response_stub_test.cpp b/test/unittest/ability_debug_response_stub_test/ability_debug_response_stub_test.cpp index 3167b3fa20f..ad8f8f90b74 100644 --- a/test/unittest/ability_debug_response_stub_test/ability_debug_response_stub_test.cpp +++ b/test/unittest/ability_debug_response_stub_test/ability_debug_response_stub_test.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 @@ -74,7 +74,7 @@ HWTEST_F(AbilityDebugResponseStubTest, HandleOnAbilitysDebugStarted_0100, TestSi data.WriteRemoteObject(token); auto result = stub->OnRemoteRequest( - static_cast(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STARTED), data, reply, option); + static_cast(IAbilityDebugResponseIpcCode::COMMAND_ON_ABILITYS_DEBUG_STARTED), data, reply, option); EXPECT_EQ(result, NO_ERROR); testing::Mock::AllowLeak(stub); GTEST_LOG_(INFO) << "AbilityDebugResponseProxyTest_HandleOnAbilitysDebugStarted_0100 end"; @@ -103,7 +103,7 @@ HWTEST_F(AbilityDebugResponseStubTest, HandleOnAbilitysDebugStoped_0100, TestSiz data.WriteRemoteObject(token); auto result = stub->OnRemoteRequest( - static_cast(IAbilityDebugResponse::Message::ON_ABILITYS_DEBUG_STOPED), data, reply, option); + static_cast(IAbilityDebugResponseIpcCode::COMMAND_ON_ABILITYS_DEBUG_STOPED), data, reply, option); EXPECT_EQ(result, NO_ERROR); testing::Mock::AllowLeak(stub); GTEST_LOG_(INFO) << "AbilityDebugResponseProxyTest_HandleOnAbilitysDebugStoped_0100 end"; diff --git a/test/unittest/ability_debug_response_stub_test/mock_ability_debug_response_stub.h b/test/unittest/ability_debug_response_stub_test/mock_ability_debug_response_stub.h index e4a257354df..79f47778999 100644 --- a/test/unittest/ability_debug_response_stub_test/mock_ability_debug_response_stub.h +++ b/test/unittest/ability_debug_response_stub_test/mock_ability_debug_response_stub.h @@ -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 @@ -27,9 +27,9 @@ class MockAbilityDebugResponseStub : public AbilityDebugResponseStub { public: MockAbilityDebugResponseStub() {} virtual ~ MockAbilityDebugResponseStub() {} - MOCK_METHOD1(OnAbilitysDebugStarted, void(const std::vector> &tokens)); - MOCK_METHOD1(OnAbilitysDebugStoped, void(const std::vector> &tokens)); - MOCK_METHOD2(OnAbilitysAssertDebugChange, void(const std::vector> &, bool)); + MOCK_METHOD1(OnAbilitysDebugStarted, ErrCode(const std::vector> &tokens)); + MOCK_METHOD1(OnAbilitysDebugStoped, ErrCode(const std::vector> &tokens)); + MOCK_METHOD2(OnAbilitysAssertDebugChange, ErrCode(const std::vector> &, bool)); }; } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/ability_manager_client_branch_second_test/BUILD.gn b/test/unittest/ability_manager_client_branch_second_test/BUILD.gn index ccd62f0691e..100862c1c25 100644 --- a/test/unittest/ability_manager_client_branch_second_test/BUILD.gn +++ b/test/unittest/ability_manager_client_branch_second_test/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 @@ -16,7 +16,12 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") ohos_unittest("ability_manager_client_branch_second_test") { module_out_path = "ability_runtime/ability_runtime/ability_call_test" - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/ability_manager_collaborator", "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", diff --git a/test/unittest/ability_manager_client_branch_test/BUILD.gn b/test/unittest/ability_manager_client_branch_test/BUILD.gn index 44a1bc89fc6..74881e2c3b9 100644 --- a/test/unittest/ability_manager_client_branch_test/BUILD.gn +++ b/test/unittest/ability_manager_client_branch_test/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 @@ -16,7 +16,12 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") ohos_unittest("ability_manager_client_branch_test") { module_out_path = "ability_runtime/ability_runtime/ability_call_test" - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/ability_manager_collaborator", "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", diff --git a/test/unittest/ability_manager_client_branch_third_test/BUILD.gn b/test/unittest/ability_manager_client_branch_third_test/BUILD.gn index 4d464465ef5..6fcb973b301 100644 --- a/test/unittest/ability_manager_client_branch_third_test/BUILD.gn +++ b/test/unittest/ability_manager_client_branch_third_test/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 @@ -16,7 +16,12 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") ohos_unittest("ability_manager_client_branch_third_test") { module_out_path = "ability_runtime/ability_runtime/ability_call_test" - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "mock/include", "${ability_runtime_test_path}/mock/common/include", diff --git a/test/unittest/ability_manager_proxy_fourth_test/BUILD.gn b/test/unittest/ability_manager_proxy_fourth_test/BUILD.gn index 087ff4d219c..5990cc7fd56 100644 --- a/test/unittest/ability_manager_proxy_fourth_test/BUILD.gn +++ b/test/unittest/ability_manager_proxy_fourth_test/BUILD.gn @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ability_manager_proxy_fourth_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_test_path}/unittest/ability_manager_proxy_fourth_test/", diff --git a/test/unittest/ability_manager_proxy_second_test/BUILD.gn b/test/unittest/ability_manager_proxy_second_test/BUILD.gn index 75dbc33eb9b..f464df7f2c3 100644 --- a/test/unittest/ability_manager_proxy_second_test/BUILD.gn +++ b/test/unittest/ability_manager_proxy_second_test/BUILD.gn @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ability_manager_proxy_second_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_test_path}/unittest/ability_manager_proxy_second_test/", diff --git a/test/unittest/ability_manager_proxy_test/BUILD.gn b/test/unittest/ability_manager_proxy_test/BUILD.gn index a6bd65ae258..bfed377053d 100644 --- a/test/unittest/ability_manager_proxy_test/BUILD.gn +++ b/test/unittest/ability_manager_proxy_test/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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ability_manager_proxy_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_test_path}/unittest/ability_manager_proxy_test/", diff --git a/test/unittest/ability_manager_proxy_third_test/BUILD.gn b/test/unittest/ability_manager_proxy_third_test/BUILD.gn index 0d9b9756c8a..aa05a6e862b 100644 --- a/test/unittest/ability_manager_proxy_third_test/BUILD.gn +++ b/test/unittest/ability_manager_proxy_third_test/BUILD.gn @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ability_manager_proxy_third_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_test_path}/unittest/ability_manager_proxy_third_test/", diff --git a/test/unittest/ability_manager_proxy_third_test/ability_manager_proxy_third_test.cpp b/test/unittest/ability_manager_proxy_third_test/ability_manager_proxy_third_test.cpp index 1a48b715b98..79ef873b77d 100644 --- a/test/unittest/ability_manager_proxy_third_test/ability_manager_proxy_third_test.cpp +++ b/test/unittest/ability_manager_proxy_third_test/ability_manager_proxy_third_test.cpp @@ -75,10 +75,10 @@ public: MockIUserCallback() = default; virtual ~MockIUserCallback() = default; - void OnStopUserDone(int userId, int errcode) override {} - void OnStartUserDone(int userId, int errcode) override {} + ErrCode OnStopUserDone(int userId, int errcode) override { return ERR_OK; } + ErrCode OnStartUserDone(int userId, int errcode) override { return ERR_OK; } - void OnLogoutUserDone(int userId, int errcode) override {} + ErrCode OnLogoutUserDone(int userId, int errcode) override { return ERR_OK; } sptr AsObject() override { diff --git a/test/unittest/ability_manager_service_eighth_test/ability_manager_service_eighth_test.cpp b/test/unittest/ability_manager_service_eighth_test/ability_manager_service_eighth_test.cpp index 3984f0a987a..dc7301c4e64 100644 --- a/test/unittest/ability_manager_service_eighth_test/ability_manager_service_eighth_test.cpp +++ b/test/unittest/ability_manager_service_eighth_test/ability_manager_service_eighth_test.cpp @@ -59,13 +59,10 @@ public: MockIUserCallback() = default; virtual ~MockIUserCallback() = default; - void OnStopUserDone(int userId, int errcode) override - {} - void OnStartUserDone(int userId, int errcode) override - {} + ErrCode OnStopUserDone(int userId, int errcode) override { return ERR_OK; } + ErrCode OnStartUserDone(int userId, int errcode) override { return ERR_OK; } - void OnLogoutUserDone(int userId, int errcode) override - {} + ErrCode OnLogoutUserDone(int userId, int errcode) override { return ERR_OK; } sptr AsObject() override { diff --git a/test/unittest/ability_manager_service_fourteenth_test/BUILD.gn b/test/unittest/ability_manager_service_fourteenth_test/BUILD.gn index 5728c0916d6..5f76a978e62 100644 --- a/test/unittest/ability_manager_service_fourteenth_test/BUILD.gn +++ b/test/unittest/ability_manager_service_fourteenth_test/BUILD.gn @@ -176,7 +176,6 @@ ohos_unittest("ability_manager_service_fourteenth_test") { "${ability_runtime_services_path}/abilitymgr/src/ui_extension/preload_uiext_state_observer.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record_factory.cpp", - "${ability_runtime_services_path}/abilitymgr/src/user_callback_proxy.cpp", "${ability_runtime_services_path}/abilitymgr/src/user_controller.cpp", "${ability_runtime_services_path}/abilitymgr/src/user_event_handler.cpp", "${ability_runtime_services_path}/abilitymgr/src/utils/ability_event_util.cpp", diff --git a/test/unittest/ability_manager_service_thirteenth_test/BUILD.gn b/test/unittest/ability_manager_service_thirteenth_test/BUILD.gn index 0637a9d6e95..9274be657f0 100644 --- a/test/unittest/ability_manager_service_thirteenth_test/BUILD.gn +++ b/test/unittest/ability_manager_service_thirteenth_test/BUILD.gn @@ -177,7 +177,6 @@ ohos_unittest("ability_manager_service_thirteenth_test") { "${ability_runtime_services_path}/abilitymgr/src/ui_extension/preload_uiext_state_observer.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record_factory.cpp", - "${ability_runtime_services_path}/abilitymgr/src/user_callback_proxy.cpp", "${ability_runtime_services_path}/abilitymgr/src/user_controller.cpp", "${ability_runtime_services_path}/abilitymgr/src/user_event_handler.cpp", "${ability_runtime_services_path}/abilitymgr/src/utils/ability_event_util.cpp", diff --git a/test/unittest/ability_manager_service_twelfth_test/mock/include/mock_test_object.h b/test/unittest/ability_manager_service_twelfth_test/mock/include/mock_test_object.h index 215b46aa8e2..bb13da5d1da 100644 --- a/test/unittest/ability_manager_service_twelfth_test/mock/include/mock_test_object.h +++ b/test/unittest/ability_manager_service_twelfth_test/mock/include/mock_test_object.h @@ -16,16 +16,17 @@ #ifndef ABILITY_MANAGER_SERVICE_TWELFTH_TEST_MOCK_TEST_OBJECT_H #define ABILITY_MANAGER_SERVICE_TWELFTH_TEST_MOCK_TEST_OBJECT_H -#include "user_callback.h" +#include "iuser_callback.h" #include "ability_connect_callback_interface.h" +namespace OHOS { class MockIUserCallback : public OHOS::AAFwk::IUserCallback { public: MockIUserCallback() = default; virtual ~MockIUserCallback() = default; - virtual void OnStopUserDone(int userId, int errcode) override {} - virtual void OnStartUserDone(int userId, int errcode) override {} - virtual void OnLogoutUserDone(int userId, int errcode) override {} + virtual ErrCode OnStopUserDone(int userId, int errcode) override { return ERR_OK; } + virtual ErrCode OnStartUserDone(int userId, int errcode) override { return ERR_OK; } + virtual ErrCode OnLogoutUserDone(int userId, int errcode) override { return ERR_OK; } virtual OHOS::sptr AsObject() { return nullptr; @@ -44,4 +45,5 @@ public: return nullptr; } }; +} #endif // ABILITY_MANAGER_SERVICE_TWELFTH_TEST_MOCK_TEST_OBJECT_H diff --git a/test/unittest/ability_scheduler_stub_second_test/BUILD.gn b/test/unittest/ability_scheduler_stub_second_test/BUILD.gn index e37c4200bd6..fd9a1095e61 100644 --- a/test/unittest/ability_scheduler_stub_second_test/BUILD.gn +++ b/test/unittest/ability_scheduler_stub_second_test/BUILD.gn @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ability_scheduler_stub_second_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock" ] sources = [ diff --git a/test/unittest/ability_scheduler_stub_test/BUILD.gn b/test/unittest/ability_scheduler_stub_test/BUILD.gn index 3d1f5b6668b..95d0cf12762 100644 --- a/test/unittest/ability_scheduler_stub_test/BUILD.gn +++ b/test/unittest/ability_scheduler_stub_test/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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ability_scheduler_stub_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock" ] sources = [ diff --git a/test/unittest/ams_ability_running_record_test/BUILD.gn b/test/unittest/ams_ability_running_record_test/BUILD.gn index 5403becfe77..ca8ea03f12c 100644 --- a/test/unittest/ams_ability_running_record_test/BUILD.gn +++ b/test/unittest/ams_ability_running_record_test/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 @@ -18,6 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/appmgrservice" ohos_unittest("AmsAbilityRunningRecordTest") { module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } cflags_cc = [] include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", diff --git a/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn b/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn index 82fe5a49b19..91055070844 100644 --- a/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn +++ b/test/unittest/ams_mgr_scheduler_dump_test/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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("ams_mgr_scheduler_dump_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } sources = [ "ams_mgr_scheduler_dump_test.cpp" ] configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] diff --git a/test/unittest/ams_service_load_ability_process_test/BUILD.gn b/test/unittest/ams_service_load_ability_process_test/BUILD.gn index 6e21ffaa9de..3c3939cae59 100644 --- a/test/unittest/ams_service_load_ability_process_test/BUILD.gn +++ b/test/unittest/ams_service_load_ability_process_test/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 @@ -19,6 +19,12 @@ module_output_path = "ability_runtime/ability_runtime/appmgrservice" ohos_unittest("AmsServiceLoadAbilityProcessTest") { use_exceptions = true module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } cflags_cc = [] include_dirs = [ "${ability_runtime_services_path}/appmgr/test/unittest/mocks", diff --git a/test/unittest/app_debug_listener_proxy_test/BUILD.gn b/test/unittest/app_debug_listener_proxy_test/BUILD.gn index 185afb3de5f..1b24dfb7799 100644 --- a/test/unittest/app_debug_listener_proxy_test/BUILD.gn +++ b/test/unittest/app_debug_listener_proxy_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/appmgrservice" ohos_unittest("AppDebugListenerProxyTest") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_services_path}/appmgr/include", "${ability_runtime_test_path}/mock/services_appmgr_test/include", diff --git a/test/unittest/app_debug_listener_proxy_test/app_debug_listener_proxy_test.cpp b/test/unittest/app_debug_listener_proxy_test/app_debug_listener_proxy_test.cpp index 18060b90829..7bcc341e9b7 100644 --- a/test/unittest/app_debug_listener_proxy_test/app_debug_listener_proxy_test.cpp +++ b/test/unittest/app_debug_listener_proxy_test/app_debug_listener_proxy_test.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 @@ -54,17 +54,6 @@ void AppDebugListenerProxyTest::SetUp() void AppDebugListenerProxyTest::TearDown() {} -/** - * @tc.name: WriteInterfaceToken_0100 - * @tc.desc: write token into parcel data - * @tc.type: FUNC - */ -HWTEST_F(AppDebugListenerProxyTest, WriteInterfaceToken_0100, TestSize.Level1) -{ - MessageParcel data; - EXPECT_TRUE(proxy_->WriteInterfaceToken(data)); -} - /** * @tc.name: OnAppDebugStarted_0100 * @tc.desc: Callback of app debug started, verify that AppDebugListener interface calls normally. @@ -83,7 +72,7 @@ HWTEST_F(AppDebugListenerProxyTest, OnAppDebugStarted_0100, TestSize.Level1) .Times(1) .WillOnce(Invoke(mock_.GetRefPtr(), &AppDebugListenerStubMock::InvokeSendRequest)); proxy_->OnAppDebugStarted(appDebugInfos); - auto code = static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STARTED); + auto code = static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED); EXPECT_EQ(code, static_cast(mock_->code_)); } @@ -105,7 +94,7 @@ HWTEST_F(AppDebugListenerProxyTest, OnAppDebugStoped_0100, TestSize.Level1) .Times(1) .WillOnce(Invoke(mock_.GetRefPtr(), &AppDebugListenerStubMock::InvokeSendRequest)); proxy_->OnAppDebugStoped(appDebugInfos); - auto code = static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STOPED); + auto code = static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STOPED); EXPECT_EQ(code, static_cast(mock_->code_)); } } // namespace AppExecFwk diff --git a/test/unittest/app_debug_listener_proxy_test/app_debug_listener_stub_mock.h b/test/unittest/app_debug_listener_proxy_test/app_debug_listener_stub_mock.h index b3c81fc0dcb..f96411fe7ae 100644 --- a/test/unittest/app_debug_listener_proxy_test/app_debug_listener_stub_mock.h +++ b/test/unittest/app_debug_listener_proxy_test/app_debug_listener_stub_mock.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 @@ -19,7 +19,7 @@ #include #include #define private public -#include "app_debug_listener_interface.h" +#include "iapp_debug_listener.h" #undef private namespace OHOS { @@ -45,8 +45,8 @@ public: uint32_t code_ = 0; MOCK_METHOD4(SendRequest, int(uint32_t, MessageParcel &, MessageParcel &, MessageOption &)); - MOCK_METHOD1(OnAppDebugStarted, void(const std::vector &)); - MOCK_METHOD1(OnAppDebugStoped, void(const std::vector &)); + MOCK_METHOD1(OnAppDebugStarted, ErrCode(const std::vector &)); + MOCK_METHOD1(OnAppDebugStoped, ErrCode(const std::vector &)); }; } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/app_debug_listener_stub_test/app_debug_listener_stub_test.cpp b/test/unittest/app_debug_listener_stub_test/app_debug_listener_stub_test.cpp index 87754032c02..0101270c410 100644 --- a/test/unittest/app_debug_listener_stub_test/app_debug_listener_stub_test.cpp +++ b/test/unittest/app_debug_listener_stub_test/app_debug_listener_stub_test.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 @@ -22,9 +22,9 @@ using namespace testing::ext; namespace OHOS { namespace AppExecFwk { namespace { - constexpr int32_t DEBUG_INFO_SIZE_ONE = 1; - constexpr int32_t DEBUG_INFO_SIZE_ZERO = 0; - constexpr uint32_t UNKNOWN_CODE = 2; +constexpr int32_t DEBUG_INFO_SIZE_ONE = 1; +constexpr int32_t DEBUG_INFO_SIZE_ZERO = 0; +constexpr uint32_t UNKNOWN_CODE = -1; } class AppDebugListenerStubTest : public testing::Test { public: @@ -73,7 +73,7 @@ HWTEST_F(AppDebugListenerStubTest, OnRemoteRequest_0100, TestSize.Level1) data.WriteParcelable(&debugInfo); auto result = mockStub_->OnRemoteRequest( - static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STARTED), data, reply, option); + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED), data, reply, option); EXPECT_EQ(result, NO_ERROR); } @@ -91,8 +91,8 @@ HWTEST_F(AppDebugListenerStubTest, OnRemoteRequest_0200, TestSize.Level1) data.WriteInt32(DEBUG_INFO_SIZE_ZERO); auto result = mockStub_->OnRemoteRequest( - static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STARTED), data, reply, option); - EXPECT_EQ(result, ERR_INVALID_STATE); + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED), data, reply, option); + EXPECT_EQ(result, ERR_TRANSACTION_FAILED); // ERR_TRANSACTION_FAILED for no interfaceToken data } /** @@ -128,8 +128,8 @@ HWTEST_F(AppDebugListenerStubTest, OnRemoteRequest_0400, TestSize.Level1) data.WriteInt32(DEBUG_INFO_SIZE_ZERO); auto result = mockStub_->OnRemoteRequest( - static_cast(IAppDebugListener::Message::ON_APP_DEBUG_STARTED), data, reply, option); - EXPECT_EQ(result, ERR_INVALID_DATA); + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED), data, reply, option); + EXPECT_EQ(result, ERR_NONE); } /** @@ -142,12 +142,14 @@ HWTEST_F(AppDebugListenerStubTest, HandleOnAppDebugStarted_0100, TestSize.Level1 EXPECT_NE(mockStub_, nullptr); MessageParcel data; MessageParcel reply; + MessageOption option(MessageOption::TF_ASYNC); AppDebugInfo debugInfo; data.WriteInt32(DEBUG_INFO_SIZE_ONE); data.WriteParcelable(&debugInfo); - EXPECT_CALL(*mockStub_, OnAppDebugStarted(_)).Times(1); - EXPECT_EQ(mockStub_->HandleOnAppDebugStarted(data, reply), NO_ERROR); + EXPECT_CALL(*mockStub_, OnAppDebugStarted(_)).Times(0); + mockStub_->OnRemoteRequest( + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED), data, reply, option); } /** @@ -160,13 +162,15 @@ HWTEST_F(AppDebugListenerStubTest, HandleOnAppDebugStarted_0200, TestSize.Level1 EXPECT_NE(mockStub_, nullptr); MessageParcel data; MessageParcel reply; + MessageOption option(MessageOption::TF_ASYNC); AppDebugInfo *debugInfo = nullptr; WriteInterfaceToken(data); data.WriteInt32(DEBUG_INFO_SIZE_ONE); data.WriteParcelable(debugInfo); EXPECT_CALL(*mockStub_, OnAppDebugStarted(_)).Times(0); - EXPECT_EQ(mockStub_->HandleOnAppDebugStarted(data, reply), ERR_INVALID_DATA); + mockStub_->OnRemoteRequest( + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STARTED), data, reply, option); } /** @@ -179,12 +183,16 @@ HWTEST_F(AppDebugListenerStubTest, HandleOnAppDebugStoped_0100, TestSize.Level1) EXPECT_NE(mockStub_, nullptr); MessageParcel data; MessageParcel reply; + MessageOption option(MessageOption::TF_ASYNC); + WriteInterfaceToken(data); AppDebugInfo debugInfo; data.WriteInt32(DEBUG_INFO_SIZE_ONE); data.WriteParcelable(&debugInfo); EXPECT_CALL(*mockStub_, OnAppDebugStoped(_)).Times(1); - EXPECT_EQ(mockStub_->HandleOnAppDebugStoped(data, reply), NO_ERROR); + auto ret = mockStub_->OnRemoteRequest( + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STOPED), data, reply, option); + EXPECT_EQ(ret, NO_ERROR); } /** @@ -197,13 +205,16 @@ HWTEST_F(AppDebugListenerStubTest, HandleOnAppDebugStoped_0200, TestSize.Level1) EXPECT_NE(mockStub_, nullptr); MessageParcel data; MessageParcel reply; + MessageOption option(MessageOption::TF_ASYNC); AppDebugInfo *debugInfo = nullptr; WriteInterfaceToken(data); data.WriteInt32(DEBUG_INFO_SIZE_ONE); data.WriteParcelable(debugInfo); EXPECT_CALL(*mockStub_, OnAppDebugStoped(_)).Times(0); - EXPECT_EQ(mockStub_->HandleOnAppDebugStoped(data, reply), ERR_INVALID_DATA); + auto ret = mockStub_->OnRemoteRequest( + static_cast(IAppDebugListenerIpcCode::COMMAND_ON_APP_DEBUG_STOPED), data, reply, option); + EXPECT_EQ(ret, ERR_INVALID_DATA); } } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/app_debug_listener_stub_test/mock_app_debug_listener_stub.h b/test/unittest/app_debug_listener_stub_test/mock_app_debug_listener_stub.h index 09418d05921..010015b826c 100644 --- a/test/unittest/app_debug_listener_stub_test/mock_app_debug_listener_stub.h +++ b/test/unittest/app_debug_listener_stub_test/mock_app_debug_listener_stub.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,8 +26,8 @@ class MockAppDebugListenerStub : public AppDebugListenerStub { public: MockAppDebugListenerStub() {} virtual ~ MockAppDebugListenerStub() {} - MOCK_METHOD1(OnAppDebugStarted, void(const std::vector &debugInfos)); - MOCK_METHOD1(OnAppDebugStoped, void(const std::vector &debugInfos)); + MOCK_METHOD1(OnAppDebugStarted, ErrCode(const std::vector &debugInfos)); + MOCK_METHOD1(OnAppDebugStoped, ErrCode(const std::vector &debugInfos)); }; } // namespace AAFwk } // namespace OHOS diff --git a/test/unittest/app_mgr_client_test/BUILD.gn b/test/unittest/app_mgr_client_test/BUILD.gn index 580be23be08..dce07e6590e 100644 --- a/test/unittest/app_mgr_client_test/BUILD.gn +++ b/test/unittest/app_mgr_client_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/appmgrservice" ohos_unittest("AppMgrClientTest") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } configs = [ "${ability_runtime_services_path}/common:common_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", diff --git a/test/unittest/app_mgr_service_inner_eighth_test/app_mgr_service_inner_eighth_test.cpp b/test/unittest/app_mgr_service_inner_eighth_test/app_mgr_service_inner_eighth_test.cpp index a76ce33ce28..d6b2b7fe7bf 100644 --- a/test/unittest/app_mgr_service_inner_eighth_test/app_mgr_service_inner_eighth_test.cpp +++ b/test/unittest/app_mgr_service_inner_eighth_test/app_mgr_service_inner_eighth_test.cpp @@ -104,14 +104,21 @@ public: class MyAbilityDebugResponse : public IAbilityDebugResponse { public: - void OnAbilitysDebugStarted(const std::vector> &tokens) override - {} + ErrCode OnAbilitysDebugStarted(const std::vector> &tokens) override + { + return ERR_OK; + } - void OnAbilitysDebugStoped(const std::vector> &tokens) override - {} + ErrCode OnAbilitysDebugStoped(const std::vector> &tokens) override + { + return ERR_OK; + } - void OnAbilitysAssertDebugChange(const std::vector> &tokens, - bool isAssertDebug) override {} + ErrCode OnAbilitysAssertDebugChange(const std::vector> &tokens, + bool isAssertDebug) override + { + return ERR_OK; + } sptr AsObject() override { @@ -121,16 +128,26 @@ public: class MyStartSpecifiedAbilityResponse : public IStartSpecifiedAbilityResponse { public: - void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override - {} - void OnTimeoutResponse(int32_t requestId) override - {} - void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override - {} - void OnNewProcessRequestTimeoutResponse(int32_t requestId) override - {} - void OnStartSpecifiedFailed(int32_t requestId) override - {} + ErrCode OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnTimeoutResponse(int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnNewProcessRequestTimeoutResponse(int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnStartSpecifiedFailed(int32_t requestId) override + { + return ERR_OK; + } sptr AsObject() override { return nullptr; diff --git a/test/unittest/app_mgr_service_inner_ninth_test/app_mgr_service_inner_ninth_test.cpp b/test/unittest/app_mgr_service_inner_ninth_test/app_mgr_service_inner_ninth_test.cpp index ebbdfb05c52..32cfc10535a 100644 --- a/test/unittest/app_mgr_service_inner_ninth_test/app_mgr_service_inner_ninth_test.cpp +++ b/test/unittest/app_mgr_service_inner_ninth_test/app_mgr_service_inner_ninth_test.cpp @@ -67,14 +67,12 @@ public: class MyAbilityDebugResponse : public IAbilityDebugResponse { public: - void OnAbilitysDebugStarted(const std::vector> &tokens) override - {} + ErrCode OnAbilitysDebugStarted(const std::vector> &tokens) override { return ERR_OK; } - void OnAbilitysDebugStoped(const std::vector> &tokens) override - {} + ErrCode OnAbilitysDebugStoped(const std::vector> &tokens) override { return ERR_OK; } - void OnAbilitysAssertDebugChange(const std::vector> &tokens, - bool isAssertDebug) override {} + ErrCode OnAbilitysAssertDebugChange(const std::vector> &tokens, + bool isAssertDebug) override { return ERR_OK; } sptr AsObject() override { @@ -84,16 +82,12 @@ public: class MyStartSpecifiedAbilityResponse : public IStartSpecifiedAbilityResponse { public: - void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override - {} - void OnTimeoutResponse(int32_t requestId) override - {} - void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override - {} - void OnNewProcessRequestTimeoutResponse(int32_t requestId) override - {} - void OnStartSpecifiedFailed(int32_t requestId) override - {} + ErrCode OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override + { return ERR_OK; } + ErrCode OnTimeoutResponse(int32_t requestId) override { return ERR_OK; } + ErrCode OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override { return ERR_OK; } + ErrCode OnNewProcessRequestTimeoutResponse(int32_t requestId) override { return ERR_OK; } + ErrCode OnStartSpecifiedFailed(int32_t requestId) override { return ERR_OK; } sptr AsObject() override { return nullptr; diff --git a/test/unittest/app_mgr_service_inner_second_test/mock/include/mock_ability_debug_response_stub.h b/test/unittest/app_mgr_service_inner_second_test/mock/include/mock_ability_debug_response_stub.h index b3cd1f2cae5..1c2349bb873 100644 --- a/test/unittest/app_mgr_service_inner_second_test/mock/include/mock_ability_debug_response_stub.h +++ b/test/unittest/app_mgr_service_inner_second_test/mock/include/mock_ability_debug_response_stub.h @@ -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 @@ -27,9 +27,9 @@ class MockAbilityDebugResponseStub : public AbilityDebugResponseStub { public: MockAbilityDebugResponseStub() {} virtual ~ MockAbilityDebugResponseStub() {} - MOCK_METHOD1(OnAbilitysDebugStarted, void(const std::vector> &tokens)); - MOCK_METHOD1(OnAbilitysDebugStoped, void(const std::vector> &tokens)); - MOCK_METHOD2(OnAbilitysAssertDebugChange, void(const std::vector> &, bool)); + MOCK_METHOD1(OnAbilitysDebugStarted, ErrCode(const std::vector> &tokens)); + MOCK_METHOD1(OnAbilitysDebugStoped, ErrCode(const std::vector> &tokens)); + MOCK_METHOD2(OnAbilitysAssertDebugChange, ErrCode(const std::vector> &, bool)); }; } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp b/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp index 65aa161005f..3275de23310 100644 --- a/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp +++ b/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp @@ -55,16 +55,26 @@ public: class MyStartSpecifiedAbilityResponse : public IStartSpecifiedAbilityResponse { public: - void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override - {} - void OnTimeoutResponse(int32_t requestId) override - {} - void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override - {} - void OnNewProcessRequestTimeoutResponse(int32_t requestId) override - {} - void OnStartSpecifiedFailed(int32_t requestId) override - {} + ErrCode OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnTimeoutResponse(int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnNewProcessRequestTimeoutResponse(int32_t requestId) override + { + return ERR_OK; + } + ErrCode OnStartSpecifiedFailed(int32_t requestId) override + { + return ERR_OK; + } sptr AsObject() override { return nullptr; diff --git a/test/unittest/app_mgr_service_inner_tenth_test/app_mgr_service_inner_tenth_test.cpp b/test/unittest/app_mgr_service_inner_tenth_test/app_mgr_service_inner_tenth_test.cpp index 74b33289f77..9a2572f60e3 100644 --- a/test/unittest/app_mgr_service_inner_tenth_test/app_mgr_service_inner_tenth_test.cpp +++ b/test/unittest/app_mgr_service_inner_tenth_test/app_mgr_service_inner_tenth_test.cpp @@ -67,14 +67,14 @@ public: class MyAbilityDebugResponse : public IAbilityDebugResponse { public: - void OnAbilitysDebugStarted(const std::vector> &tokens) override - {} + ErrCode OnAbilitysDebugStarted(const std::vector> &tokens) override + { return ERR_OK; } - void OnAbilitysDebugStoped(const std::vector> &tokens) override - {} + ErrCode OnAbilitysDebugStoped(const std::vector> &tokens) override + { return ERR_OK; } - void OnAbilitysAssertDebugChange(const std::vector> &tokens, - bool isAssertDebug) override {} + ErrCode OnAbilitysAssertDebugChange(const std::vector> &tokens, + bool isAssertDebug) override { return ERR_OK; } sptr AsObject() override { return nullptr; @@ -83,16 +83,16 @@ public: class MyStartSpecifiedAbilityResponse : public IStartSpecifiedAbilityResponse { public: - void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override - {} - void OnTimeoutResponse(int32_t requestId) override - {} - void OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override - {} - void OnNewProcessRequestTimeoutResponse(int32_t requestId) override - {} - void OnStartSpecifiedFailed(int32_t requestId) override - {} + ErrCode OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag, int32_t requestId) override + { return ERR_OK; } + ErrCode OnTimeoutResponse(int32_t requestId) override + { return ERR_OK; } + ErrCode OnNewProcessRequestResponse(const std::string &flag, int32_t requestId) override + { return ERR_OK; } + ErrCode OnNewProcessRequestTimeoutResponse(int32_t requestId) override + { return ERR_OK; } + ErrCode OnStartSpecifiedFailed(int32_t requestId) override + { return ERR_OK; } sptr AsObject() override { return nullptr; diff --git a/test/unittest/app_mgr_service_inner_test/app_mgr_service_inner_test.cpp b/test/unittest/app_mgr_service_inner_test/app_mgr_service_inner_test.cpp index 789b3287a5b..8c790ffe6e4 100644 --- a/test/unittest/app_mgr_service_inner_test/app_mgr_service_inner_test.cpp +++ b/test/unittest/app_mgr_service_inner_test/app_mgr_service_inner_test.cpp @@ -117,13 +117,9 @@ public: MockIUserCallback() = default; virtual ~MockIUserCallback() = default; - void OnStopUserDone(int userId, int errcode) override - {} - void OnStartUserDone(int userId, int errcode) override - {} - - void OnLogoutUserDone(int userId, int errcode) override - {} + ErrCode OnStopUserDone(int userId, int errcode) override { return ERR_OK; } + ErrCode OnStartUserDone(int userId, int errcode) override { return ERR_OK; } + ErrCode OnLogoutUserDone(int userId, int errcode) override { return ERR_OK; } sptr AsObject() override { diff --git a/test/unittest/app_preloader_test/BUILD.gn b/test/unittest/app_preloader_test/BUILD.gn index e271f94abcb..d7ef4044942 100755 --- a/test/unittest/app_preloader_test/BUILD.gn +++ b/test/unittest/app_preloader_test/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 @@ -33,6 +33,7 @@ ohos_unittest("app_preloader_test") { ] deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_path}/utils/server/startup:startup_util", "${ability_runtime_services_path}/appmgr:libappms", ] diff --git a/test/unittest/app_service_extension_context_test/BUILD.gn b/test/unittest/app_service_extension_context_test/BUILD.gn index a136e622849..960fc7c9db5 100644 --- a/test/unittest/app_service_extension_context_test/BUILD.gn +++ b/test/unittest/app_service_extension_context_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/app_service_extension" ohos_unittest("app_service_extension_context_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_native_path}/ability/native", diff --git a/test/unittest/app_state_observer_manager_test/BUILD.gn b/test/unittest/app_state_observer_manager_test/BUILD.gn index 44be34d331a..7213a5762d0 100755 --- a/test/unittest/app_state_observer_manager_test/BUILD.gn +++ b/test/unittest/app_state_observer_manager_test/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 @@ -18,6 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/appmgr" ohos_unittest("app_state_observer_manager_test") { module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } cflags_cc = [] include_dirs = [ "${ability_runtime_services_path}/appmgr/include", diff --git a/test/unittest/app_state_observer_manager_test_second/BUILD.gn b/test/unittest/app_state_observer_manager_test_second/BUILD.gn index 3d439214764..fd054835268 100755 --- a/test/unittest/app_state_observer_manager_test_second/BUILD.gn +++ b/test/unittest/app_state_observer_manager_test_second/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 @@ -18,6 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/appmgr" ohos_unittest("app_state_observer_manager_test_second") { module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } cflags_cc = [] include_dirs = [ "${ability_runtime_services_path}/appmgr/include", diff --git a/test/unittest/call_record_test/BUILD.gn b/test/unittest/call_record_test/BUILD.gn index 09a97657e7f..7900a374962 100644 --- a/test/unittest/call_record_test/BUILD.gn +++ b/test/unittest/call_record_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("call_record_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_ability_runtime_test/AMS", "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/ability_scheduler_mock", diff --git a/test/unittest/data_ability_manager_test/BUILD.gn b/test/unittest/data_ability_manager_test/BUILD.gn index 2596754c478..2d1908956a8 100644 --- a/test/unittest/data_ability_manager_test/BUILD.gn +++ b/test/unittest/data_ability_manager_test/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 @@ -24,9 +24,11 @@ ohos_unittest("data_ability_manager_test") { "${ability_runtime_test_path}/mock/services_abilitymgr_test/include", "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/ability_scheduler_mock", + "${ability_runtime_innerkits_path}/app_manager/include", "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_runtime_path}/interfaces/kits/native/ability/native", "${ability_runtime_services_path}/common/include", + "${ability_runtime_services_path}/include", ] sources = [ diff --git a/test/unittest/dfr_test/watchdog_test/BUILD.gn b/test/unittest/dfr_test/watchdog_test/BUILD.gn index 7d977ca1478..1b119fb9764 100644 --- a/test/unittest/dfr_test/watchdog_test/BUILD.gn +++ b/test/unittest/dfr_test/watchdog_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -64,6 +64,7 @@ ohos_unittest("watchdog_test") { ] deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/runtime:runtime", "${ability_runtime_native_path}/appkit:appkit_native", ] diff --git a/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn b/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn index c21bc2876fe..1a44fa0f0f6 100644 --- a/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn +++ b/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn @@ -37,6 +37,10 @@ config("module_private_config") { config("module_context_config") { visibility = [ ":*" ] + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_innerkits_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] include_dirs = [ "${ability_runtime_innerkits_path}/app_manager/include/appmgr", "${ability_runtime_test_path}/mock/frameworks_kits_appkit_native_test/include", @@ -1019,7 +1023,10 @@ ohos_unittest("idle_time_test") { configs = [ ":module_context_config" ] - deps = [ "${ability_runtime_native_path}/appkit:appkit_native" ] + deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_native_path}/appkit:appkit_native", + ] external_deps = [ "ability_runtime:runtime", diff --git a/test/unittest/mission_list_test/BUILD.gn b/test/unittest/mission_list_test/BUILD.gn index 7c72f9189e3..daf733a7299 100644 --- a/test/unittest/mission_list_test/BUILD.gn +++ b/test/unittest/mission_list_test/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 @@ -83,6 +83,7 @@ ohos_unittest("mission_list_test_call") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr:mission_list", diff --git a/test/unittest/pending_want_test/BUILD.gn b/test/unittest/pending_want_test/BUILD.gn index b9a780e467e..db803aab578 100644 --- a/test/unittest/pending_want_test/BUILD.gn +++ b/test/unittest/pending_want_test/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 @@ -19,6 +19,12 @@ module_output_path = "ability_runtime/ability_runtime/wantagent" ohos_unittest("pending_want_test") { module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context/", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime", diff --git a/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn b/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn index e35e6e9b2e2..02947579ff5 100644 --- a/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn +++ b/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -68,7 +68,12 @@ ohos_unittest("quick_fix_manager_service_test") { ohos_unittest("quick_fix_manager_apply_task_test") { module_out_path = "ability_runtime/ability_runtime/quick_fix" - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", "${ability_runtime_test_path}/unittest/quick_fix/mock/include", diff --git a/test/unittest/service_extension_context_test/BUILD.gn b/test/unittest/service_extension_context_test/BUILD.gn index 6c412aa70cc..149e6ba615d 100644 --- a/test/unittest/service_extension_context_test/BUILD.gn +++ b/test/unittest/service_extension_context_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("service_extension_context_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_native_path}/ability/native", diff --git a/test/unittest/state_utils_test/BUILD.gn b/test/unittest/state_utils_test/BUILD.gn index 99bec30e48b..bbde094090a 100644 --- a/test/unittest/state_utils_test/BUILD.gn +++ b/test/unittest/state_utils_test/BUILD.gn @@ -31,7 +31,7 @@ ohos_unittest("state_utils_test") { ] include_dirs = [] - deps = [] + deps = [ "${ability_runtime_path}/utils/server/startup:startup_util" ] external_deps = [ "ability_runtime:abilitykit_native", diff --git a/test/unittest/stop_user_callback_proxy_test/BUILD.gn b/test/unittest/stop_user_callback_proxy_test/BUILD.gn index bb2e7a4a561..7d504a0ddd2 100755 --- a/test/unittest/stop_user_callback_proxy_test/BUILD.gn +++ b/test/unittest/stop_user_callback_proxy_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("stop_user_callback_proxy_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock" ] sources = [ diff --git a/test/unittest/stop_user_callback_proxy_test/stop_user_callback_proxy_test.cpp b/test/unittest/stop_user_callback_proxy_test/stop_user_callback_proxy_test.cpp index bea826a0aa5..2318c78e8f5 100755 --- a/test/unittest/stop_user_callback_proxy_test/stop_user_callback_proxy_test.cpp +++ b/test/unittest/stop_user_callback_proxy_test/stop_user_callback_proxy_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -64,7 +64,7 @@ HWTEST_F(StopUserCallbackProxyTest, OnStopUserDone_001, TestSize.Level1) int userId = 0; int errcode = 0; proxy_->OnStopUserDone(userId, errcode); - EXPECT_EQ(IUserCallback::UserCallbackCmd::ON_STOP_USER_DONE, mock_->code_); + EXPECT_EQ(static_cast(IUserCallbackIpcCode::COMMAND_ON_STOP_USER_DONE), mock_->code_); } /* @@ -83,7 +83,7 @@ HWTEST_F(StopUserCallbackProxyTest, OnStopUserDone_002, TestSize.Level1) int userId = 0; int errcode = 0; proxy_->OnStopUserDone(userId, errcode); - EXPECT_EQ(IUserCallback::UserCallbackCmd::ON_STOP_USER_DONE, mock_->code_); + EXPECT_EQ(static_cast(IUserCallbackIpcCode::COMMAND_ON_STOP_USER_DONE), mock_->code_); } } // namespace AAFwk } // namespace OHOS diff --git a/test/unittest/stop_user_callback_proxy_test/stop_user_callback_stub_mock.h b/test/unittest/stop_user_callback_proxy_test/stop_user_callback_stub_mock.h index 59a6b059561..4c7456b7757 100755 --- a/test/unittest/stop_user_callback_proxy_test/stop_user_callback_stub_mock.h +++ b/test/unittest/stop_user_callback_proxy_test/stop_user_callback_stub_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 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 @@ -18,7 +18,7 @@ #include #include #include -#include "user_callback.h" +#include "iuser_callback.h" namespace OHOS { namespace AAFwk { @@ -45,9 +45,9 @@ public: int code_ = 0; - virtual void OnStopUserDone(int userId, int errcode) {}; - virtual void OnStartUserDone(int userId, int errcode) {} - virtual void OnLogoutUserDone(int userId, int errcode) {} + virtual ErrCode OnStopUserDone(int userId, int errcode) { return ERR_OK; }; + virtual ErrCode OnStartUserDone(int userId, int errcode) { return ERR_OK; } + virtual ErrCode OnLogoutUserDone(int userId, int errcode) { return ERR_OK; } }; } // namespace AAFwk } // namespace OHOS diff --git a/test/unittest/stop_user_callback_stub_test/BUILD.gn b/test/unittest/stop_user_callback_stub_test/BUILD.gn index 1e77ad3d5a4..792f2c6aacd 100644 --- a/test/unittest/stop_user_callback_stub_test/BUILD.gn +++ b/test/unittest/stop_user_callback_stub_test/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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("stop_user_callback_stub_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock", "${ability_runtime_innerkits_path}/test/fuzztest/stopusercallbackstub_fuzzer", diff --git a/test/unittest/stop_user_callback_stub_test/stop_user_callback_stub_test.cpp b/test/unittest/stop_user_callback_stub_test/stop_user_callback_stub_test.cpp index 7e6b49e383d..c7a64817d19 100644 --- a/test/unittest/stop_user_callback_stub_test/stop_user_callback_stub_test.cpp +++ b/test/unittest/stop_user_callback_stub_test/stop_user_callback_stub_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 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 @@ -27,11 +27,13 @@ public: MockStopUserCallbackStub() = default; virtual ~MockStopUserCallbackStub() {} - void OnStopUserDone(int userId, int errcode) override - {} - void OnStartUserDone(int userId, int errcode) override {} + ErrCode OnStopUserDone(int userId, int errcode) override + { + return ERR_OK; + } + ErrCode OnStartUserDone(int userId, int errcode) override { return ERR_OK; } - void OnLogoutUserDone(int userId, int errcode) override {} + ErrCode OnLogoutUserDone(int userId, int errcode) override { return ERR_OK; } }; class StopUserCallbackStubTest : public testing::Test { @@ -68,7 +70,7 @@ HWTEST_F(StopUserCallbackStubTest, StopUserCallbackStubTest_001, TestSize.Level1 data.WriteString16(value); auto result = backStub->OnRemoteRequest(code, data, reply, option); - EXPECT_EQ(result, ERR_INVALID_STATE); + EXPECT_EQ(result, ERR_TRANSACTION_FAILED); GTEST_LOG_(INFO) << "StopUserCallbackStubTest_001 end"; } @@ -85,11 +87,11 @@ HWTEST_F(StopUserCallbackStubTest, StopUserCallbackStubTest_002, TestSize.Level1 MessageParcel data; MessageParcel reply; MessageOption option; - std::u16string metaDescriptor_ = u"ohos.aafwk.UserCallback"; + std::u16string metaDescriptor_ = u"OHOS.AAFwk.IUserCallback"; data.WriteInterfaceToken(metaDescriptor_); auto result = backStub->OnRemoteRequest(code, data, reply, option); - EXPECT_EQ(result, IPC_STUB_UNKNOW_TRANS_ERR); + EXPECT_EQ(result, ERR_NONE); GTEST_LOG_(INFO) << "StopUserCallbackStubTest_002 end"; } @@ -106,10 +108,10 @@ HWTEST_F(StopUserCallbackStubTest, StopUserCallbackStubTest_003, TestSize.Level1 MessageParcel data; MessageParcel reply; MessageOption option; - std::u16string metaDescriptor_ = u"ohos.aafwk.UserCallback"; + std::u16string metaDescriptor_ = u"OHOS.AAFwk.IUserCallback"; data.WriteInterfaceToken(metaDescriptor_); auto result = backStub->OnRemoteRequest(code, data, reply, option); - EXPECT_EQ(result, ERR_NONE); + EXPECT_EQ(result, IPC_STUB_UNKNOW_TRANS_ERR); GTEST_LOG_(INFO) << "StopUserCallbackStubTest_003 end"; } diff --git a/test/unittest/timeout_state_utils_test/BUILD.gn b/test/unittest/timeout_state_utils_test/BUILD.gn index 4b9f11b6477..1e9e6a196ff 100644 --- a/test/unittest/timeout_state_utils_test/BUILD.gn +++ b/test/unittest/timeout_state_utils_test/BUILD.gn @@ -19,7 +19,10 @@ module_output_path = "ability_runtime/ability_runtime/state_utils_test" ohos_unittest("timeout_state_utils_test") { module_out_path = module_output_path - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_path}/utils/server/startup:startup_util_config", + ] if (target_cpu == "arm") { cflags = [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/unlock_screen_test/BUILD.gn b/test/unittest/unlock_screen_test/BUILD.gn index 5032698033c..7e6f119e246 100644 --- a/test/unittest/unlock_screen_test/BUILD.gn +++ b/test/unittest/unlock_screen_test/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 @@ -38,6 +38,7 @@ ohos_unittest("unlock_screen_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr:abilityms", ] diff --git a/test/unittest/user_controller_test/BUILD.gn b/test/unittest/user_controller_test/BUILD.gn index 0fbe66cd0d1..120a32b4bfa 100644 --- a/test/unittest/user_controller_test/BUILD.gn +++ b/test/unittest/user_controller_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -18,6 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("user_controller_test") { module_out_path = module_output_path + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } sources = [ "user_controller_test.cpp" ] diff --git a/test/unittest/user_controller_test/user_controller_test.cpp b/test/unittest/user_controller_test/user_controller_test.cpp index 83088ea5f10..9b4710642f8 100644 --- a/test/unittest/user_controller_test/user_controller_test.cpp +++ b/test/unittest/user_controller_test/user_controller_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -51,21 +51,22 @@ void UserControllerTest::TearDown() class TestUserCallback : public UserCallbackStub { public: - void OnStopUserDone(int userId, int errcode) override; - void OnStartUserDone(int userId, int errcode) override; - void OnLogoutUserDone(int userId, int errcode) override; + ErrCode OnStopUserDone(int userId, int errcode) override; + ErrCode OnStartUserDone(int userId, int errcode) override; + ErrCode OnLogoutUserDone(int userId, int errcode) override; int errCode_ = -1; }; -void TestUserCallback::OnStartUserDone(int userId, int errcode) +ErrCode TestUserCallback::OnStartUserDone(int userId, int errcode) { errCode_ = errcode; + return ERR_OK; } -void TestUserCallback::OnStopUserDone(int userId, int errcode) {} +ErrCode TestUserCallback::OnStopUserDone(int userId, int errcode) { return ERR_OK; } -void TestUserCallback::OnLogoutUserDone(int userId, int errcode) {} +ErrCode TestUserCallback::OnLogoutUserDone(int userId, int errcode) { return ERR_OK; } /** * @tc.name: UserItemSetState_0100 diff --git a/test/unittest/want_sender_info_test/BUILD.gn b/test/unittest/want_sender_info_test/BUILD.gn index dad9d5e68cb..f541d77f161 100644 --- a/test/unittest/want_sender_info_test/BUILD.gn +++ b/test/unittest/want_sender_info_test/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 @@ -18,7 +18,12 @@ module_output_path = "ability_runtime/ability_runtime/abilitymgr" ohos_unittest("want_sender_info_test") { module_out_path = module_output_path - + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "../../cfi_blocklist.txt" + } include_dirs = [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock" ] sources = [ diff --git a/tools/aa/BUILD.gn b/tools/aa/BUILD.gn index d6ec4e440c2..f04905ae222 100644 --- a/tools/aa/BUILD.gn +++ b/tools/aa/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 @@ -21,6 +21,7 @@ config("ability_command_config") { "${ability_runtime_services_path}/abilitymgr/include/utils", "${ability_runtime_services_path}/abilitymgr/include", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", ] } config("ability_command_exception_config") { -- Gitee From 7e126eaf9bc18f4f2874cee6a19bd5dab0e5c7cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Wed, 18 Jun 2025 10:26:51 +0800 Subject: [PATCH 2/4] description:add modify MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- test/unittest/ability_manager_service_second_test/BUILD.gn | 1 - test/unittest/ability_manager_service_third_test/abilitymgr.gni | 1 - 2 files changed, 2 deletions(-) diff --git a/test/unittest/ability_manager_service_second_test/BUILD.gn b/test/unittest/ability_manager_service_second_test/BUILD.gn index 66bf430e809..7f465d889ad 100644 --- a/test/unittest/ability_manager_service_second_test/BUILD.gn +++ b/test/unittest/ability_manager_service_second_test/BUILD.gn @@ -181,7 +181,6 @@ ohos_unittest("ability_manager_service_second_test") { "${ability_runtime_services_path}/abilitymgr/src/ui_extension/preload_uiext_state_observer.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record.cpp", "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record_factory.cpp", - "${ability_runtime_services_path}/abilitymgr/src/user_callback_proxy.cpp", "${ability_runtime_services_path}/abilitymgr/src/user_controller.cpp", "${ability_runtime_services_path}/abilitymgr/src/user_event_handler.cpp", "${ability_runtime_services_path}/abilitymgr/src/utils/ability_event_util.cpp", diff --git a/test/unittest/ability_manager_service_third_test/abilitymgr.gni b/test/unittest/ability_manager_service_third_test/abilitymgr.gni index 571d2a93527..af9117bf388 100644 --- a/test/unittest/ability_manager_service_third_test/abilitymgr.gni +++ b/test/unittest/ability_manager_service_third_test/abilitymgr.gni @@ -79,7 +79,6 @@ abilityms_files = [ "${ability_runtime_services_path}/abilitymgr/src/ui_extension_record/ui_extension_record_factory.cpp", "${ability_runtime_services_path}/abilitymgr/src/screen_lock/unlock_screen_manager.cpp", "${ability_runtime_services_path}/abilitymgr/src/start_options.cpp", - "${ability_runtime_services_path}/abilitymgr/src/user_callback_proxy.cpp", "${ability_runtime_services_path}/abilitymgr/src/call_container.cpp", "${ability_runtime_services_path}/abilitymgr/src/call_record.cpp", "${ability_runtime_services_path}/abilitymgr/src/inner_mission_info.cpp", -- Gitee From bc6597704a23c6a4c1a3b4807aecdf51156a6c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Wed, 18 Jun 2025 22:12:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?description:=E8=A7=A3=E5=86=B3=E7=8B=AC?= =?UTF-8?q?=E7=AB=8B=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- interfaces/inner_api/ability_manager/BUILD.gn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interfaces/inner_api/ability_manager/BUILD.gn b/interfaces/inner_api/ability_manager/BUILD.gn index 0480803a9b5..445b84edaff 100644 --- a/interfaces/inner_api/ability_manager/BUILD.gn +++ b/interfaces/inner_api/ability_manager/BUILD.gn @@ -220,6 +220,7 @@ ohos_shared_library("ability_manager") { public_configs = [ ":ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] @@ -381,6 +382,7 @@ ohos_shared_library("ability_manager_c") { external_deps = [ "ability_base:session_info", "c_utils:utils", + "hilog:libhilog", "image_framework:image_native", "ipc:ipc_core", "ipc:ipc_napi", -- Gitee From 5cafa7274d5657241c3652c911616e12fb610417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Thu, 19 Jun 2025 18:36:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?description:=E6=94=AF=E6=8C=81IDL=E5=8C=96?= =?UTF-8?q?=E6=95=B4=E6=94=B9=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- test/fuzztest/abilityattachtimeout_fuzzer/BUILD.gn | 1 + test/fuzztest/abilityconnectionstub_fuzzer/BUILD.gn | 1 + test/fuzztest/abilityconnectmanager_fuzzer/BUILD.gn | 1 + test/fuzztest/abilitycontext_fuzzer/BUILD.gn | 1 + .../fuzztest/abilityforegroundstateobserverproxy_fuzzer/BUILD.gn | 1 + .../abilityinterfacesappmanageramsmgrstub_fuzzer/BUILD.gn | 1 + .../BUILD.gn | 1 + .../abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/BUILD.gn | 1 + .../abilityinterfacesappmgrappdebuglistenerstub_fuzzer/BUILD.gn | 1 + .../BUILD.gn | 1 + .../abilityinterfacesappmgrchildschedulerproxy_fuzzer/BUILD.gn | 1 + .../abilityinterfacesappmgrchildschedulerstub_fuzzer/BUILD.gn | 1 + .../BUILD.gn | 1 + .../abilityinterfacesappmgrnativechildnotifystub_fuzzer/BUILD.gn | 1 + .../BUILD.gn | 1 + test/fuzztest/abilitymanagerserviceb_fuzzer/BUILD.gn | 1 + test/fuzztest/abilitymanagerservicesecond_fuzzer/BUILD.gn | 1 + test/fuzztest/abilityrunningrecord_fuzzer/BUILD.gn | 1 + test/fuzztest/abilityschedulerstub_fuzzer/BUILD.gn | 1 + test/fuzztest/abilitytransitiondone_fuzzer/BUILD.gn | 1 + test/fuzztest/acquiredataability_fuzzer/BUILD.gn | 1 + test/fuzztest/addabilitystagedone_fuzzer/BUILD.gn | 1 + test/fuzztest/amsmgrscheduler_fuzzer/BUILD.gn | 1 + test/fuzztest/appforegroundstateobserverproxy_fuzzer/BUILD.gn | 1 + test/fuzztest/applifecycledeal_fuzzer/BUILD.gn | 1 + test/fuzztest/appmgrclientrest_fuzzer/BUILD.gn | 1 + test/fuzztest/appmgrrest_fuzzer/BUILD.gn | 1 + test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn | 1 + test/fuzztest/appmgrstub_fuzzer/BUILD.gn | 1 + test/fuzztest/apprunningstatusproxy_fuzzer/BUILD.gn | 1 + test/fuzztest/appstateobservermanager_fuzzer/BUILD.gn | 1 + test/fuzztest/attachabilitythread_fuzzer/BUILD.gn | 1 + test/fuzztest/attachrenderprocess_fuzzer/BUILD.gn | 1 + test/fuzztest/cleanallmissions_fuzzer/BUILD.gn | 1 + test/fuzztest/cleanmission_fuzzer/BUILD.gn | 1 + test/fuzztest/closeability_fuzzer/BUILD.gn | 1 + test/fuzztest/completefirstframedrawing_fuzzer/BUILD.gn | 1 + test/fuzztest/connectability_fuzzer/BUILD.gn | 1 + test/fuzztest/connectionobserverclient_fuzzer/BUILD.gn | 1 + test/fuzztest/connectionobserverclientimpl_fuzzer/BUILD.gn | 1 + test/fuzztest/connectionstatemanager_fuzzer/BUILD.gn | 1 + test/fuzztest/continueability_fuzzer/BUILD.gn | 1 + test/fuzztest/continuemission_fuzzer/BUILD.gn | 1 + test/fuzztest/dataabilitymanager_fuzzer/BUILD.gn | 1 + test/fuzztest/delegatordoabilityforeground_fuzzer/BUILD.gn | 1 + test/fuzztest/doabilitybackground_fuzzer/BUILD.gn | 1 + test/fuzztest/doabilityforeground_fuzzer/BUILD.gn | 1 + test/fuzztest/dumpabilityinfodone_fuzzer/BUILD.gn | 1 + test/fuzztest/dumpstate_fuzzer/BUILD.gn | 1 + test/fuzztest/dumpsysstate_fuzzer/BUILD.gn | 1 + test/fuzztest/forcetimeoutfortest_fuzzer/BUILD.gn | 1 + test/fuzztest/freeinstallabilityfromremote_fuzzer/BUILD.gn | 1 + test/fuzztest/getabilityrunninginfos_fuzzer/BUILD.gn | 1 + test/fuzztest/getapplicationinfobyprocessid_fuzzer/BUILD.gn | 1 + test/fuzztest/getappmemorysize_fuzzer/BUILD.gn | 1 + test/fuzztest/getconfiguration_fuzzer/BUILD.gn | 1 + test/fuzztest/getmissionidbytoken_fuzzer/BUILD.gn | 1 + test/fuzztest/getmissioninfos_fuzzer/BUILD.gn | 1 + test/fuzztest/getprocessrunninginfos_fuzzer/BUILD.gn | 1 + test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/BUILD.gn | 1 + test/fuzztest/getrunningprocessinfobytoken_fuzzer/BUILD.gn | 1 + test/fuzztest/getwantsender_fuzzer/BUILD.gn | 1 + test/fuzztest/handledlpapp_fuzzer/BUILD.gn | 1 + test/fuzztest/isramconstraineddevice_fuzzer/BUILD.gn | 1 + test/fuzztest/killapplication_fuzzer/BUILD.gn | 1 + test/fuzztest/killapplicationself_fuzzer/BUILD.gn | 1 + test/fuzztest/killprocessbyabilitytoken_fuzzer/BUILD.gn | 1 + test/fuzztest/killprocessesbyuserid_fuzzer/BUILD.gn | 1 + test/fuzztest/loadability_fuzzer/BUILD.gn | 1 + test/fuzztest/lockmissionforcleanup_fuzzer/BUILD.gn | 1 + test/fuzztest/minimizeability_fuzzer/BUILD.gn | 1 + test/fuzztest/missiondatastorage_fuzzer/BUILD.gn | 1 + test/fuzztest/missioninfomgra_fuzzer/BUILD.gn | 1 + test/fuzztest/missioninfomgrb_fuzzer/BUILD.gn | 1 + test/fuzztest/missioninfomgrc_fuzzer/BUILD.gn | 1 + test/fuzztest/missionlistenercontroller_fuzzer/BUILD.gn | 1 + test/fuzztest/missionlistenerstub_fuzzer/BUILD.gn | 1 + test/fuzztest/notifycompletecontinuation_fuzzer/BUILD.gn | 1 + test/fuzztest/notifycontinuationresult_fuzzer/BUILD.gn | 1 + test/fuzztest/registermissionlistener_fuzzer/BUILD.gn | 1 + test/fuzztest/startabilitybycall_fuzzer/BUILD.gn | 1 + test/fuzztest/startsyncremotemissions_fuzzer/BUILD.gn | 1 + test/fuzztest/startuser_fuzzer/BUILD.gn | 1 + test/fuzztest/stopsyncremotemissions_fuzzer/BUILD.gn | 1 + test/fuzztest/stopuser_fuzzer/BUILD.gn | 1 + test/fuzztest/unlockmissionforcleanup_fuzzer/BUILD.gn | 1 + test/fuzztest/unregistermissionlistener_fuzzer/BUILD.gn | 1 + test/fuzztest/updateconfiguration_fuzzer/BUILD.gn | 1 + test/fuzztest/updateextensionstate_fuzzer/BUILD.gn | 1 + test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn | 1 + test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn | 1 + 91 files changed, 91 insertions(+) diff --git a/test/fuzztest/abilityattachtimeout_fuzzer/BUILD.gn b/test/fuzztest/abilityattachtimeout_fuzzer/BUILD.gn index d3733d99fce..d5454e2fe82 100755 --- a/test/fuzztest/abilityattachtimeout_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityattachtimeout_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("AbilityAttachTimeOutFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/abilityconnectionstub_fuzzer/BUILD.gn b/test/fuzztest/abilityconnectionstub_fuzzer/BUILD.gn index 0bb04b5efbd..31fe1ca2ada 100755 --- a/test/fuzztest/abilityconnectionstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityconnectionstub_fuzzer/BUILD.gn @@ -48,6 +48,7 @@ ohos_fuzztest("AbilityConnectionStubFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/abilityconnectmanager_fuzzer/BUILD.gn b/test/fuzztest/abilityconnectmanager_fuzzer/BUILD.gn index e9cd00deae4..86ac302f01c 100755 --- a/test/fuzztest/abilityconnectmanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityconnectmanager_fuzzer/BUILD.gn @@ -53,6 +53,7 @@ ohos_fuzztest("AbilityConnectManagerFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "relational_store:native_dataability", diff --git a/test/fuzztest/abilitycontext_fuzzer/BUILD.gn b/test/fuzztest/abilitycontext_fuzzer/BUILD.gn index 47dd309f713..dc066f3e8ab 100644 --- a/test/fuzztest/abilitycontext_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitycontext_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("AbilityContextFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/BUILD.gn b/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/BUILD.gn index 662b5107957..c1d8ac19dcd 100644 --- a/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AbilityForegroundStateObserverProxyFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/BUILD.gn index 9e97afa101d..f3e967b5b47 100644 --- a/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppManagerAmsMgrStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_core", diff --git a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/BUILD.gn index 006c7c5a79d..416dc589919 100644 --- a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrAbilityDebugResponseProxyFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/BUILD.gn index 4f3df9a1d78..6a808a56d4d 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrAppDebugListenerProxyFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/BUILD.gn index de7aac55e45..4d78f577650 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrAppDebugListenerStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn index 8d18a466120..b7ebfdbae96 100644 --- a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn @@ -59,6 +59,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrAppForegroundStateObserverStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/BUILD.gn index 280a47a4d1b..8a6e0ef66e6 100644 --- a/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrChildSchedulerProxyFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/BUILD.gn index ec60c224bb1..72fa9da34e2 100644 --- a/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrChildSchedulerStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/BUILD.gn index d5b569f2e97..5a759d531ee 100644 --- a/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrNativeChildNotifyProxyFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/BUILD.gn index f74f096babc..b2a18bd92b1 100644 --- a/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrNativeChildNotifyStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/BUILD.gn index 4f0d0d3d084..dad3bbd138e 100644 --- a/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrRenderStateObserverStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/abilitymanagerserviceb_fuzzer/BUILD.gn b/test/fuzztest/abilitymanagerserviceb_fuzzer/BUILD.gn index 74dcfad3be9..45143446d5d 100755 --- a/test/fuzztest/abilitymanagerserviceb_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymanagerserviceb_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("AbilityManagerServiceBFuzzTest") { "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "input:libmmi-client", "ipc:ipc_core", diff --git a/test/fuzztest/abilitymanagerservicesecond_fuzzer/BUILD.gn b/test/fuzztest/abilitymanagerservicesecond_fuzzer/BUILD.gn index ab54cfd4845..0867a816016 100755 --- a/test/fuzztest/abilitymanagerservicesecond_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymanagerservicesecond_fuzzer/BUILD.gn @@ -60,6 +60,7 @@ ohos_fuzztest("AbilityManagerServiceSecondFuzzTest") { "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "input:libmmi-client", "ipc:ipc_core", diff --git a/test/fuzztest/abilityrunningrecord_fuzzer/BUILD.gn b/test/fuzztest/abilityrunningrecord_fuzzer/BUILD.gn index db164a19cb5..c3acec05c48 100644 --- a/test/fuzztest/abilityrunningrecord_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityrunningrecord_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AbilityRunningRecordFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/abilityschedulerstub_fuzzer/BUILD.gn b/test/fuzztest/abilityschedulerstub_fuzzer/BUILD.gn index fc78fff8b2a..ae1bdbc8287 100755 --- a/test/fuzztest/abilityschedulerstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityschedulerstub_fuzzer/BUILD.gn @@ -49,6 +49,7 @@ ohos_fuzztest("AbilitySchedulerStubFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/abilitytransitiondone_fuzzer/BUILD.gn b/test/fuzztest/abilitytransitiondone_fuzzer/BUILD.gn index b3f82b3ab9f..90cb6fd7a22 100644 --- a/test/fuzztest/abilitytransitiondone_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitytransitiondone_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AbilityTransitionDoneFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/acquiredataability_fuzzer/BUILD.gn b/test/fuzztest/acquiredataability_fuzzer/BUILD.gn index 8b91f92eca5..fa18ac88608 100644 --- a/test/fuzztest/acquiredataability_fuzzer/BUILD.gn +++ b/test/fuzztest/acquiredataability_fuzzer/BUILD.gn @@ -54,6 +54,7 @@ ohos_fuzztest("AcquireDataAbilityFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "ffrt:libffrt", + "hilog:libhilog", "napi:ace_napi", ] } diff --git a/test/fuzztest/addabilitystagedone_fuzzer/BUILD.gn b/test/fuzztest/addabilitystagedone_fuzzer/BUILD.gn index 5c50025d8a2..32ebdf7cf1b 100755 --- a/test/fuzztest/addabilitystagedone_fuzzer/BUILD.gn +++ b/test/fuzztest/addabilitystagedone_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("AddAbilityStageDoneFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/amsmgrscheduler_fuzzer/BUILD.gn b/test/fuzztest/amsmgrscheduler_fuzzer/BUILD.gn index f05fca05ddd..c8672cd4b7f 100755 --- a/test/fuzztest/amsmgrscheduler_fuzzer/BUILD.gn +++ b/test/fuzztest/amsmgrscheduler_fuzzer/BUILD.gn @@ -54,6 +54,7 @@ ohos_fuzztest("AmsMgrSchedulerFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_core", diff --git a/test/fuzztest/appforegroundstateobserverproxy_fuzzer/BUILD.gn b/test/fuzztest/appforegroundstateobserverproxy_fuzzer/BUILD.gn index b6578c00c95..e875c2e5376 100644 --- a/test/fuzztest/appforegroundstateobserverproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/appforegroundstateobserverproxy_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AppForegroundStateObserverProxyTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/applifecycledeal_fuzzer/BUILD.gn b/test/fuzztest/applifecycledeal_fuzzer/BUILD.gn index 834d1f65d96..a12366d3ca2 100644 --- a/test/fuzztest/applifecycledeal_fuzzer/BUILD.gn +++ b/test/fuzztest/applifecycledeal_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("AppLifecycleDealFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/appmgrclientrest_fuzzer/BUILD.gn b/test/fuzztest/appmgrclientrest_fuzzer/BUILD.gn index fb8eb7434b2..3801acd7528 100755 --- a/test/fuzztest/appmgrclientrest_fuzzer/BUILD.gn +++ b/test/fuzztest/appmgrclientrest_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("AppMgrClientRestFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/appmgrrest_fuzzer/BUILD.gn b/test/fuzztest/appmgrrest_fuzzer/BUILD.gn index b239b0ab2e2..2428849f070 100755 --- a/test/fuzztest/appmgrrest_fuzzer/BUILD.gn +++ b/test/fuzztest/appmgrrest_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AppMgrRestFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn b/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn index 28adb930cbf..78c9bf2b190 100755 --- a/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn +++ b/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn @@ -53,6 +53,7 @@ ohos_fuzztest("AppMgrServiceFirstFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/appmgrstub_fuzzer/BUILD.gn b/test/fuzztest/appmgrstub_fuzzer/BUILD.gn index 254e3e39850..988cfeb83ca 100644 --- a/test/fuzztest/appmgrstub_fuzzer/BUILD.gn +++ b/test/fuzztest/appmgrstub_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("AppmgrStubFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_core", diff --git a/test/fuzztest/apprunningstatusproxy_fuzzer/BUILD.gn b/test/fuzztest/apprunningstatusproxy_fuzzer/BUILD.gn index 0ddd71d7e24..71a6d6c11a8 100644 --- a/test/fuzztest/apprunningstatusproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/apprunningstatusproxy_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("AppRunningStatusProxyFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", diff --git a/test/fuzztest/appstateobservermanager_fuzzer/BUILD.gn b/test/fuzztest/appstateobservermanager_fuzzer/BUILD.gn index 5cd1169ac7e..002eaa09e14 100755 --- a/test/fuzztest/appstateobservermanager_fuzzer/BUILD.gn +++ b/test/fuzztest/appstateobservermanager_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("AppStateObserverManagerFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/attachabilitythread_fuzzer/BUILD.gn b/test/fuzztest/attachabilitythread_fuzzer/BUILD.gn index 88d9be20d06..015fcedfd34 100755 --- a/test/fuzztest/attachabilitythread_fuzzer/BUILD.gn +++ b/test/fuzztest/attachabilitythread_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("AttachAbilityThreadFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/attachrenderprocess_fuzzer/BUILD.gn b/test/fuzztest/attachrenderprocess_fuzzer/BUILD.gn index fb1dde263a2..6ef35248dbb 100755 --- a/test/fuzztest/attachrenderprocess_fuzzer/BUILD.gn +++ b/test/fuzztest/attachrenderprocess_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("AttachRenderProcessFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/cleanallmissions_fuzzer/BUILD.gn b/test/fuzztest/cleanallmissions_fuzzer/BUILD.gn index 0f2a26569e1..281819d519a 100755 --- a/test/fuzztest/cleanallmissions_fuzzer/BUILD.gn +++ b/test/fuzztest/cleanallmissions_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("CleanAllMissionsFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/cleanmission_fuzzer/BUILD.gn b/test/fuzztest/cleanmission_fuzzer/BUILD.gn index 3fc4859c601..d4d855ea278 100755 --- a/test/fuzztest/cleanmission_fuzzer/BUILD.gn +++ b/test/fuzztest/cleanmission_fuzzer/BUILD.gn @@ -45,6 +45,7 @@ ohos_fuzztest("CleanMissionFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/closeability_fuzzer/BUILD.gn b/test/fuzztest/closeability_fuzzer/BUILD.gn index 67bc14d610b..2f4dbc66678 100755 --- a/test/fuzztest/closeability_fuzzer/BUILD.gn +++ b/test/fuzztest/closeability_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("CloseAbilityFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/completefirstframedrawing_fuzzer/BUILD.gn b/test/fuzztest/completefirstframedrawing_fuzzer/BUILD.gn index b2e904cc777..12a234f4e8b 100755 --- a/test/fuzztest/completefirstframedrawing_fuzzer/BUILD.gn +++ b/test/fuzztest/completefirstframedrawing_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("CompleteFirstFrameDrawingFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/connectability_fuzzer/BUILD.gn b/test/fuzztest/connectability_fuzzer/BUILD.gn index a228c3559dc..7a5e0952854 100755 --- a/test/fuzztest/connectability_fuzzer/BUILD.gn +++ b/test/fuzztest/connectability_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("ConnectAbilityFuzzTest") { "appspawn:appspawn_client", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "samgr:samgr_proxy", diff --git a/test/fuzztest/connectionobserverclient_fuzzer/BUILD.gn b/test/fuzztest/connectionobserverclient_fuzzer/BUILD.gn index b5419a5c7fb..8949ad7a412 100755 --- a/test/fuzztest/connectionobserverclient_fuzzer/BUILD.gn +++ b/test/fuzztest/connectionobserverclient_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("ConnectionObserverClientFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/connectionobserverclientimpl_fuzzer/BUILD.gn b/test/fuzztest/connectionobserverclientimpl_fuzzer/BUILD.gn index e15dd2c7b56..86b1c6547af 100755 --- a/test/fuzztest/connectionobserverclientimpl_fuzzer/BUILD.gn +++ b/test/fuzztest/connectionobserverclientimpl_fuzzer/BUILD.gn @@ -56,6 +56,7 @@ ohos_fuzztest("ConnectionObserverClientImplFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/connectionstatemanager_fuzzer/BUILD.gn b/test/fuzztest/connectionstatemanager_fuzzer/BUILD.gn index 8bed75cfcc5..1a950e8b0b3 100755 --- a/test/fuzztest/connectionstatemanager_fuzzer/BUILD.gn +++ b/test/fuzztest/connectionstatemanager_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("ConnectionStateManagerFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/continueability_fuzzer/BUILD.gn b/test/fuzztest/continueability_fuzzer/BUILD.gn index e68ca2fc303..39cdcff51e2 100755 --- a/test/fuzztest/continueability_fuzzer/BUILD.gn +++ b/test/fuzztest/continueability_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("ContinueAbilityFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/continuemission_fuzzer/BUILD.gn b/test/fuzztest/continuemission_fuzzer/BUILD.gn index 7088e9bd47f..d249b9e33d2 100755 --- a/test/fuzztest/continuemission_fuzzer/BUILD.gn +++ b/test/fuzztest/continuemission_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("ContinueMissionFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/dataabilitymanager_fuzzer/BUILD.gn b/test/fuzztest/dataabilitymanager_fuzzer/BUILD.gn index e31492b8699..64e062a08a1 100755 --- a/test/fuzztest/dataabilitymanager_fuzzer/BUILD.gn +++ b/test/fuzztest/dataabilitymanager_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("DataAbilityManagerFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/delegatordoabilityforeground_fuzzer/BUILD.gn b/test/fuzztest/delegatordoabilityforeground_fuzzer/BUILD.gn index 5a0cfdcb4c7..9a5ef39aba3 100755 --- a/test/fuzztest/delegatordoabilityforeground_fuzzer/BUILD.gn +++ b/test/fuzztest/delegatordoabilityforeground_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("DelegatorDoAbilityForegroundFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/doabilitybackground_fuzzer/BUILD.gn b/test/fuzztest/doabilitybackground_fuzzer/BUILD.gn index bcab4448e69..a3690cb2bd4 100644 --- a/test/fuzztest/doabilitybackground_fuzzer/BUILD.gn +++ b/test/fuzztest/doabilitybackground_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("DoAbilityBackgroundFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "relational_store:native_dataability", diff --git a/test/fuzztest/doabilityforeground_fuzzer/BUILD.gn b/test/fuzztest/doabilityforeground_fuzzer/BUILD.gn index 9bc48ecac0c..4ab22c95803 100644 --- a/test/fuzztest/doabilityforeground_fuzzer/BUILD.gn +++ b/test/fuzztest/doabilityforeground_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("DoAbilityForegroundFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "relational_store:native_dataability", diff --git a/test/fuzztest/dumpabilityinfodone_fuzzer/BUILD.gn b/test/fuzztest/dumpabilityinfodone_fuzzer/BUILD.gn index 6025e78c762..57faa7f73b0 100644 --- a/test/fuzztest/dumpabilityinfodone_fuzzer/BUILD.gn +++ b/test/fuzztest/dumpabilityinfodone_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("DumpAbilityInfoDoneFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/dumpstate_fuzzer/BUILD.gn b/test/fuzztest/dumpstate_fuzzer/BUILD.gn index cbfd32fc9d4..d7537aaa678 100644 --- a/test/fuzztest/dumpstate_fuzzer/BUILD.gn +++ b/test/fuzztest/dumpstate_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("DumpStateFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/dumpsysstate_fuzzer/BUILD.gn b/test/fuzztest/dumpsysstate_fuzzer/BUILD.gn index ef7506eb461..279fa2acb99 100644 --- a/test/fuzztest/dumpsysstate_fuzzer/BUILD.gn +++ b/test/fuzztest/dumpsysstate_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("DumpSysStateFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/forcetimeoutfortest_fuzzer/BUILD.gn b/test/fuzztest/forcetimeoutfortest_fuzzer/BUILD.gn index 200b83fe9e9..5e060a48c4e 100644 --- a/test/fuzztest/forcetimeoutfortest_fuzzer/BUILD.gn +++ b/test/fuzztest/forcetimeoutfortest_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("ForceTimeoutForTestFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/freeinstallabilityfromremote_fuzzer/BUILD.gn b/test/fuzztest/freeinstallabilityfromremote_fuzzer/BUILD.gn index 8a29b222efb..f8858beb695 100644 --- a/test/fuzztest/freeinstallabilityfromremote_fuzzer/BUILD.gn +++ b/test/fuzztest/freeinstallabilityfromremote_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("FreeInstallAbilityFromRemoteFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/getabilityrunninginfos_fuzzer/BUILD.gn b/test/fuzztest/getabilityrunninginfos_fuzzer/BUILD.gn index 5e1ffec54e9..ae68ff6bcc3 100755 --- a/test/fuzztest/getabilityrunninginfos_fuzzer/BUILD.gn +++ b/test/fuzztest/getabilityrunninginfos_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("GetAbilityRunningInfosFuzzTest") { "ability_base:zuri", "bundle_framework:appexecfwk_base", "c_utils:utils", + "hilog:libhilog", "napi:ace_napi", ] if (ability_runtime_upms) { diff --git a/test/fuzztest/getapplicationinfobyprocessid_fuzzer/BUILD.gn b/test/fuzztest/getapplicationinfobyprocessid_fuzzer/BUILD.gn index 164e96fca17..ac40276bf06 100755 --- a/test/fuzztest/getapplicationinfobyprocessid_fuzzer/BUILD.gn +++ b/test/fuzztest/getapplicationinfobyprocessid_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("GetApplicationInfoByProcessIDFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/getappmemorysize_fuzzer/BUILD.gn b/test/fuzztest/getappmemorysize_fuzzer/BUILD.gn index 9110a3e932b..edd3fb1efd4 100755 --- a/test/fuzztest/getappmemorysize_fuzzer/BUILD.gn +++ b/test/fuzztest/getappmemorysize_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("GetAppMemorySizeFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/getconfiguration_fuzzer/BUILD.gn b/test/fuzztest/getconfiguration_fuzzer/BUILD.gn index 9645a9a671c..deb1df8c27b 100755 --- a/test/fuzztest/getconfiguration_fuzzer/BUILD.gn +++ b/test/fuzztest/getconfiguration_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("GetConfigurationFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/getmissionidbytoken_fuzzer/BUILD.gn b/test/fuzztest/getmissionidbytoken_fuzzer/BUILD.gn index a42f4972c97..5becd9ef7bd 100755 --- a/test/fuzztest/getmissionidbytoken_fuzzer/BUILD.gn +++ b/test/fuzztest/getmissionidbytoken_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("GetMissionIdByTokenFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "relational_store:native_dataability", diff --git a/test/fuzztest/getmissioninfos_fuzzer/BUILD.gn b/test/fuzztest/getmissioninfos_fuzzer/BUILD.gn index 92ad123ed3b..112b104115a 100755 --- a/test/fuzztest/getmissioninfos_fuzzer/BUILD.gn +++ b/test/fuzztest/getmissioninfos_fuzzer/BUILD.gn @@ -49,6 +49,7 @@ ohos_fuzztest("GetMissionInfosFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/getprocessrunninginfos_fuzzer/BUILD.gn b/test/fuzztest/getprocessrunninginfos_fuzzer/BUILD.gn index b638868e623..d8376bfe638 100755 --- a/test/fuzztest/getprocessrunninginfos_fuzzer/BUILD.gn +++ b/test/fuzztest/getprocessrunninginfos_fuzzer/BUILD.gn @@ -53,6 +53,7 @@ ohos_fuzztest("GetProcessRunningInfosFuzzTest") { "ability_base:zuri", "bundle_framework:appexecfwk_base", "c_utils:utils", + "hilog:libhilog", "napi:ace_napi", ] if (ability_runtime_upms) { diff --git a/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/BUILD.gn b/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/BUILD.gn index b31603692c2..63a1599c4a9 100755 --- a/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/BUILD.gn +++ b/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/BUILD.gn @@ -49,6 +49,7 @@ ohos_fuzztest("GetProcessRunningInfosByUserIdFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/getrunningprocessinfobytoken_fuzzer/BUILD.gn b/test/fuzztest/getrunningprocessinfobytoken_fuzzer/BUILD.gn index 1cf939e1d4a..8e4ef6dfff5 100755 --- a/test/fuzztest/getrunningprocessinfobytoken_fuzzer/BUILD.gn +++ b/test/fuzztest/getrunningprocessinfobytoken_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("GetRunningProcessInfoByTokenFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/getwantsender_fuzzer/BUILD.gn b/test/fuzztest/getwantsender_fuzzer/BUILD.gn index d29950afc58..14fcac4e236 100755 --- a/test/fuzztest/getwantsender_fuzzer/BUILD.gn +++ b/test/fuzztest/getwantsender_fuzzer/BUILD.gn @@ -55,6 +55,7 @@ ohos_fuzztest("GetWantSenderFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "ffrt:libffrt", + "hilog:libhilog", "napi:ace_napi", ] } diff --git a/test/fuzztest/handledlpapp_fuzzer/BUILD.gn b/test/fuzztest/handledlpapp_fuzzer/BUILD.gn index cf0d88b7206..fbcbfd0e12c 100755 --- a/test/fuzztest/handledlpapp_fuzzer/BUILD.gn +++ b/test/fuzztest/handledlpapp_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("HandleDlpAppFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/isramconstraineddevice_fuzzer/BUILD.gn b/test/fuzztest/isramconstraineddevice_fuzzer/BUILD.gn index e5dcab2ac4e..5ea479b1341 100755 --- a/test/fuzztest/isramconstraineddevice_fuzzer/BUILD.gn +++ b/test/fuzztest/isramconstraineddevice_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("IsRamConstrainedDeviceFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/killapplication_fuzzer/BUILD.gn b/test/fuzztest/killapplication_fuzzer/BUILD.gn index 7f54e0f203e..04bb873f9d4 100755 --- a/test/fuzztest/killapplication_fuzzer/BUILD.gn +++ b/test/fuzztest/killapplication_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("KillApplicationFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/killapplicationself_fuzzer/BUILD.gn b/test/fuzztest/killapplicationself_fuzzer/BUILD.gn index 7a763f5d452..bf03d4fd612 100755 --- a/test/fuzztest/killapplicationself_fuzzer/BUILD.gn +++ b/test/fuzztest/killapplicationself_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("KillApplicationSelfFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/killprocessbyabilitytoken_fuzzer/BUILD.gn b/test/fuzztest/killprocessbyabilitytoken_fuzzer/BUILD.gn index db209bd84ce..ada261c13b4 100755 --- a/test/fuzztest/killprocessbyabilitytoken_fuzzer/BUILD.gn +++ b/test/fuzztest/killprocessbyabilitytoken_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("KillProcessByAbilityTokenFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/killprocessesbyuserid_fuzzer/BUILD.gn b/test/fuzztest/killprocessesbyuserid_fuzzer/BUILD.gn index b667e038f11..d422056b060 100755 --- a/test/fuzztest/killprocessesbyuserid_fuzzer/BUILD.gn +++ b/test/fuzztest/killprocessesbyuserid_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("KillProcessesByUserIdFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/loadability_fuzzer/BUILD.gn b/test/fuzztest/loadability_fuzzer/BUILD.gn index 1ee52962e86..9e5e3b6a1f9 100755 --- a/test/fuzztest/loadability_fuzzer/BUILD.gn +++ b/test/fuzztest/loadability_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("LoadAbilityFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/lockmissionforcleanup_fuzzer/BUILD.gn b/test/fuzztest/lockmissionforcleanup_fuzzer/BUILD.gn index 1b738e58ec9..30666fb284f 100644 --- a/test/fuzztest/lockmissionforcleanup_fuzzer/BUILD.gn +++ b/test/fuzztest/lockmissionforcleanup_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("LockMissionForCleanupFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/minimizeability_fuzzer/BUILD.gn b/test/fuzztest/minimizeability_fuzzer/BUILD.gn index 72273eaadbd..5faea7072fc 100644 --- a/test/fuzztest/minimizeability_fuzzer/BUILD.gn +++ b/test/fuzztest/minimizeability_fuzzer/BUILD.gn @@ -52,6 +52,7 @@ ohos_fuzztest("MinimizeAbilityFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "napi:ace_napi", diff --git a/test/fuzztest/missiondatastorage_fuzzer/BUILD.gn b/test/fuzztest/missiondatastorage_fuzzer/BUILD.gn index 2062bdafe5b..a440391b149 100644 --- a/test/fuzztest/missiondatastorage_fuzzer/BUILD.gn +++ b/test/fuzztest/missiondatastorage_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("MissionDataStorageFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "image_framework:image_native", "input:libmmi-client", "ipc:ipc_core", diff --git a/test/fuzztest/missioninfomgra_fuzzer/BUILD.gn b/test/fuzztest/missioninfomgra_fuzzer/BUILD.gn index 07ff6968772..b7aea279a33 100644 --- a/test/fuzztest/missioninfomgra_fuzzer/BUILD.gn +++ b/test/fuzztest/missioninfomgra_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("MissionInfoMgrAFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/missioninfomgrb_fuzzer/BUILD.gn b/test/fuzztest/missioninfomgrb_fuzzer/BUILD.gn index a1f09b7378b..611bc665515 100644 --- a/test/fuzztest/missioninfomgrb_fuzzer/BUILD.gn +++ b/test/fuzztest/missioninfomgrb_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("MissionInfoMgrBFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/missioninfomgrc_fuzzer/BUILD.gn b/test/fuzztest/missioninfomgrc_fuzzer/BUILD.gn index 0c360ac4e2c..6e02cc45ec2 100644 --- a/test/fuzztest/missioninfomgrc_fuzzer/BUILD.gn +++ b/test/fuzztest/missioninfomgrc_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("MissionInfoMgrCFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/missionlistenercontroller_fuzzer/BUILD.gn b/test/fuzztest/missionlistenercontroller_fuzzer/BUILD.gn index 9d620602d9f..27a699db2cb 100644 --- a/test/fuzztest/missionlistenercontroller_fuzzer/BUILD.gn +++ b/test/fuzztest/missionlistenercontroller_fuzzer/BUILD.gn @@ -59,6 +59,7 @@ ohos_fuzztest("MissionListenerControllerFuzzTest") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "input:libmmi-client", "ipc:ipc_core", "jsoncpp:jsoncpp", diff --git a/test/fuzztest/missionlistenerstub_fuzzer/BUILD.gn b/test/fuzztest/missionlistenerstub_fuzzer/BUILD.gn index d295929dc90..446295eee7f 100644 --- a/test/fuzztest/missionlistenerstub_fuzzer/BUILD.gn +++ b/test/fuzztest/missionlistenerstub_fuzzer/BUILD.gn @@ -48,6 +48,7 @@ ohos_fuzztest("MissionListenerStubFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/notifycompletecontinuation_fuzzer/BUILD.gn b/test/fuzztest/notifycompletecontinuation_fuzzer/BUILD.gn index c5b82ad2f19..dc9d299bb98 100644 --- a/test/fuzztest/notifycompletecontinuation_fuzzer/BUILD.gn +++ b/test/fuzztest/notifycompletecontinuation_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("NotifyCompleteContinuationFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/notifycontinuationresult_fuzzer/BUILD.gn b/test/fuzztest/notifycontinuationresult_fuzzer/BUILD.gn index 4232165ee64..f97febdb64c 100644 --- a/test/fuzztest/notifycontinuationresult_fuzzer/BUILD.gn +++ b/test/fuzztest/notifycontinuationresult_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("NotifyContinuationResultFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/registermissionlistener_fuzzer/BUILD.gn b/test/fuzztest/registermissionlistener_fuzzer/BUILD.gn index 9eb888dc3ff..8bbbfe22fdc 100755 --- a/test/fuzztest/registermissionlistener_fuzzer/BUILD.gn +++ b/test/fuzztest/registermissionlistener_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("RegisterMissionListenerFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/startabilitybycall_fuzzer/BUILD.gn b/test/fuzztest/startabilitybycall_fuzzer/BUILD.gn index 01bfa29404d..202aab8e90b 100755 --- a/test/fuzztest/startabilitybycall_fuzzer/BUILD.gn +++ b/test/fuzztest/startabilitybycall_fuzzer/BUILD.gn @@ -51,6 +51,7 @@ ohos_fuzztest("StartAbilityByCallFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "relational_store:native_dataability", "relational_store:native_rdb", diff --git a/test/fuzztest/startsyncremotemissions_fuzzer/BUILD.gn b/test/fuzztest/startsyncremotemissions_fuzzer/BUILD.gn index b6b7d561533..370d33ed319 100755 --- a/test/fuzztest/startsyncremotemissions_fuzzer/BUILD.gn +++ b/test/fuzztest/startsyncremotemissions_fuzzer/BUILD.gn @@ -47,6 +47,7 @@ ohos_fuzztest("StartSyncRemoteMissionsFuzzTest") { "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/startuser_fuzzer/BUILD.gn b/test/fuzztest/startuser_fuzzer/BUILD.gn index 2de3f8144dd..760c122a144 100644 --- a/test/fuzztest/startuser_fuzzer/BUILD.gn +++ b/test/fuzztest/startuser_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("StartUserFuzzTest") { "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/stopsyncremotemissions_fuzzer/BUILD.gn b/test/fuzztest/stopsyncremotemissions_fuzzer/BUILD.gn index 057378f9b30..9a953061d1c 100644 --- a/test/fuzztest/stopsyncremotemissions_fuzzer/BUILD.gn +++ b/test/fuzztest/stopsyncremotemissions_fuzzer/BUILD.gn @@ -47,6 +47,7 @@ ohos_fuzztest("StopSyncRemoteMissionsFuzzTest") { "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/stopuser_fuzzer/BUILD.gn b/test/fuzztest/stopuser_fuzzer/BUILD.gn index 60be3c169ea..29d419d673c 100644 --- a/test/fuzztest/stopuser_fuzzer/BUILD.gn +++ b/test/fuzztest/stopuser_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("StopUserFuzzTest") { "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/unlockmissionforcleanup_fuzzer/BUILD.gn b/test/fuzztest/unlockmissionforcleanup_fuzzer/BUILD.gn index 0b1414dc9a7..ae70633461f 100644 --- a/test/fuzztest/unlockmissionforcleanup_fuzzer/BUILD.gn +++ b/test/fuzztest/unlockmissionforcleanup_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("UnlockMissionForCleanupFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/unregistermissionlistener_fuzzer/BUILD.gn b/test/fuzztest/unregistermissionlistener_fuzzer/BUILD.gn index 8c5a8b699cc..ca21a4fbfd6 100644 --- a/test/fuzztest/unregistermissionlistener_fuzzer/BUILD.gn +++ b/test/fuzztest/unregistermissionlistener_fuzzer/BUILD.gn @@ -46,6 +46,7 @@ ohos_fuzztest("UnRegisterMissionListenerFuzzTest") { "ability_runtime:app_manager", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "jsoncpp:jsoncpp", "relational_store:native_dataability", diff --git a/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn b/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn index cc7fae31e93..439ac5c6542 100644 --- a/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn +++ b/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn @@ -53,6 +53,7 @@ ohos_fuzztest("UpdateConfigurationFuzzTest") { "bundle_framework:appexecfwk_core", "c_utils:utils", "eventhandler:libeventhandler", + "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", diff --git a/test/fuzztest/updateextensionstate_fuzzer/BUILD.gn b/test/fuzztest/updateextensionstate_fuzzer/BUILD.gn index dc3ae4b6e34..041c70a3d64 100644 --- a/test/fuzztest/updateextensionstate_fuzzer/BUILD.gn +++ b/test/fuzztest/updateextensionstate_fuzzer/BUILD.gn @@ -50,6 +50,7 @@ ohos_fuzztest("UpdateExtensionStateFuzzTest") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", + "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "safwk:system_ability_fwk", diff --git a/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn b/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn index 22f0a5578c6..849275f208c 100644 --- a/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn +++ b/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn @@ -42,6 +42,7 @@ ohos_fuzztest("WantAgentHelperStringFuzzTest") { "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", ] } diff --git a/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn b/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn index a3aa4b5fcba..496d37f9412 100644 --- a/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn +++ b/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn @@ -42,6 +42,7 @@ ohos_fuzztest("WantAgentHelperTriggerFuzzTest") { "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "hilog:libhilog", "ipc:ipc_core", ] } -- Gitee