diff --git a/frameworks/cj/ffi/want_agent/BUILD.gn b/frameworks/cj/ffi/want_agent/BUILD.gn index b6e9447be764c7805cd21f8fecf4fd32a2b3024d..4225805915c214d741f07b8fe11293d818c39965 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,7 @@ 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}/app_manager:appmgr_innerkits_config" ] } ohos_shared_library("cj_want_agent_ffi") { diff --git a/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.cpp b/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.cpp index 05eaf832a71f698b506c1c3a38e41024c20025e2..591fe5280d51544350b9d66dbba5fc81c7f9c9d7 100644 --- a/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.cpp +++ b/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.cpp @@ -25,12 +25,12 @@ constexpr size_t ARGC_ONE = 1; } JSAppForegroundStateObserver::JSAppForegroundStateObserver(napi_env env) : env_(env) {} -void JSAppForegroundStateObserver::OnAppStateChanged(const AppStateData &appStateData) +ErrCode JSAppForegroundStateObserver::OnAppStateChanged(const AppStateData &appStateData) { TAG_LOGD(AAFwkTag::APPMGR, "called"); if (!valid_) { TAG_LOGE(AAFwkTag::APPMGR, "invalid appMgr"); - return; + return ERR_INVALID_VALUE; } wptr self = this; std::unique_ptr complete = std::make_unique( @@ -45,6 +45,7 @@ void JSAppForegroundStateObserver::OnAppStateChanged(const AppStateData &appStat napi_ref callback = nullptr; NapiAsyncTask::Schedule("JSAppForegroundStateObserver::OnAppStateChanged", env_, std::make_unique(callback, nullptr, std::move(complete))); + return ERR_OK; } void JSAppForegroundStateObserver::HandleOnAppStateChanged(const AppStateData &appStateData) diff --git a/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.h b/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.h index 4e6ea0115732b6f9cb88cbed7c2e8e1a63bd7e18..dc0a24c7682f8a946b10303afea29fb69471a0a1 100644 --- a/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.h +++ b/frameworks/js/napi/app/js_app_manager/js_app_foreground_state_observer.h @@ -31,7 +31,7 @@ class JSAppForegroundStateObserver : public AppForegroundStateObserverStub { public: explicit JSAppForegroundStateObserver(napi_env engine); virtual ~JSAppForegroundStateObserver() = default; - void OnAppStateChanged(const AppStateData &appStateData); + ErrCode OnAppStateChanged(const AppStateData &appStateData); void HandleOnAppStateChanged(const AppStateData &appStateData); void CallJsFunction(const napi_value value, const char *methodName, const napi_value *argv, const size_t argc); void AddJsObserverObject(const napi_value &jsObserverObject); diff --git a/frameworks/native/ability/native/BUILD.gn b/frameworks/native/ability/native/BUILD.gn index d74769b20b175e496d97098d1ad261ef911b9f3f..7a8b4e112b49da61980fda9e1b5d8d7324908400 100644 --- a/frameworks/native/ability/native/BUILD.gn +++ b/frameworks/native/ability/native/BUILD.gn @@ -42,7 +42,7 @@ config("ability_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" ] @@ -140,7 +140,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" ] } @@ -550,7 +550,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 +758,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", @@ -1363,7 +1363,10 @@ ohos_shared_library("ui_service_extension_module") { sources = [ "${ability_runtime_native_path}/ability/native/ui_service_extension_ability/ui_service_extension_module_loader.cpp" ] - configs = [ ":ability_config" ] + configs = [ + ":ability_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] deps = [ ":ui_service_extension" ] external_deps = [ @@ -2218,7 +2221,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 55d58d3ea7abfb7c584459f4181dd618d19c0223..ad7880742c0869c39c0c8722295e5ef048071294 100644 --- a/interfaces/inner_api/ability_manager/BUILD.gn +++ b/interfaces/inner_api/ability_manager/BUILD.gn @@ -41,7 +41,7 @@ config("ability_manager_public_config") { "${ability_runtime_path}/interfaces/kits/native/appkit", "${ability_runtime_innerkits_path}/dataobs_manager/include", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] defines = [] if (ability_command_for_test) { diff --git a/interfaces/inner_api/app_manager/BUILD.gn b/interfaces/inner_api/app_manager/BUILD.gn index c9658b81753f9371a938e6f71a55f0b8f1ebf6d0..2438824e8631b98e893a7393b9d1ff7dc6c392ec 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,7 +41,114 @@ config("appmgr_core_config") { } } +idl_gen_interface("appmgr_innerkits") { + sources = [ + "idl/IAppForegroundStateObserver.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 = [ @@ -69,8 +177,7 @@ ohos_shared_library("app_manager") { "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_foreground_state_observer_recipient.cpp", "src/appmgr/app_jsheap_mem_info.cpp", "src/appmgr/app_cjheap_mem_info.cpp", "src/appmgr/app_launch_data.cpp", @@ -129,6 +236,8 @@ ohos_shared_library("app_manager") { public_configs = [ ":appmgr_core_config", ":appmgr_sdk_config", + ":appmgr_innerkits_config", + "${ability_runtime_path}/utils/server/startup:startup_util_config", ] defines = [ "AMS_LOG_TAG = \"AppexecfwkCore\"" ] @@ -138,6 +247,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_foreground_state_observer_proxy.h b/interfaces/inner_api/app_manager/idl/IAppForegroundStateObserver.idl similarity index 39% rename from interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_proxy.h rename to interfaces/inner_api/app_manager/idl/IAppForegroundStateObserver.idl index b7d564bcc985841875510b9ecf5ff49363e1ce23..2fd543880a4e1cb967547ba18e7dafaef10db487 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_proxy.h +++ b/interfaces/inner_api/app_manager/idl/IAppForegroundStateObserver.idl @@ -1,37 +1,20 @@ -/* - * 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_FOREGROUND_STATE_OBSERVER_PROXY_H -#define OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_PROXY_H - -#include "app_foreground_state_observer_interface.h" -#include "iremote_proxy.h" - -namespace OHOS { -namespace AppExecFwk { -class AppForegroundStateObserverProxy : public IRemoteProxy { -public: - explicit AppForegroundStateObserverProxy(const sptr &impl); - virtual ~AppForegroundStateObserverProxy() = default; - - void OnAppStateChanged(const AppStateData &appStateData) override; - -private: - bool WriteInterfaceToken(MessageParcel &data); - static inline BrokerDelegator delegator_; -}; -} // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_PROXY_H \ No newline at end of file +/* + * 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 + * + * 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. + */ + +sequenceable OHOS.AppExecFwk.AppStateData; + +interface OHOS.AppExecFwk.IAppForegroundStateObserver{ + [oneway]void OnAppStateChanged([in] AppStateData appStateData); +} \ No newline at end of file diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_stub.h b/interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_recipient.h similarity index 63% rename from interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_stub.h rename to interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_recipient.h index cbde5f949c8307c7fc31668fbbf764512734ff6f..d76f907ff77367669507404333424566ae5f9995 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_stub.h +++ b/interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_recipient.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,29 +13,18 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_STUB_H -#define OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_STUB_H +#ifndef OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_RECIPIENT_H +#define OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_RECIPIENT_H #include -#include "app_foreground_state_observer_interface.h" +#include "iapp_foreground_state_observer.h" #include "iremote_stub.h" #include "nocopyable.h" #include "string_ex.h" namespace OHOS { namespace AppExecFwk { -class AppForegroundStateObserverStub : public IRemoteStub { -public: - AppForegroundStateObserverStub(); - virtual ~AppForegroundStateObserverStub(); - int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; - -private: - int32_t HandleOnAppStateChanged(MessageParcel &data, MessageParcel &reply); - - DISALLOW_COPY_AND_MOVE(AppForegroundStateObserverStub); -}; /** * @class AppForegroundStateObserverRecipient @@ -53,4 +42,4 @@ private: }; } // namespace AppExecFwk } // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_STUB_H +#endif // OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_RECIPIENT_H \ No newline at end of file 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 78c33ca8ff10759c433cbe893e184c8a80e51de8..b14652e43bae46b4a735408a11638dac8b009d6f 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 @@ -19,7 +19,7 @@ #include "ability_foreground_state_observer_interface.h" #include "ability_info.h" #include "ams_mgr_interface.h" -#include "app_foreground_state_observer_interface.h" + #include "app_malloc_info.h" #include "app_mgr_ipc_interface_code.h" #include "app_record_id.h" @@ -33,6 +33,7 @@ #endif // SUPPORT_CHILD_PROCESS #include "fault_data.h" #include "kia_interceptor_interface.h" +#include "iapp_foreground_state_observer.h" #include "iapp_state_callback.h" #include "iapplication_state_observer.h" #include "iconfiguration_observer.h" diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_proxy.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_proxy.cpp deleted file mode 100644 index 59d8eada735b3c5de307a06a882328c0bbdfa1e6..0000000000000000000000000000000000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_proxy.cpp +++ /dev/null @@ -1,61 +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_foreground_state_observer_proxy.h" - -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" - -namespace OHOS { -namespace AppExecFwk { -AppForegroundStateObserverProxy::AppForegroundStateObserverProxy(const sptr &impl) - : IRemoteProxy(impl) -{} - -bool AppForegroundStateObserverProxy::WriteInterfaceToken(MessageParcel &data) -{ - if (!data.WriteInterfaceToken(AppForegroundStateObserverProxy::GetDescriptor())) { - TAG_LOGE(AAFwkTag::APPMGR, "Write interface token failed."); - return false; - } - return true; -} - -void AppForegroundStateObserverProxy::OnAppStateChanged(const AppStateData &appStateData) -{ - MessageParcel data; - if (!WriteInterfaceToken(data)) { - TAG_LOGE(AAFwkTag::APPMGR, "Write Token failed."); - return; - } - if (!data.WriteParcelable(&appStateData)) { - TAG_LOGE(AAFwkTag::APPMGR, "Fail to write appStateData."); - return; - } - sptr remote = Remote(); - if (remote == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Remote is NULL."); - return; - } - MessageParcel reply; - MessageOption option(MessageOption::TF_ASYNC); - int32_t ret = remote->SendRequest( - static_cast(IAppForegroundStateObserver::Message::ON_APP_STATE_CHANGED), 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/include/appmgr/app_foreground_state_observer_interface.h b/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_recipient.cpp similarity index 51% rename from interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_interface.h rename to interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_recipient.cpp index f65b8edb92d93efdd66e5f6880314f423613ac93..c46dc22370486e11a23b3614dc9b5c8a6337460f 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_foreground_state_observer_interface.h +++ b/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_recipient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * 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 @@ -13,25 +13,24 @@ * limitations under the License. */ -#ifndef OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_INTERFACE_H -#define OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_INTERFACE_H +#include "app_foreground_state_observer_recipient.h" -#include "app_state_data.h" -#include "iremote_broker.h" +#include "appexecfwk_errors.h" +#include "hilog_tag_wrapper.h" +#include "ipc_types.h" #include "iremote_object.h" namespace OHOS { namespace AppExecFwk { -class IAppForegroundStateObserver : public IRemoteBroker { -public: - DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.IAppForegroundStateObserver"); +AppForegroundStateObserverRecipient::AppForegroundStateObserverRecipient(RemoteDiedHandler handler) : handler_(handler) +{} - virtual void OnAppStateChanged(const AppStateData &appStateData) = 0; - - enum class Message { - ON_APP_STATE_CHANGED, - }; -}; +void AppForegroundStateObserverRecipient::OnRemoteDied(const wptr &__attribute__((unused)) remote) +{ + TAG_LOGE(AAFwkTag::APPMGR, "Remote died."); + if (handler_) { + handler_(remote); + } +} } // namespace AppExecFwk -} // namespace OHOS -#endif // OHOS_ABILITY_RUNTIME_APP_FOREGROUND_STATE_OBSERVER_INTERFACE_H +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_stub.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_stub.cpp deleted file mode 100644 index b35443bb7900a4980be28a6b93bc9690d0c002f5..0000000000000000000000000000000000000000 --- a/interfaces/inner_api/app_manager/src/appmgr/app_foreground_state_observer_stub.cpp +++ /dev/null @@ -1,70 +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_foreground_state_observer_stub.h" - -#include "appexecfwk_errors.h" -#include "hilog_tag_wrapper.h" -#include "ipc_types.h" -#include "iremote_object.h" - -namespace OHOS { -namespace AppExecFwk { -AppForegroundStateObserverStub::AppForegroundStateObserverStub() {} - -AppForegroundStateObserverStub::~AppForegroundStateObserverStub() {} - -int32_t AppForegroundStateObserverStub::OnRemoteRequest( - uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) -{ - TAG_LOGD(AAFwkTag::APPMGR, "called"); - std::u16string descriptor = AppForegroundStateObserverStub::GetDescriptor(); - std::u16string remoteDescriptor = data.ReadInterfaceToken(); - if (descriptor != remoteDescriptor) { - TAG_LOGE(AAFwkTag::APPMGR, "Local descriptor is not equal to remote."); - return ERR_INVALID_STATE; - } - - if (code == static_cast(IAppForegroundStateObserver::Message::ON_APP_STATE_CHANGED)) { - return HandleOnAppStateChanged(data, reply); - } - - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); -} - -int32_t AppForegroundStateObserverStub::HandleOnAppStateChanged(MessageParcel &data, MessageParcel &reply) -{ - std::unique_ptr processData(data.ReadParcelable()); - if (processData == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "ProcessData is null."); - return ERR_APPEXECFWK_PARCEL_ERROR; - } - - OnAppStateChanged(*processData); - return NO_ERROR; -} - -AppForegroundStateObserverRecipient::AppForegroundStateObserverRecipient(RemoteDiedHandler handler) : handler_(handler) -{} - -void AppForegroundStateObserverRecipient::OnRemoteDied(const wptr &__attribute__((unused)) remote) -{ - TAG_LOGE(AAFwkTag::APPMGR, "Remote died."); - if (handler_) { - handler_(remote); - } -} -} // namespace AppExecFwk -} // namespace OHOS \ No newline at end of file diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_mgr_stub.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_mgr_stub.cpp index 262597ebb037a36fb7a39a7b371acb1966b24dbb..0fbd1a3b6b03d858eeaa38852e1801e8fa98dfff 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/app_mgr_stub.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/app_mgr_stub.cpp @@ -1059,6 +1059,7 @@ int32_t AppMgrStub::HandleUpdateConfigurationForBackgroundApp(MessageParcel &dat TAG_LOGE(AAFwkTag::APPMGR, "Resource allocation error"); return ERR_NO_MEMORY; } + for (auto &item : appInfos) { std::unique_ptr tmpInfo(data.ReadParcelable()); if (tmpInfo == nullptr) { diff --git a/interfaces/inner_api/wantagent/BUILD.gn b/interfaces/inner_api/wantagent/BUILD.gn index b1e9d373d3d8c656be1e22591d06408609ceea4b..e98e9094dad932963a063a838e1cee3b20972657 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,7 @@ 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}/app_manager:appmgr_innerkits_config" ] } ohos_shared_library("wantagent_innerkits") { diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index cc5c92e10818782f7e3b30e60ffbf28f6d8dbd02..b4a610f6c2cb09d089853c7b3f5ab28141ba7837 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -7195,7 +7195,6 @@ int AbilityManagerService::KillProcess(const std::string &bundleName, bool clear TAG_LOGE(AAFwkTag::ABILITYMGR, "get bundle info when kill process failed"); return GET_BUNDLE_INFO_FAILED; } - int32_t collaboratorType = GetCollaboratorType(bundleInfo.applicationInfo.codePath); if (CheckCollaboratorType(collaboratorType)) { return KillProcessForCollaborator(collaboratorType, bundleName, userId); diff --git a/services/appmgr/include/app_mgr_service_inner.h b/services/appmgr/include/app_mgr_service_inner.h index 9bc66b07c2fc058a1746443ac4414a907518663c..6b18a5b7de88d552441e72282e87a0afa32ba1d3 100644 --- a/services/appmgr/include/app_mgr_service_inner.h +++ b/services/appmgr/include/app_mgr_service_inner.h @@ -31,7 +31,6 @@ #include "app_death_recipient.h" #include "app_debug_listener_interface.h" #include "app_debug_manager.h" -#include "app_foreground_state_observer_interface.h" #include "app_malloc_info.h" #include "app_mgr_constants.h" #include "app_mgr_event.h" @@ -58,6 +57,7 @@ #include "fault_data.h" #include "fd_guard.h" #include "hisysevent.h" +#include "iapp_foreground_state_observer.h" #include "iapp_state_callback.h" #include "iapplication_state_observer.h" #include "iconfiguration_observer.h" diff --git a/services/appmgr/include/app_state_observer_manager.h b/services/appmgr/include/app_state_observer_manager.h index 89588f3376e98a9529bf5a18cfed54dee898395e..19d1f508f2aa7985c6b30fb554e4a684b8a61a97 100644 --- a/services/appmgr/include/app_state_observer_manager.h +++ b/services/appmgr/include/app_state_observer_manager.h @@ -22,10 +22,10 @@ #include #include "ability_foreground_state_observer_interface.h" -#include "app_foreground_state_observer_interface.h" #include "app_running_record.h" #include "app_state_data.h" #include "cpp/mutex.h" +#include "iapp_foreground_state_observer.h" #include "iapp_state_callback.h" #include "iapplication_state_observer.h" #include "page_state_data.h" diff --git a/services/appmgr/src/app_running_manager.cpp b/services/appmgr/src/app_running_manager.cpp index acd2df58dabe4fb8468069a6c49b8ee3a0000a36..4a49600dc3563ca6b329c60c46423805e76b3cc5 100644 --- a/services/appmgr/src/app_running_manager.cpp +++ b/services/appmgr/src/app_running_manager.cpp @@ -1108,6 +1108,7 @@ void AppRunningManager::ExecuteConfigurationTask(const BackgroundAppInfo& info, if (appRecord == nullptr) { continue; } + bool userIdFlag = (userId == -1 || appRecord->GetUid() / BASE_USER_RANGE == 0 || appRecord->GetUid() / BASE_USER_RANGE == userId); if (!userIdFlag) { diff --git a/services/appmgr/src/app_state_observer_manager.cpp b/services/appmgr/src/app_state_observer_manager.cpp index c5443491634fc9e320023813fe91147448a2d11a..2fd1bae7c8e4b409d7034e49660d6db489bdd385 100644 --- a/services/appmgr/src/app_state_observer_manager.cpp +++ b/services/appmgr/src/app_state_observer_manager.cpp @@ -16,6 +16,7 @@ #include "app_state_observer_manager.h" #include "ability_foreground_state_observer_stub.h" +#include "app_foreground_state_observer_recipient.h" #include "app_foreground_state_observer_stub.h" #include "application_state_observer_stub.h" #include "hilog_tag_wrapper.h" diff --git a/services/uripermmgr/BUILD.gn b/services/uripermmgr/BUILD.gn index 50b810f4fa1c2d21a141f3d918da2f4d704b6543..98cf676bacaf704a4f6430b62a3f93032506fbe7 100644 --- a/services/uripermmgr/BUILD.gn +++ b/services/uripermmgr/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 @@ -47,6 +47,7 @@ ohos_shared_library("libupms") { branch_protector_ret = "pac_ret" shlib_type = "sa" configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", "${ability_runtime_services_path}/common:common_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", @@ -126,6 +127,7 @@ ohos_static_library("libupms_static") { } branch_protector_ret = "pac_ret" configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", "${ability_runtime_services_path}/common:common_config", ] diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index 24ec8146aa64513bddce4d16effd15ff5c47397d..329ed9ee427621c5465b991e1905a76b9a2b848b 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -256,6 +256,7 @@ group("fuzztest") { "appmanager_fuzzer:fuzztest", "appmgrclientrest_fuzzer:fuzztest", "appmgrrest_fuzzer:fuzztest", + "appmgrservicefirst_fuzzer:fuzztest", "appmgrstub_fuzzer:fuzztest", "apprunningstatusproxy_fuzzer:fuzztest", "appstateobservermanager_fuzzer:fuzztest", diff --git a/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/BUILD.gn b/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/BUILD.gn index 5a5195dbe1864b595a934b28814b0dcf54bea65f..98120953264a04a1c5f1f9653471728d0506cf46 100644 --- a/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityappmgrapprunningmanager_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 @@ -40,7 +40,10 @@ ohos_fuzztest("AbilityAppMgrAppRunningManagerFuzzTest") { ] sources = [ "abilityappmgrapprunningmanager_fuzzer.cpp" ] - configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/BUILD.gn b/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/BUILD.gn index 7408f3ed9ebe2b3884f2c56b9f26ab41f5125e07..1023d627baff6e7c54a9101f96949a4622fc5c94 100644 --- a/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityappmgrrenderstateobservermanager_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityAppMgrRenderStateObserverManagerFuzzTest") { "abilityappmgrrenderstateobservermanager_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitydebugdeal_fuzzer/BUILD.gn b/test/fuzztest/abilitydebugdeal_fuzzer/BUILD.gn index f9c6a7be98b0b10f651f3016cf7977479bf9ecb7..6fb8a9da92aa49093754ce7bdb601641bff5be11 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 @@ -41,8 +41,10 @@ ohos_fuzztest("AbilityDebugDealFuzzTest") { "${ability_runtime_services_path}/abilitymgr/src/ability_debug_deal.cpp", "abilitydebugdeal_fuzzer.cpp", ] - - configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/fuzztest/abilityframeworkscjenvironment_fuzzer/BUILD.gn b/test/fuzztest/abilityframeworkscjenvironment_fuzzer/BUILD.gn index 3e80c6a632c3dbde1ff973ecd598dfb616702e6d..72bde8f348e65443182f2b32415a569d3e8f43d4 100644 --- a/test/fuzztest/abilityframeworkscjenvironment_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityframeworkscjenvironment_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 @@ -57,6 +57,7 @@ ohos_fuzztest("AbilityFrameworksCjEnvironmentFuzzTest") { configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] diff --git a/test/fuzztest/abilityframeworksnativejsworker_fuzzer/BUILD.gn b/test/fuzztest/abilityframeworksnativejsworker_fuzzer/BUILD.gn index 0f694908169727b8513da1f4aaa772d983591b1f..69da3f9a2b4011a4bcce3c64d6eb62f2f846f8a9 100644 --- a/test/fuzztest/abilityframeworksnativejsworker_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityframeworksnativejsworker_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 @@ -43,6 +43,7 @@ ohos_fuzztest("AbilityFrameworksNativeJsWorkerFuzzTest") { configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] diff --git a/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/BUILD.gn b/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/BUILD.gn index ae94e4da6bc4bde034dff075c315a5f028ae1ca5..d572c86abc6853cdff15faa4976870558471e47b 100644 --- a/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityframeworksnativeohosjsenvlogger_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 @@ -50,6 +50,7 @@ ohos_fuzztest("AbilityFrameworksNativeOhosJsEnvLoggerFuzzTest") { configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] diff --git a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn index 8d18a4661204a47823eef7fe767cdbfbdf93c065..fa5dd5ca10824f9c64aecc4660a55baeb29f5f63 100644 --- a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/BUILD.gn @@ -43,6 +43,7 @@ ohos_fuzztest("AbilityInterfacesAppMgrAppForegroundStateObserverStubFuzzTest") { deps = [ "${ability_runtime_innerkits_path}/app_manager:app_manager", + #"${ability_runtime_innerkits_path}/app_manager:app_mgr_idl_stub", "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/appmgr:libappms", diff --git a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp index 049e3e8cc63e798662e0a96aa1bb821a86bfef0d..6994a23e9ae4a223254d66f43483748053cb1d97 100644 --- a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp @@ -19,8 +19,9 @@ #include #define private public +#include "app_foreground_state_observer_recipient.h" #include "app_foreground_state_observer_stub.h" -#include "app_foreground_state_observer_interface.h" +#include "iapp_foreground_state_observer.h" #undef private #include "securec.h" @@ -56,7 +57,10 @@ public: virtual ~ AppForegroundStateObserverStubFUZZ() {}; int OnRemoteRequest( uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override{ return 0; }; - void OnAppStateChanged(const AppStateData &appStateData) override{}; + ErrCode OnAppStateChanged(const AppStateData &appStateData) override + { + return ERR_OK; + }; }; sptr GetFuzzAbilityToken() @@ -75,7 +79,7 @@ sptr GetFuzzAbilityToken() bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) { - uint32_t code = static_cast(IAppForegroundStateObserver::Message::ON_APP_STATE_CHANGED); + uint32_t code = static_cast(IAppForegroundStateObserverIpcCode::COMMAND_ON_APP_STATE_CHANGED); MessageParcel parcel; parcel.WriteInterfaceToken(IA_APP_FOREGROUND_STATE_OBSERVER_TOKEN); parcel.WriteBuffer(data, size); diff --git a/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/BUILD.gn index 59f9f69213c341f8d989be2fe028079fe271dfeb..4065aee527ec9009a9a410549b1dfb5dd0671a65 100644 --- a/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrabilitymanagerstub_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 @@ -40,7 +40,10 @@ ohos_fuzztest("AbilityMgrAbilityManagerStubFuzzTest") { ] sources = [ "abilitymgrabilitymanagerstub_fuzzer.cpp" ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn index 2d8b71bfe1f45009d2962af39f9a600eb1df9b65..16d2e788e86f22fa260931f0c7c4b692f53cc15c 100644 --- a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrappexitreasonhelper_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 @@ -55,7 +55,10 @@ ohos_fuzztest("AbilityMgrAppExitReasonHelperFuzzTest") { "abilitymgrappexitreasonhelper_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/BUILD.gn index cbb93be38ab2ba2a95acae5954b5d10f5799101f..6dcef8400bc5f2b4f04e06e0ff4e3fc441ac267a 100644 --- a/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrcontrolinterceptor_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityMgrControlInterceptorFuzzTest") { "abilitymgrcontrolinterceptor_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/BUILD.gn index 94cec4cd04d3f403c5a9f8e7ff0a697af294fe40..0233f5f0b61ed84200f615fd2efcd8f25a75d79e 100644 --- a/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrdisposedruleinterceptor_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 @@ -37,7 +37,10 @@ ohos_fuzztest("AbilitymgrDisposedRuleInterceptorFuzzTest") { ] sources = [ "abilitymgrdisposedruleinterceptor_fuzzer.cpp" ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/BUILD.gn index 6168d13febef2295fdbb91da3fe8b02958874085..bd85dc1f450cc22510905d9ebf3078181554aa89 100644 --- a/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrecologicalruleinterceptor_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 @@ -38,7 +38,10 @@ ohos_fuzztest("AbilitymgrEcologicalRuleInterceptorFuzzTest") { ] sources = [ "abilitymgrecologicalruleinterceptor_fuzzer.cpp" ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/BUILD.gn index 8e5a3aef71381f2fc9392f31f30bf52bcb85d3d6..dd1684f6f35fc8a13aac92a101c6c8b15aa252bc 100644 --- a/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_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 @@ -43,6 +43,7 @@ ohos_fuzztest("AbilityMgrEcologicalRuleMgrServiceParamFuzzTest") { configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] diff --git a/test/fuzztest/abilitymgrextensionrecord_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrextensionrecord_fuzzer/BUILD.gn index a95f63f32e86ef22b5369548d0304b86d3139d23..204600ebcbd6788758bc6509c7e92ce29a245b4b 100644 --- a/test/fuzztest/abilitymgrextensionrecord_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrextensionrecord_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityMgrExtensionRecordFuzzTest") { "abilitymgrextensionrecord_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/BUILD.gn index d084d631ad6e007a26d9426af236f7b90cc122fd..6630f9afc7979ffee3ed587c3c30a0408a959dfc 100644 --- a/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrinsightintentexecutemanager_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 @@ -48,7 +48,10 @@ ohos_fuzztest("AbilityMgrInsightIntentExecuteManagerFuzzTest") { "abilitymgrinsightintentexecutemanager_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/BUILD.gn index 89fb92318811cb89ace895f56ee3b4c3ae1b714b..4ef73ecc221880d61e711b31d370b46aefeaa99c 100644 --- a/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrinsightintentexecuteresult_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityMgrInsightIntentExecuteResultFuzzTest") { "abilitymgrinsightintentexecuteresult_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrinsightintentutils_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrinsightintentutils_fuzzer/BUILD.gn index 4768c8f6e4180710214f80b5cf3f6fb651d85c07..afcecf35d7108434d089fc82eed62f58c96ac8f5 100644 --- a/test/fuzztest/abilitymgrinsightintentutils_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrinsightintentutils_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityMgrInsightIntentUtilsFuzzTest") { "abilitymgrinsightintentutils_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/BUILD.gn index f760e2f4fc3abd4a731acae0fb943f4259f79fa6..ecdbbc691fede0ef573416af9871869fc99528c2 100644 --- a/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrinterceptorexecuter_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityMgrInterceptorExecuterFuzzTest") { "abilitymgrinterceptorexecuter_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/BUILD.gn index 898a52b0fc38d8daea04fa0ccfc680e81f72b28b..4bf19b682b598156e346ea6ae22efdbf0eb0d33e 100644 --- a/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrjumpinterceptor_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 @@ -44,7 +44,10 @@ ohos_fuzztest("AbilityMgrJumpInterceptorFuzzTest") { "abilitymgrjumpinterceptor_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgrrdbparserutil_fuzzer/BUILD.gn b/test/fuzztest/abilitymgrrdbparserutil_fuzzer/BUILD.gn index be18a998b05a85f86d3436fa737506b25fd9e52e..589f9014d6e2845ab6ee0005651c6d0a9828a4db 100644 --- a/test/fuzztest/abilitymgrrdbparserutil_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgrrdbparserutil_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 @@ -43,7 +43,10 @@ ohos_fuzztest("AbilityMgrRdbParserUtilFuzzTest") { "abilitymgrrdbparserutil_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/abilitymgruiextensionrecord_fuzzer/BUILD.gn b/test/fuzztest/abilitymgruiextensionrecord_fuzzer/BUILD.gn index fb2edb8dbfb7c5d64f1a07a24144915ae40500fe..897cfcbe5687a341f15b38dfa2b71d0a7f898eeb 100644 --- a/test/fuzztest/abilitymgruiextensionrecord_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymgruiextensionrecord_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 @@ -44,7 +44,10 @@ ohos_fuzztest("AbilityMgrUiExtensionRecordFuzzTest") { "abilitymgruiextensionrecord_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn b/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn index 28adb930cbfb5f1bf2ab4c31826891228de1421d..87d37d07925f5f05f7d6a920a1efd0fa07df9b62 100755 --- a/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn +++ b/test/fuzztest/appmgrservicefirst_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("AppMgrServiceFirstFuzzTest") { "napi:ace_napi", "safwk:system_ability_fwk", "samgr:samgr_proxy", + "hisysevent:libhisysevent", ] if (ability_runtime_graphics) { diff --git a/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp b/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp index 4dbfd06897dc309fc82b787f293252da313b90ca..08be4ed21a9099417efa5623cba1062114ba19da 100644 --- a/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp +++ b/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp @@ -77,7 +77,7 @@ bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) appMgrService->RegisterNativeChildExitNotify(nativeChildNotify); appMgrService->UnregisterNativeChildExitNotify(nativeChildNotify); pid_t pid = static_cast(GetU32Data(data)); - appMgrService->AddAppDeathRecipient(pid); + //appMgrService->AddAppDeathRecipient(pid); appMgrService->QueryServiceState(); sptr app = nullptr; appMgrService->AttachApplication(app); @@ -128,6 +128,14 @@ bool DoSomethingInterestingWithMyAPI(const char* data, size_t size) appMgrService->GetConfiguration(config); std::string bundleName(data, size); appMgrService->GetAppRunningStateByBundleName(bundleName); + std::vector appInfos; + BackgroundAppInfo appInfo; + appInfo.bandleName = bundleName; + appInfos.push_back(appInfo); + AppExecFwk::ConfigurationPolicy policy; + policy.maxCountPerBatch = static_cast(GetU32Data(data)); + policy.intervalTime = static_cast(GetU32Data(data)); + appMgrService->UpdateConfigurationForBackgroundApp(appInfos, policy); sptr callback; appMgrService->NotifyLoadRepairPatch(bundleName, callback); appMgrService->NotifyHotReloadPage(bundleName, callback); diff --git a/test/fuzztest/crowdtestinterceptor_fuzzer/BUILD.gn b/test/fuzztest/crowdtestinterceptor_fuzzer/BUILD.gn index 68bc5529b04711205410ebce690d79441da8ffed..ababa46bbf364686f39a1f072336f169ed487016 100644 --- a/test/fuzztest/crowdtestinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/crowdtestinterceptor_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 @@ -38,7 +38,10 @@ ohos_fuzztest("CrowdTestInterceptorFuzzTest") { ] sources = [ "crowdtestinterceptor_fuzzer.cpp" ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/extensioncontrolinterceptor_fuzzer/BUILD.gn b/test/fuzztest/extensioncontrolinterceptor_fuzzer/BUILD.gn index ba66b5a29c5fe045f021f83cc61423f965f6ac3c..cd48bd0a1a396abe285f384162b9e52a9258ccf9 100644 --- a/test/fuzztest/extensioncontrolinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/extensioncontrolinterceptor_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 @@ -43,7 +43,10 @@ ohos_fuzztest("ExtensionControlInterceptorFuzzTest") { "extension_control_interceptor_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/fuzztest/freezeutil_fuzzer/BUILD.gn b/test/fuzztest/freezeutil_fuzzer/BUILD.gn index 5e40f7db00e90d715404781060fea6f3f07b7092..4dda44424892b10a579ce99db52ee70fa8d3ae9e 100644 --- a/test/fuzztest/freezeutil_fuzzer/BUILD.gn +++ b/test/fuzztest/freezeutil_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 @@ -46,7 +46,10 @@ ohos_fuzztest("FreezeUtilFuzzTest") { "freezeutil_fuzzer.cpp", ] - configs = [ "${ability_runtime_utils_path}/global/freeze:freeze_util_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_utils_path}/global/freeze:freeze_util_config", + ] deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", diff --git a/test/fuzztest/openlinkoptions_fuzzer/BUILD.gn b/test/fuzztest/openlinkoptions_fuzzer/BUILD.gn index 588260ac383ef0cca67e08f7e56d3855d640d106..20eb2ea18799acb05a54b505e0ffa7ad8bbfd4f9 100644 --- a/test/fuzztest/openlinkoptions_fuzzer/BUILD.gn +++ b/test/fuzztest/openlinkoptions_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 @@ -47,7 +47,10 @@ ohos_fuzztest("OpenLinkOptionsFuzzTest") { "openlinkoptions_fuzzer.cpp", ] - configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", diff --git a/test/fuzztest/screenunlockinterceptor_fuzzer/BUILD.gn b/test/fuzztest/screenunlockinterceptor_fuzzer/BUILD.gn index 0b590a85abde66edf7cd2a07e9d18051c49ad71e..5f1b43efe5798b813f104944c34500b899b304e1 100644 --- a/test/fuzztest/screenunlockinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/screenunlockinterceptor_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 @@ -50,7 +50,10 @@ ohos_fuzztest("ScreenUnlockInterceptorFuzzTest") { "screenunlockinterceptor_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/fuzztest/startotherappinterceptor_fuzzer/BUILD.gn b/test/fuzztest/startotherappinterceptor_fuzzer/BUILD.gn index 88a58b7ccc6f21e8d270b7ce1ed4a0d7efb513e4..332c105b68d948749e33f46f04e5704f80035448 100644 --- a/test/fuzztest/startotherappinterceptor_fuzzer/BUILD.gn +++ b/test/fuzztest/startotherappinterceptor_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 @@ -49,7 +49,10 @@ ohos_fuzztest("StartOtherappinterceptorFuzzTest") { "startotherappinterceptor_fuzzer.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/fuzztest/statusbardelegatemanager_fuzzer/BUILD.gn b/test/fuzztest/statusbardelegatemanager_fuzzer/BUILD.gn index 4f5f81f5e984bfe8467817321ddbedddf7987fc0..8a6f7e9650dff13747c0fc68acede052c7b43964 100644 --- a/test/fuzztest/statusbardelegatemanager_fuzzer/BUILD.gn +++ b/test/fuzztest/statusbardelegatemanager_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 @@ -50,7 +50,10 @@ ohos_fuzztest("StatusBarDelegateManagerFuzzTest") { "statusbardelegatemanager_fuzzer.cpp", ] - configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + ] deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", diff --git a/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn b/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn index cc7fae31e93a3d5adbe8eceece9413dedfab8e11..439ac5c6542d9878195c93f7da91a41c467acea1 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/mock/services_abilitymgr_test/libs/appexecfwk_core/BUILD.gn b/test/mock/services_abilitymgr_test/libs/appexecfwk_core/BUILD.gn index 94c7e0f3a5fee85be55bfc321dc47534b31d2fe6..44e9eeb97e47b6b8040cae75acaf19ecaefdadfd 100644 --- a/test/mock/services_abilitymgr_test/libs/appexecfwk_core/BUILD.gn +++ b/test/mock/services_abilitymgr_test/libs/appexecfwk_core/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 @@ -27,6 +27,7 @@ config("appexecfwk_core_mock_config") { "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/aakit/include/", "${ability_runtime_services_path}/common/include", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] } ohos_static_library("appexecfwk_appmgr_mock") { diff --git a/test/moduletest/appexecfwk_appkit_native_app_module_test/BUILD.gn b/test/moduletest/appexecfwk_appkit_native_app_module_test/BUILD.gn index 2ea05cc62b15ec82d757feb0570a87d7ec623e5d..f96a6fd3474d431c88507081ede6d8c816f525ec 100644 --- a/test/moduletest/appexecfwk_appkit_native_app_module_test/BUILD.gn +++ b/test/moduletest/appexecfwk_appkit_native_app_module_test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 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 @@ -25,7 +25,7 @@ config("module_private_config") { "${ability_runtime_test_path}/mock/frameworks_kits_appkit_test/include", "${ability_runtime_path}/interfaces/kits/native/appkit/app", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] defines = [ "AMS_LOG_TAG = \"ApplicationModuleTest\"" ] } diff --git a/test/moduletest/mission_dump_test/BUILD.gn b/test/moduletest/mission_dump_test/BUILD.gn index 477a5aa18a91701ee559cdde3ea6bfd1e230a011..22fbfd20179fdd39bd0cbacd108b79d01c05f8cf 100644 --- a/test/moduletest/mission_dump_test/BUILD.gn +++ b/test/moduletest/mission_dump_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 @@ -29,6 +29,7 @@ ohos_moduletest("mission_dump_test") { sources += [ "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp" ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] diff --git a/test/unittest/ability_cache_manager_test/BUILD.gn b/test/unittest/ability_cache_manager_test/BUILD.gn index 38d9659fa453d0e50ed0b52d9389812a64a2500b..4415e5332e1dbf761f44cde71f21fd8ab42c1f64 100644 --- a/test/unittest/ability_cache_manager_test/BUILD.gn +++ b/test/unittest/ability_cache_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 diff --git a/test/unittest/ability_interceptor_second_test/BUILD.gn b/test/unittest/ability_interceptor_second_test/BUILD.gn index fe695b8b0345c3f4df00f18777a1bc1651336bd3..1745bde8931a9c7fe58f9b898c48b1565372d2da 100644 --- a/test/unittest/ability_interceptor_second_test/BUILD.gn +++ b/test/unittest/ability_interceptor_second_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 @@ -36,6 +36,7 @@ ohos_unittest("ability_interceptor_second_test") { ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] diff --git a/test/unittest/ability_interceptor_test/BUILD.gn b/test/unittest/ability_interceptor_test/BUILD.gn index 4a521a595b556611a652879ffd6954e1558c96eb..b83eb156d6027afea7b056ec544ae25d19742157 100644 --- a/test/unittest/ability_interceptor_test/BUILD.gn +++ b/test/unittest/ability_interceptor_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 @@ -36,6 +36,7 @@ ohos_unittest("ability_interceptor_test") { ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] diff --git a/test/unittest/ability_interceptor_third_test/BUILD.gn b/test/unittest/ability_interceptor_third_test/BUILD.gn index 301cbdc2713ebb03724b0d42809218230fba148f..c0a1a24156620e55ec650d3bddd3bcf0788d2c6e 100644 --- a/test/unittest/ability_interceptor_third_test/BUILD.gn +++ b/test/unittest/ability_interceptor_third_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 @@ -37,6 +37,7 @@ ohos_unittest("ability_interceptor_third_test") { ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] 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 ccd62f0691ec73b9d716c77f4a8720aa606e5068..ed26d0ea3471e407a367fbd88169df30f1b95d72 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 @@ -31,6 +31,7 @@ ohos_unittest("ability_manager_client_branch_second_test") { ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] diff --git a/test/unittest/ability_manager_client_branch_test/BUILD.gn b/test/unittest/ability_manager_client_branch_test/BUILD.gn index 44a1bc89fc60cad5d7c71fc5c16ed03da054f984..630f8bb4e8a0fee8d15419f337f60157aa5efa25 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 @@ -31,6 +31,7 @@ ohos_unittest("ability_manager_client_branch_test") { ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] diff --git a/test/unittest/ability_manager_service_account_test/BUILD.gn b/test/unittest/ability_manager_service_account_test/BUILD.gn index 50b623e31ee7616f183b854c8ee2a8146359b0b2..ebc00d6764146ae76955a2dfbe39df0027e84436 100644 --- a/test/unittest/ability_manager_service_account_test/BUILD.gn +++ b/test/unittest/ability_manager_service_account_test/BUILD.gn @@ -1,4 +1,4 @@ -# 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 @@ -33,7 +33,10 @@ ohos_unittest("ability_manager_service_account_test") { "ability_manager_service_account_test.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/ability_stage_context_test/BUILD.gn b/test/unittest/ability_stage_context_test/BUILD.gn index 73a3326a352d8c2c12fa1f2e8b6a152cb2f23006..0863e095a52e9aa47748c19f7b908916e3f5ac20 100644 --- a/test/unittest/ability_stage_context_test/BUILD.gn +++ b/test/unittest/ability_stage_context_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 @@ -28,7 +28,10 @@ ohos_unittest("ability_stage_context_test") { sources = [ "ability_stage_context_test.cpp" ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/unittest/ability_start_window_option_test/BUILD.gn b/test/unittest/ability_start_window_option_test/BUILD.gn index 6eed69aa6c830f66b442169b6cebea43a90c21f3..d463c90f40722c3e9dbd98d05e37c2f46289e0f4 100644 --- a/test/unittest/ability_start_window_option_test/BUILD.gn +++ b/test/unittest/ability_start_window_option_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 @@ -28,7 +28,7 @@ ohos_unittest("ability_start_window_option_test") { sources = [ "ability_start_window_option_test.cpp" ] - configs = [] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", diff --git a/test/unittest/ams_app_running_record_test/BUILD.gn b/test/unittest/ams_app_running_record_test/BUILD.gn index f14a268f81d77deda98a0cc84ea883387857bb53..3fe04bb161d6e5fc6ec6c3647f522f2f3da3b5dd 100644 --- a/test/unittest/ams_app_running_record_test/BUILD.gn +++ b/test/unittest/ams_app_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 @@ -40,7 +40,10 @@ ohos_unittest("AmsAppRunningRecordTest") { "ams_app_running_record_test.cpp", ] - configs = [ "${ability_runtime_services_path}/common:common_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/common:common_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/unittest/ams_mgr_proxy_test/BUILD.gn b/test/unittest/ams_mgr_proxy_test/BUILD.gn index 97ea0ca6f6c1bd487258bd2a893df30606e78261..ab692388f3a9f96a3189e02976cd5773f4657858 100644 --- a/test/unittest/ams_mgr_proxy_test/BUILD.gn +++ b/test/unittest/ams_mgr_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 @@ -32,6 +32,8 @@ ohos_unittest("AmsMgrProxyTest") { sources = [ "ams_mgr_proxy_test.cpp" ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] + deps = [ "${ability_runtime_native_path}/appkit:appkit_manager_helper", "${ability_runtime_services_path}/appmgr:libappms", diff --git a/test/unittest/app_exit_reason_helper_fourth_test/mock/include/mock_iapp_mgr.h b/test/unittest/app_exit_reason_helper_fourth_test/mock/include/mock_iapp_mgr.h index 027540709f7d4abed631aac169cb92831db4f14f..ac3a16f21fb2ec55da1518359a6c612badae63bb 100644 --- a/test/unittest/app_exit_reason_helper_fourth_test/mock/include/mock_iapp_mgr.h +++ b/test/unittest/app_exit_reason_helper_fourth_test/mock/include/mock_iapp_mgr.h @@ -17,7 +17,6 @@ #include "ability_foreground_state_observer_interface.h" #include "ability_info.h" -#include "app_foreground_state_observer_interface.h" #include "app_malloc_info.h" #include "app_mgr_ipc_interface_code.h" #include "app_record_id.h" @@ -31,6 +30,7 @@ #include "app_cjheap_mem_info.h" #include "app_mgr_interface.h" #include "fault_data.h" +#include "iapp_foreground_state_observer.h" #include "iapp_state_callback.h" #include "iapplication_state_observer.h" #include "iconfiguration_observer.h" diff --git a/test/unittest/app_foreground_state_observer_proxy_test/BUILD.gn b/test/unittest/app_foreground_state_observer_proxy_test/BUILD.gn index e9c0e14555b7962519fa776c4de38f367e5fdce3..bf3b0197eb3da7ba2ef12bbee9f8d8002224ff14 100644 --- a/test/unittest/app_foreground_state_observer_proxy_test/BUILD.gn +++ b/test/unittest/app_foreground_state_observer_proxy_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("app_foreground_state_observer_proxy_test") { ] sources = [ - "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_foreground_state_observer_proxy.cpp", + #"${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_foreground_state_observer_proxy.cpp", "app_foreground_state_observer_proxy_test.cpp", ] diff --git a/test/unittest/app_foreground_state_observer_proxy_test/app_foreground_state_observer_proxy_test.cpp b/test/unittest/app_foreground_state_observer_proxy_test/app_foreground_state_observer_proxy_test.cpp index d7130616d3e2c3a534335809ddaee8ca5d07d278..abec790c3f5b3290278e6da9994b8fbd777075d0 100644 --- a/test/unittest/app_foreground_state_observer_proxy_test/app_foreground_state_observer_proxy_test.cpp +++ b/test/unittest/app_foreground_state_observer_proxy_test/app_foreground_state_observer_proxy_test.cpp @@ -49,17 +49,6 @@ void AppForegroundStateObserverProxyTest::SetUp() void AppForegroundStateObserverProxyTest::TearDown() {} -/** - * @tc.name: WriteInterfaceToken_0100 - * @tc.desc: Write token into parcel data. - * @tc.type: FUNC - */ -HWTEST_F(AppForegroundStateObserverProxyTest, WriteInterfaceToken_0100, TestSize.Level1) -{ - MessageParcel data; - EXPECT_TRUE(observerProxy_->WriteInterfaceToken(data)); -} - /** * @tc.name: OnAppStateChanged_0100 * @tc.desc: Test when the return of WriteInterfaceToken and diff --git a/test/unittest/app_foreground_state_observer_proxy_test/mock_app_foreground_state_observer_stub.h b/test/unittest/app_foreground_state_observer_proxy_test/mock_app_foreground_state_observer_stub.h index 6a6891932f4b27e19376eceda6f8cb37c2b9dfc9..b0ad9eca1529428166309c7fa862094b453a3f21 100644 --- a/test/unittest/app_foreground_state_observer_proxy_test/mock_app_foreground_state_observer_stub.h +++ b/test/unittest/app_foreground_state_observer_proxy_test/mock_app_foreground_state_observer_stub.h @@ -27,7 +27,7 @@ public: MockAppForegroundStateObserverStub() = default; virtual ~MockAppForegroundStateObserverStub() = default; - MOCK_METHOD1(OnAppStateChanged, void(const AppStateData &appStateData)); + MOCK_METHOD1(OnAppStateChanged, ErrCode(const AppStateData &appStateData)); }; } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/app_foreground_state_observer_stub_test/BUILD.gn b/test/unittest/app_foreground_state_observer_stub_test/BUILD.gn index f946137d66df80ca9336cc40140ac6fe43d8ff6a..249a3025bdf05173a3c742d1630780bb4f1c2b64 100644 --- a/test/unittest/app_foreground_state_observer_stub_test/BUILD.gn +++ b/test/unittest/app_foreground_state_observer_stub_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 @@ -26,15 +26,13 @@ ohos_unittest("app_foreground_state_observer_stub_test") { ] sources = [ - "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_foreground_state_observer_stub.cpp", "app_foreground_state_observer_stub_test.cpp", ] - + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] deps = [ "${ability_runtime_innerkits_path}/app_manager:app_manager" ] external_deps = [ "ability_base:configuration", - "ability_base:want", "bundle_framework:appexecfwk_base", "c_utils:utils", "faultloggerd:libdfx_dumpcatcher", diff --git a/test/unittest/app_foreground_state_observer_stub_test/app_foreground_state_observer_stub_test.cpp b/test/unittest/app_foreground_state_observer_stub_test/app_foreground_state_observer_stub_test.cpp index 6643fe276bd5dd1abd22a8b33ce2d23cb602d702..c4c915dadb8a12da02ed08caa83eba770a1d5c2a 100644 --- a/test/unittest/app_foreground_state_observer_stub_test/app_foreground_state_observer_stub_test.cpp +++ b/test/unittest/app_foreground_state_observer_stub_test/app_foreground_state_observer_stub_test.cpp @@ -52,25 +52,7 @@ void AppForegroundStateObserverStubTest::TearDown() {} /** - * @tc.number: HandleOnAppStateChanged_0100 - * @tc.desc: Test when processData is not nullptr. - * @tc.type: FUNC - */ -HWTEST_F(AppForegroundStateObserverStubTest, HandleOnAppStateChanged_0100, TestSize.Level1) -{ - auto stub = new (std::nothrow) MockAppForegroundStateObserverStub(); - EXPECT_TRUE(stub); - EXPECT_CALL(*stub, OnAppStateChanged(_)).Times(1); - MessageParcel data; - AppStateData appStateData; - data.WriteParcelable(&appStateData); - MessageParcel reply; - auto result = stub->HandleOnAppStateChanged(data, reply); - EXPECT_EQ(NO_ERROR, result); - testing::Mock::AllowLeak(stub); -} - -/** +>>>>>>> b96ec629b5c2d38d1627158fefda13ec3a1183c9 * @tc.number: OnRemoteRequest_0100 * @tc.desc: Test when descriptor and remoteDescriptor is different and * itFunc is not end memberFunc is not nullptr. diff --git a/test/unittest/app_foreground_state_observer_stub_test/mock_app_foreground_state_observer_stub.h b/test/unittest/app_foreground_state_observer_stub_test/mock_app_foreground_state_observer_stub.h index d61a16d97132c302aaebfe271547afd257bb85e1..8dad908b1c1440eada8fc68246bec909bdf012de 100644 --- a/test/unittest/app_foreground_state_observer_stub_test/mock_app_foreground_state_observer_stub.h +++ b/test/unittest/app_foreground_state_observer_stub_test/mock_app_foreground_state_observer_stub.h @@ -30,7 +30,7 @@ public: MockAppForegroundStateObserverStub() = default; virtual ~MockAppForegroundStateObserverStub() = default; - MOCK_METHOD1(OnAppStateChanged, void(const AppStateData &appStateData)); + MOCK_METHOD1(OnAppStateChanged, ErrCode(const AppStateData &appStateData)); }; } // namespace AppExecFwk } // namespace OHOS diff --git a/test/unittest/app_launch_data_test/BUILD.gn b/test/unittest/app_launch_data_test/BUILD.gn index e0148f96fc5a4b2875bae49b91b4d00960137446..71de17dd68d4779d0b482c6966c08b7e5adde011 100644 --- a/test/unittest/app_launch_data_test/BUILD.gn +++ b/test/unittest/app_launch_data_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 @@ -26,6 +26,8 @@ ohos_unittest("app_launch_data_test") { sources = [ "app_launch_data_test.cpp" ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] + deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", "${ability_runtime_innerkits_path}/app_manager:app_manager", diff --git a/test/unittest/app_mgr_proxy_test/app_mgr_proxy_test.cpp b/test/unittest/app_mgr_proxy_test/app_mgr_proxy_test.cpp index dcc5295348fe9d358b0fb4d80ccc62d38e5e7249..7d891e503c6fa28d3709449d0fb68365073c4b71 100644 --- a/test/unittest/app_mgr_proxy_test/app_mgr_proxy_test.cpp +++ b/test/unittest/app_mgr_proxy_test/app_mgr_proxy_test.cpp @@ -39,8 +39,10 @@ public: AppForegroundStateObserverMock() = default; virtual ~AppForegroundStateObserverMock() = default; - void OnAppStateChanged(const AppStateData &appStateData) override - {} + ErrCode OnAppStateChanged(const AppStateData &appStateData) override + { + return ERR_OK; + } }; class RenderStateObserverMock : public RenderStateObserverStub { @@ -955,7 +957,6 @@ HWTEST_F(AppMgrProxyTest, UpdateConfigurationForBackgroundApp_001, TestSize.Leve std::vector appInfos; ConfigurationPolicy policy; int32_t userId = -1; - auto ret = appMgrProxy_->UpdateConfigurationForBackgroundApp(appInfos, policy, userId); if (appInfos.size() == 0 || appInfos.size() > MAX_BACKGROUND_APP_COUNT) { EXPECT_EQ(ret, ERR_INVALID_DATA); diff --git a/test/unittest/app_mgr_service_inner_fifth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_fifth_test/BUILD.gn index 3b3d01c193ec3cff3c6feb33406a532fc57990df..51446b8b2bbdb2b300267c4bf9ff8d5d8ce07328 100644 --- a/test/unittest/app_mgr_service_inner_fifth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_fifth_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 @@ -45,7 +45,10 @@ ohos_unittest("AppMgrServiceInnerFifthTest") { "app_mgr_service_inner_fifth_test.cpp", ] - configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] deps = [ "${ability_runtime_path}/utils/server/startup:startup_util", diff --git a/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn index ba15d4f49525168df1af20b9aa3e1b8199092271..503ea10f94dd4383868e535bb84ecbb08ee97bd2 100644 --- a/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_fourth_test/BUILD.gn @@ -44,7 +44,10 @@ ohos_unittest("AppMgrServiceInnerFourthTest") { "mock/src/mock_permission_verification.cpp", ] - configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] cflags = [ "-Dprivate=public", diff --git a/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn b/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn index 2ac11e3423a5afa901e5ef8d0c3c2e3170688f15..f494ffde8c599c7b1b0e8083660716b9be4d5499 100644 --- a/test/unittest/app_mgr_service_inner_mock_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_mock_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 @@ -43,6 +43,11 @@ ohos_unittest("app_mgr_service_inner_mock_test") { "src/window_manager.cpp", ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] + deps = [] external_deps = [ diff --git a/test/unittest/app_mgr_service_inner_second_test/BUILD.gn b/test/unittest/app_mgr_service_inner_second_test/BUILD.gn index 4642c2ac9f2c042c325e9d23e4d0dd908d933973..fb5fba22eee88b25cb3cefcefb6119f54c787d78 100644 --- a/test/unittest/app_mgr_service_inner_second_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_second_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 @@ -53,7 +53,10 @@ ohos_unittest("AppMgrServiceInnerSecondTest") { "mock/src/mock_permission_verification.cpp", ] - configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] deps = [ "${ability_runtime_innerkits_path}/app_manager:app_manager", diff --git a/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn b/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn index 773704f9c646761ef8b269e38e645dca12f364db..eb0ea3aad8c08eefdf33c289feffba06ac598908 100644 --- a/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_seventh_test/BUILD.gn @@ -86,7 +86,10 @@ ohos_unittest("app_mgr_service_inner_seventh_test") { "mock/src/mock_user_record_manager.cpp", ] - configs = [] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] deps = [ "${ability_runtime_innerkits_path}/app_manager:app_manager", diff --git a/test/unittest/app_mgr_service_inner_sixth_test/BUILD.gn b/test/unittest/app_mgr_service_inner_sixth_test/BUILD.gn index 6bd784b776aecc6881cd42b3f6b1a5f9a67d6f5e..b17fa78f1c7733adee896dc6178d993f3e293a30 100644 --- a/test/unittest/app_mgr_service_inner_sixth_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_sixth_test/BUILD.gn @@ -45,7 +45,10 @@ ohos_unittest("app_mgr_service_inner_sixth_test") { "mock/src/mock_permission_verification.cpp", ] - configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] deps = [ "${ability_runtime_innerkits_path}/app_manager:app_manager", diff --git a/test/unittest/app_mgr_service_inner_sixth_test/app_mgr_service_inner_sixth_test.cpp b/test/unittest/app_mgr_service_inner_sixth_test/app_mgr_service_inner_sixth_test.cpp index 7000c31c56d34023d7267c5ddb77ec0afce8c3d2..91632261bbd8f1c793e786ce6ab6e00964637927 100644 --- a/test/unittest/app_mgr_service_inner_sixth_test/app_mgr_service_inner_sixth_test.cpp +++ b/test/unittest/app_mgr_service_inner_sixth_test/app_mgr_service_inner_sixth_test.cpp @@ -561,6 +561,7 @@ HWTEST_F(AppMgrServiceInnerSixthTest, UpdateConfigurationForBackgroundApp_001, T EXPECT_EQ(ret, ERR_NO_INIT); MyFlag::flag_ = 1; + appMgrServiceInner->appRunningManager_ = std::make_shared(); ret = appMgrServiceInner->UpdateConfigurationForBackgroundApp(appInfos, policy, userId); EXPECT_EQ(ret, ERR_PERMISSION_DENIED); diff --git a/test/unittest/app_mgr_service_inner_test/BUILD.gn b/test/unittest/app_mgr_service_inner_test/BUILD.gn index 300025bcefe46dab3ca56683b7392d0a7b05e965..98679cf85cd7d95992ec550ea8c5e7d44a8c00ba 100644 --- a/test/unittest/app_mgr_service_inner_test/BUILD.gn +++ b/test/unittest/app_mgr_service_inner_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 @@ -44,7 +44,10 @@ ohos_unittest("AppMgrServiceInnerTest") { "app_mgr_service_inner_test.cpp", ] - configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", + ] deps = [ "${ability_runtime_path}/utils/server/startup:startup_util", diff --git a/test/unittest/app_mgr_stub_test/app_mgr_stub_test.cpp b/test/unittest/app_mgr_stub_test/app_mgr_stub_test.cpp index 7cdbab6100cb6b8934dde76ddf2957e339c410c8..0c3b84b4fa46c2270fda8e6030dc681411ff5aa9 100644 --- a/test/unittest/app_mgr_stub_test/app_mgr_stub_test.cpp +++ b/test/unittest/app_mgr_stub_test/app_mgr_stub_test.cpp @@ -41,8 +41,10 @@ class AppForegroundStateObserverMock : public AppForegroundStateObserverStub { public: AppForegroundStateObserverMock() = default; virtual ~AppForegroundStateObserverMock() = default; - void OnAppStateChanged(const AppStateData &appStateData) override - {} + ErrCode OnAppStateChanged(const AppStateData &appStateData) override + { + return ERR_OK; + } }; class RenderStateObserverMock : public RenderStateObserverStub { diff --git a/test/unittest/app_preloader_test/BUILD.gn b/test/unittest/app_preloader_test/BUILD.gn index e271f94abcbddec64cbed76f09af70efe866f520..a9f9e6e418d345c283dd6c9c385424d4ced48182 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 @@ -19,7 +19,10 @@ module_output_path = "ability_runtime/ability_runtime/appmgrservice" ohos_unittest("app_preloader_test") { module_out_path = module_output_path - configs = [ "${ability_runtime_services_path}/common:common_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/common:common_config", + ] include_dirs = [ "include", diff --git a/test/unittest/app_scheduler_host_test/BUILD.gn b/test/unittest/app_scheduler_host_test/BUILD.gn index 41437905c0c159f3b439066d1f633edf040add85..7cc227466339f4bdfd790025dd2aad2d3460e8b1 100644 --- a/test/unittest/app_scheduler_host_test/BUILD.gn +++ b/test/unittest/app_scheduler_host_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 @@ -20,6 +20,7 @@ ohos_unittest("app_scheduler_host_test") { module_out_path = module_output_path configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/common:common_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] diff --git a/test/unittest/app_scheduler_proxy_test/BUILD.gn b/test/unittest/app_scheduler_proxy_test/BUILD.gn index 158d13e88fa9a643dfa833a41bfe7753bf8186e1..b55c8ddb0a6646b4c171af5e8e777b890f7ecb34 100644 --- a/test/unittest/app_scheduler_proxy_test/BUILD.gn +++ b/test/unittest/app_scheduler_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 @@ -20,6 +20,7 @@ ohos_unittest("app_scheduler_proxy_test") { module_out_path = module_output_path configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_services_path}/common:common_config", "${ability_runtime_services_path}/abilitymgr:abilityms_config", ] diff --git a/test/unittest/app_state_observer_manager_test/BUILD.gn b/test/unittest/app_state_observer_manager_test/BUILD.gn index 44be34d331acf67b4cf788744e5ff9448b00bdff..8ea2c00e714f30eba0077d33ca6e64e73cbdf082 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 @@ -34,7 +34,10 @@ ohos_unittest("app_state_observer_manager_test") { sources += [ "app_state_observer_manager_test.cpp" ] - configs = [ "${ability_runtime_test_path}/unittest:appmgr_test_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_test_path}/unittest:appmgr_test_config", + ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/app_state_observer_manager_test/app_state_observer_manager_test.cpp b/test/unittest/app_state_observer_manager_test/app_state_observer_manager_test.cpp index f111a1b1ab29fa78afdff712d7ccd3c110f578f3..df2c1c13cbac4b4de8eb54e99e20b7d5e6544b87 100644 --- a/test/unittest/app_state_observer_manager_test/app_state_observer_manager_test.cpp +++ b/test/unittest/app_state_observer_manager_test/app_state_observer_manager_test.cpp @@ -69,8 +69,10 @@ class AppForegroundStateObserver : public AppForegroundStateObserverStub { public: AppForegroundStateObserver() = default; virtual ~AppForegroundStateObserver() = default; - void OnAppStateChanged(const AppStateData &appStateData) override - {} + ErrCode OnAppStateChanged(const AppStateData &appStateData) override + { + return ERR_OK; + } }; class AppSpawnSocketTest : public testing::Test { public: diff --git a/test/unittest/app_state_observer_manager_test_second/app_state_observer_manager_test_second.cpp b/test/unittest/app_state_observer_manager_test_second/app_state_observer_manager_test_second.cpp index 44d9810de9b59f7f5fc16c31fa970fee7a344324..cfd64ceaa8e389301250a2538d18f4f06acff420 100644 --- a/test/unittest/app_state_observer_manager_test_second/app_state_observer_manager_test_second.cpp +++ b/test/unittest/app_state_observer_manager_test_second/app_state_observer_manager_test_second.cpp @@ -87,8 +87,10 @@ class AppForegroundStateObserver : public AppForegroundStateObserverStub { public: AppForegroundStateObserver() = default; virtual ~AppForegroundStateObserver() = default; - void OnAppStateChanged(const AppStateData &appStateData) override - {} + ErrCode OnAppStateChanged(const AppStateData &appStateData) override + { + return ERR_OK; + } }; class AppStateObserverManagerTestSecond : public testing::Test { public: diff --git a/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_proxy_test/BUILD.gn b/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_proxy_test/BUILD.gn index 69e91415a58efe62c0d1f43f715785e22307da88..995717d62d55ec4fb3167f1876cd263ef3a5706b 100644 --- a/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_proxy_test/BUILD.gn +++ b/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_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 @@ -49,6 +49,7 @@ config("ability_config") { "${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/kits", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_test/BUILD.gn b/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_test/BUILD.gn index 21b23e0f964446e55a81db3ef2182d56f051f143..040be09fbc8611e846e9d1e874f4693ce9bc4137 100644 --- a/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_test/BUILD.gn +++ b/test/unittest/continuation_test/remote_register_service_test/continuation_register_manager_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 @@ -49,6 +49,7 @@ config("ability_config") { "${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/kits", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn b/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn index 087d5d57b38146af3db0f6aa15ffed295f768cb9..27d31e47fb3cbe2ea71086f1e7fea9346acb17a4 100644 --- a/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn +++ b/test/unittest/dfr_test/appfreeze_inner_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 @@ -27,6 +27,7 @@ config("module_context_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app/task", "${ability_runtime_path}/interfaces/kits/native/ability/native", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn b/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn index 9bdb269886e1386d30e7298db8db242df0993a25..a5673bce196ad8eccd56fb8d6db8284bfed6ed42 100644 --- a/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn +++ b/test/unittest/dfr_test/appfreeze_manager_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 @@ -27,6 +27,7 @@ config("module_context_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app/task", "${ability_runtime_path}/interfaces/kits/native/ability/native", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn b/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn index 642724b8179cbc30aa40f81d78a091996deee606..faf2d265cfb43100130fb43185a38469e0099c89 100644 --- a/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn +++ b/test/unittest/dfr_test/appfreeze_state_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 @@ -27,6 +27,7 @@ config("module_context_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app/task", "${ability_runtime_path}/interfaces/kits/native/ability/native", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/dfr_test/watchdog_test/BUILD.gn b/test/unittest/dfr_test/watchdog_test/BUILD.gn index 7d977ca14785d8bdd9e5f2bf001f48a3bcf0deb2..43acbefb361959fa7610a25075f1b3cb0cc65a69 100644 --- a/test/unittest/dfr_test/watchdog_test/BUILD.gn +++ b/test/unittest/dfr_test/watchdog_test/BUILD.gn @@ -27,6 +27,7 @@ config("module_context_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app/task", "${ability_runtime_path}/interfaces/kits/native/ability/native", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/ecological_rule_interceptor_test/BUILD.gn b/test/unittest/ecological_rule_interceptor_test/BUILD.gn index 85e1abcf7e6128ca53d8db71edd59cf4f70a0058..802c59b5f32284d91f4340810b59516145723f1e 100644 --- a/test/unittest/ecological_rule_interceptor_test/BUILD.gn +++ b/test/unittest/ecological_rule_interceptor_test/BUILD.gn @@ -35,6 +35,8 @@ ohos_unittest("ecological_rule_interceptor_test") { ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", "${ability_runtime_test_path}/mock/services_abilitymgr_test:aafwk_mock_config", ] cflags = [ diff --git a/test/unittest/extension_control_interceptor_test/BUILD.gn b/test/unittest/extension_control_interceptor_test/BUILD.gn index 7562440b90968072720b162db3bacc0c22bbff9d..c515d8cdede3f5c1d224873f17d422af17d67437 100644 --- a/test/unittest/extension_control_interceptor_test/BUILD.gn +++ b/test/unittest/extension_control_interceptor_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 @@ -30,7 +30,10 @@ ohos_unittest("extension_control_interceptor_test") { ] cflags = [] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", diff --git a/test/unittest/frameworks_kits_ability_native_test/BUILD.gn b/test/unittest/frameworks_kits_ability_native_test/BUILD.gn index 475cb31348ad87bfb25212c2eadea84272afab33..5d925fec2def0a8ac08a60bfbb6622740541e09d 100644 --- a/test/unittest/frameworks_kits_ability_native_test/BUILD.gn +++ b/test/unittest/frameworks_kits_ability_native_test/BUILD.gn @@ -43,6 +43,7 @@ config("module_private_config") { "${ability_runtime_test_path}/mock/services_appmgr_test/include", "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -60,6 +61,7 @@ config("module_ability_context_config") { "${ability_runtime_path}/interfaces/kits/native/ability/native", "${ability_runtime_path}/interfaces/kits/native/appkit/app", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn b/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn index bea5089ae746e30037f88870954e304eaa757e26..c0abd115083cd67131a4d8534374484e4ca58160 100644 --- a/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn +++ b/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn @@ -28,6 +28,7 @@ config("module_private_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app/task", "${ability_runtime_path}/interfaces/kits/native/appkit/app_startup", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -46,6 +47,7 @@ config("module_context_config") { "${ability_runtime_path}/interfaces/kits/native/appkit/app_startup", "${ability_runtime_path}/interfaces/kits/native/ability/native", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/insight_intent/insight_intent_execute_manager_second_test/BUILD.gn b/test/unittest/insight_intent/insight_intent_execute_manager_second_test/BUILD.gn index 83f137e6c1d208785d5b1910fe76a51cbc6b7832..d459e412824f13b2fe63e6734b98378ae28ecfd0 100644 --- a/test/unittest/insight_intent/insight_intent_execute_manager_second_test/BUILD.gn +++ b/test/unittest/insight_intent/insight_intent_execute_manager_second_test/BUILD.gn @@ -39,7 +39,10 @@ ohos_unittest("insight_intent_execute_manager_second_test") { "insight_intent_execute_manager_second_test.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [ "-Dprivate=public", diff --git a/test/unittest/js_auto_fill_extension_test/BUILD.gn b/test/unittest/js_auto_fill_extension_test/BUILD.gn index b1fdcd9108103130b1362d2d9f699a4af443c5c0..19c9a9d1785d06d1445a3e8561c0928ee0ef3575 100644 --- a/test/unittest/js_auto_fill_extension_test/BUILD.gn +++ b/test/unittest/js_auto_fill_extension_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 @@ -31,7 +31,10 @@ ohos_unittest("js_auto_fill_extension_test") { sources = [ "js_auto_fill_extension_test.cpp" ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] deps = [ "${ability_runtime_native_path}/ability/native:abilitykit_native", "${ability_runtime_native_path}/ability/native:ui_extension", diff --git a/test/unittest/js_photo_editor_extension_context_test/BUILD.gn b/test/unittest/js_photo_editor_extension_context_test/BUILD.gn index 977eb29d2bffdef30c156ad4cf958bcfa4ab0259..7d79cbe0937a930ad2590eb44f1c4a7167f7eec9 100644 --- a/test/unittest/js_photo_editor_extension_context_test/BUILD.gn +++ b/test/unittest/js_photo_editor_extension_context_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 @@ -34,6 +34,7 @@ config("module_private_config") { "${ability_runtime_test_path}/mock/services_appmgr_test/include", "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -56,6 +57,7 @@ config("module_ability_context_config") { "//third_party/libuv/include", "${global_path}/resource_management/interfaces/inner_api/include", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/js_photo_editor_extension_impl_test/BUILD.gn b/test/unittest/js_photo_editor_extension_impl_test/BUILD.gn index e2e9c578dbc489244fdd1fa5af30d0ea7271ea95..a1b2edd3d1c5ae4d2bebf1abbd8357a5f86a0944 100644 --- a/test/unittest/js_photo_editor_extension_impl_test/BUILD.gn +++ b/test/unittest/js_photo_editor_extension_impl_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 @@ -34,6 +34,7 @@ config("module_private_config") { "${ability_runtime_test_path}/mock/services_appmgr_test/include", "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -56,6 +57,7 @@ config("module_ability_context_config") { "//third_party/libuv/include", "${global_path}/resource_management/interfaces/inner_api/include", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/js_service_extension_test/BUILD.gn b/test/unittest/js_service_extension_test/BUILD.gn index 62484ae5ad5760cc46a5a7cc07aa4395013a858d..039d5afd2abe349aa270c15cf9a8439d848e020c 100644 --- a/test/unittest/js_service_extension_test/BUILD.gn +++ b/test/unittest/js_service_extension_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 @@ -33,7 +33,10 @@ ohos_unittest("js_service_extension_test") { "js_service_extension_test.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] deps = [ "${ability_runtime_native_path}/ability/native:insight_intent_executor", "${ability_runtime_native_path}/insight_intent/insight_intent_context:insightintentcontext", diff --git a/test/unittest/photo_editor_extension_a_test/BUILD.gn b/test/unittest/photo_editor_extension_a_test/BUILD.gn index ec17657ea56c284bd1c35dfc01c2618aa9b8f9f3..0463fd30108816949cf39d85a83e76daa25e8374 100644 --- a/test/unittest/photo_editor_extension_a_test/BUILD.gn +++ b/test/unittest/photo_editor_extension_a_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 @@ -34,6 +34,7 @@ config("module_private_config") { "${ability_runtime_test_path}/mock/services_appmgr_test/include", "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -54,6 +55,7 @@ config("module_ability_context_config") { "//third_party/libuv/include", "${global_path}/resource_management/interfaces/inner_api/include", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/photo_editor_extension_test/BUILD.gn b/test/unittest/photo_editor_extension_test/BUILD.gn index 5b7855ace25653ecc3d73141db239aa9c6f4bf78..59497251e53383014de671ab7b691862171857b0 100644 --- a/test/unittest/photo_editor_extension_test/BUILD.gn +++ b/test/unittest/photo_editor_extension_test/BUILD.gn @@ -34,6 +34,7 @@ config("module_private_config") { "${ability_runtime_test_path}/mock/services_appmgr_test/include", "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -56,6 +57,7 @@ config("module_ability_context_config") { "//third_party/libuv/include", "${global_path}/resource_management/interfaces/inner_api/include", ] + configs = [ "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn b/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn index ad6b0a0c3d9e2fa7cb1ce5ef3d0931962a7b5a4a..f228c4b49548f6f2faa32ad95b2f633053ed0452 100644 --- a/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn +++ b/test/unittest/ui_ability_lifecycle_manager_second_test/BUILD.gn @@ -76,6 +76,7 @@ ohos_unittest("ui_ability_lifecycle_manager_second_test") { "ability_base:session_info", "ability_base:want", "ability_base:zuri", + "ability_runtime:app_manager", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", diff --git a/test/unittest/ui_extension/extension_record_manager_second_test/BUILD.gn b/test/unittest/ui_extension/extension_record_manager_second_test/BUILD.gn index 1fd9584209a76bc32b41eddffe62969cdb90c841..e476b72c4e16762121a5692ec296373ef21d06fe 100644 --- a/test/unittest/ui_extension/extension_record_manager_second_test/BUILD.gn +++ b/test/unittest/ui_extension/extension_record_manager_second_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 @@ -58,7 +58,10 @@ ohos_unittest("extension_record_manager_second_test") { "mock/src/mock_permission_verification.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/unittest/ui_extension/extension_record_manager_test/BUILD.gn b/test/unittest/ui_extension/extension_record_manager_test/BUILD.gn index 8619df37f748e73558b55238bf4848b6c6a92ddc..e86677cffc298266cd629896f3b41cffa94f59b4 100755 --- a/test/unittest/ui_extension/extension_record_manager_test/BUILD.gn +++ b/test/unittest/ui_extension/extension_record_manager_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 @@ -53,7 +53,10 @@ ohos_unittest("extension_record_manager_test") { "extension_record_manager_test.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/unittest/ui_extension/ui_extension_get_host_info_test/BUILD.gn b/test/unittest/ui_extension/ui_extension_get_host_info_test/BUILD.gn index 48b493a8417e402a0713cad1730adddadbac3aa6..07f2bfcf5f11db64c9e69da2c7e2eb152c5adda4 100644 --- a/test/unittest/ui_extension/ui_extension_get_host_info_test/BUILD.gn +++ b/test/unittest/ui_extension/ui_extension_get_host_info_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 @@ -31,7 +31,10 @@ ohos_unittest("ui_extension_get_host_info_test") { "ui_extension_get_host_info_test.cpp", ] - configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] + configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] cflags = [] if (target_cpu == "arm") { diff --git a/test/unittest/uri_perm_mgr_test/BUILD.gn b/test/unittest/uri_perm_mgr_test/BUILD.gn index 10938bea0296325e2acea090f045cc474aa4eabd..de6abad3171519e9404c5cde2d4c0973afdb1a3f 100644 --- a/test/unittest/uri_perm_mgr_test/BUILD.gn +++ b/test/unittest/uri_perm_mgr_test/BUILD.gn @@ -41,6 +41,7 @@ ohos_unittest("uri_perm_mgr_test") { configs = [ ":coverage_flags", + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", ] cflags = [] diff --git a/test/unittest/uri_permission_test/BUILD.gn b/test/unittest/uri_permission_test/BUILD.gn index 2f569c16886c37daf5cb8b9e579537d00ff8efa7..789678a13af4ed62d0459230f99fa3960d8c2d7c 100755 --- a/test/unittest/uri_permission_test/BUILD.gn +++ b/test/unittest/uri_permission_test/BUILD.gn @@ -29,6 +29,7 @@ ohos_unittest("uri_permission_test") { sources = [ "uri_permission_test.cpp" ] configs = [ + "${ability_runtime_innerkits_path}/app_manager:appmgr_innerkits_config", "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", "${ability_runtime_innerkits_path}/uri_permission:uripermkit_public_config", "${ability_runtime_services_path}/uripermmgr:upms_config", diff --git a/tools/aa/BUILD.gn b/tools/aa/BUILD.gn index d6ec4e440c24ab088a7c976c62ade9d8402e6b8c..a75b6872837fc1ef4b6074a3832a03e73654866e 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") {