diff --git a/ability_runtime.gni b/ability_runtime.gni index 598cd1ce66..c7bbda0e76 100644 --- a/ability_runtime.gni +++ b/ability_runtime.gni @@ -22,7 +22,6 @@ ability_runtime_system_test_app_path = "${ability_runtime_path}/test/resource/amssystemtestability/abilitySrc" bundlefwk_path = "//foundation/bundlemanager/bundle_framework" -bundlefwk_innerkits_path = "${bundlefwk_path}/interfaces/innerkits" bundlefwk_inner_api_path = "${bundlefwk_path}/interfaces/inner_api" multimedia_path = "//foundation/multimedia/image_standard" @@ -38,12 +37,17 @@ distributeddatamgr_path = "//foundation/distributeddatamgr" form_fwk_napi_path = "${form_fwk_path}/frameworks/js/napi" ability_base_innerapi_path = "${ability_base_path}/interfaces/inner_api" ability_base_native_path = "${ability_base_path}/frameworks/native" +appspawn_path = "//base/startup/appspawn" declare_args() { background_task_mgr_continuous_task_enable = true distributed_data_object_enable = true ability_runtime_graphics = true ability_runtime_power = true + ability_runtime_relational = true + ability_runtime_ces = true + ability_runtime_resource = true + ability_runtime_appspawn = true if (!defined(global_parts_info) || defined(global_parts_info.account_os_account)) { @@ -51,6 +55,7 @@ declare_args() { } else { os_account_part_enabled = false } + if (defined(global_parts_info) && !defined(global_parts_info.resourceschedule_background_task_mgr)) { background_task_mgr_continuous_task_enable = false @@ -60,4 +65,24 @@ declare_args() { !defined(global_parts_info.distributeddatamgr_distributeddataobject)) { distributed_data_object_enable = false } + + if (defined(global_parts_info) && + !defined(global_parts_info.distributeddatamgr_relational_store)) { + ability_runtime_relational = false + } + + if (defined(global_parts_info) && + !defined(global_parts_info.notification_common_event_service)) { + ability_runtime_ces = false + } + + if (defined(global_parts_info) && + !defined(global_parts_info.global_resource_management)) { + ability_runtime_resource = false + } + + if (defined(global_parts_info) && + !defined(global_parts_info.startup_appspawn)) { + ability_runtime_appspawn = false + } } diff --git a/frameworks/js/napi/aafwk/ability_manager/BUILD.gn b/frameworks/js/napi/aafwk/ability_manager/BUILD.gn index db3ed29617..d079f22426 100644 --- a/frameworks/js/napi/aafwk/ability_manager/BUILD.gn +++ b/frameworks/js/napi/aafwk/ability_manager/BUILD.gn @@ -29,7 +29,7 @@ ohos_shared_library("abilitymanager_napi") { ] deps = [ - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", "${ability_runtime_services_path}/abilitymgr:abilityms", ] @@ -47,7 +47,6 @@ ohos_shared_library("abilitymanager_napi") { "ipc:ipc_core", "ipc_js:rpc", "napi:ace_napi", - "resource_management:global_resmgr", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "utils_base:utils", diff --git a/frameworks/js/napi/aafwk/ability_manager/js_ability_manager.cpp b/frameworks/js/napi/aafwk/ability_manager/js_ability_manager.cpp index 82546118c9..e96b00b248 100644 --- a/frameworks/js/napi/aafwk/ability_manager/js_ability_manager.cpp +++ b/frameworks/js/napi/aafwk/ability_manager/js_ability_manager.cpp @@ -95,8 +95,9 @@ private: NativeValue* lastParam = (info.argc == 0) ? nullptr : info.argv[0]; NativeValue* result = nullptr; - AsyncTask::Schedule( - engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); + AsyncTask::Schedule("JsAbilityManager::OnGetAbilityRunningInfos", + engine, CreateAsyncTaskWithLastParam(engine, + lastParam, nullptr, std::move(complete), &result)); return result; } @@ -126,8 +127,9 @@ private: NativeValue* lastParam = (info.argc == 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( - engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); + AsyncTask::Schedule("JsAbilityManager::OnGetExtensionRunningInfos", + engine, CreateAsyncTaskWithLastParam(engine, + lastParam, nullptr, std::move(complete), &result)); return result; } @@ -166,8 +168,9 @@ private: NativeValue* lastParam = (info.argc == 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( - engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); + AsyncTask::Schedule("JsAbilityManager::OnGetExtensionRunningInfos", + engine, CreateAsyncTaskWithLastParam(engine, + lastParam, nullptr, std::move(complete), &result)); return result; } @@ -182,8 +185,9 @@ private: NativeValue* lastParam = (info.argc == 0) ? nullptr : info.argv[0]; NativeValue* result = nullptr; - AsyncTask::Schedule( - engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); + AsyncTask::Schedule("JsAbilityManager::OnGetTopAbility", + engine, CreateAsyncTaskWithLastParam(engine, + lastParam, nullptr, std::move(complete), &result)); return result; } }; diff --git a/frameworks/js/napi/aafwk/app/ability_delegator/BUILD.gn b/frameworks/js/napi/aafwk/app/ability_delegator/BUILD.gn index 13130bc072..23fe5a17da 100644 --- a/frameworks/js/napi/aafwk/app/ability_delegator/BUILD.gn +++ b/frameworks/js/napi/aafwk/app/ability_delegator/BUILD.gn @@ -35,7 +35,7 @@ ohos_shared_library("abilitydelegatorregistry") { "${ability_runtime_kits_path}/appkit:app_context", "${ability_runtime_kits_path}/appkit:app_context_utils", "${ability_runtime_kits_path}/appkit:appkit_delegator", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", ] external_deps = [ diff --git a/frameworks/js/napi/aafwk/app/ability_delegator/js_ability_delegator.cpp b/frameworks/js/napi/aafwk/app/ability_delegator/js_ability_delegator.cpp index 8e061c8ce0..344a3dd7a2 100644 --- a/frameworks/js/napi/aafwk/app/ability_delegator/js_ability_delegator.cpp +++ b/frameworks/js/napi/aafwk/app/ability_delegator/js_ability_delegator.cpp @@ -180,7 +180,7 @@ NativeValue *JSAbilityDelegator::OnAddAbilityMonitor(NativeEngine &engine, Nativ NativeValue *lastParam = (info.argc > ARGC_ONE) ? info.argv[INDEX_ONE] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnAddAbilityMonitor", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -209,8 +209,9 @@ NativeValue *JSAbilityDelegator::OnRemoveAbilityMonitor(NativeEngine &engine, Na NativeValue *lastParam = (info.argc > ARGC_ONE) ? info.argv[INDEX_ONE] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( - engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); + AsyncTask::Schedule("JSAbilityDelegator::OnRemoveAbilityMonitor", + engine, CreateAsyncTaskWithLastParam(engine, + lastParam, nullptr, std::move(complete), &result)); if (AbilityDelegatorRegistry::GetAbilityDelegator()) { for (auto iter = monitorRecord_.begin(); iter != monitorRecord_.end(); ++iter) { @@ -283,7 +284,7 @@ NativeValue *JSAbilityDelegator::OnWaitAbilityMonitor(NativeEngine &engine, Nati } NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnWaitAbilityMonitor", engine, CreateAsyncTaskWithLastParam(engine, lastParam, std::move(execute), std::move(complete), &result)); return result; } @@ -311,7 +312,7 @@ NativeValue *JSAbilityDelegator::OnPrint(NativeEngine &engine, NativeCallbackInf NativeValue *lastParam = (info.argc > ARGC_ONE) ? info.argv[INDEX_ONE] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnPrint", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -387,7 +388,7 @@ NativeValue *JSAbilityDelegator::OnExecuteShellCommand(NativeEngine &engine, Nat } NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnExecuteShellCommand:" + cmd, engine, CreateAsyncTaskWithLastParam(engine, lastParam, std::move(execute), std::move(complete), &result)); return result; } @@ -470,7 +471,7 @@ NativeValue *JSAbilityDelegator::OnGetCurrentTopAbility(NativeEngine &engine, Na NativeValue *lastParam = (info.argc >= ARGC_ONE) ? info.argv[INDEX_ZERO] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnGetCurrentTopAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -502,7 +503,7 @@ NativeValue *JSAbilityDelegator::OnStartAbility(NativeEngine &engine, NativeCall NativeValue *lastParam = (info.argc > ARGC_ONE) ? info.argv[INDEX_ONE] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnStartAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -530,7 +531,7 @@ NativeValue *JSAbilityDelegator::OnDoAbilityForeground(NativeEngine &engine, Nat NativeValue *lastParam = (info.argc > ARGC_ONE) ? info.argv[INDEX_ONE] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnDoAbilityForeground", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -558,7 +559,7 @@ NativeValue *JSAbilityDelegator::OnDoAbilityBackground(NativeEngine &engine, Nat NativeValue *lastParam = (info.argc > ARGC_ONE) ? info.argv[INDEX_ONE] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnDoAbilityBackground", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -586,7 +587,7 @@ NativeValue *JSAbilityDelegator::OnFinishTest(NativeEngine &engine, NativeCallba }; NativeValue *lastParam = (info.argc > ARGC_TWO) ? info.argv[INDEX_TWO] : nullptr; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAbilityDelegator::OnFinishTest", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } diff --git a/frameworks/js/napi/aafwk/app/app_manager/BUILD.gn b/frameworks/js/napi/aafwk/app/app_manager/BUILD.gn index 444ab97eae..63161e958b 100644 --- a/frameworks/js/napi/aafwk/app/app_manager/BUILD.gn +++ b/frameworks/js/napi/aafwk/app/app_manager/BUILD.gn @@ -27,9 +27,9 @@ ohos_shared_library("appmanager_napi") { "js_app_manager_utils.cpp", ] - configs = [ "${ability_runtime_path}/services/common:common_config" ] + configs = [ "${ability_runtime_services_path}/common:common_config" ] - deps = [ "${ability_runtime_path}/services/abilitymgr:abilityms" ] + deps = [ "${ability_runtime_services_path}/abilitymgr:abilityms" ] external_deps = [ "ability_base:base", diff --git a/frameworks/js/napi/aafwk/app/app_manager/js_app_manager.cpp b/frameworks/js/napi/aafwk/app/app_manager/js_app_manager.cpp index 1cd0d6b220..9689561647 100644 --- a/frameworks/js/napi/aafwk/app/app_manager/js_app_manager.cpp +++ b/frameworks/js/napi/aafwk/app/app_manager/js_app_manager.cpp @@ -142,7 +142,7 @@ private: }; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnRegisterApplicationStateObserver", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return engine.CreateNumber(observerId); } @@ -195,7 +195,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[INDEX_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnUnregisterApplicationStateObserver", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -229,7 +229,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_ZERO) ? nullptr : info.argv[INDEX_ZERO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnGetForegroundApplications", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -250,7 +250,7 @@ private: NativeValue* lastParam = (info.argc == 0) ? nullptr : info.argv[0]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnGetProcessRunningInfos", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -277,7 +277,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_ZERO) ? nullptr : info.argv[INDEX_ZERO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnIsRunningInStabilityTest", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -292,7 +292,7 @@ private: std::string bundleName; if (!ConvertFromJsValue(engine, info.argv[0], bundleName)) { - HILOG_ERROR("get bundelName failed!"); + HILOG_ERROR("get bundleName failed!"); return engine.CreateUndefined(); } @@ -314,7 +314,7 @@ private: NativeValue* lastParam = (info.argc == 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnkillProcess", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -329,7 +329,7 @@ private: std::string bundleName; if (!ConvertFromJsValue(engine, info.argv[0], bundleName)) { - HILOG_ERROR("get bundelName failed!"); + HILOG_ERROR("get bundleName failed!"); return engine.CreateUndefined(); } @@ -351,7 +351,7 @@ private: NativeValue* lastParam = (info.argc == 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnClearUpApplicationData", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -386,7 +386,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_TWO) ? nullptr : info.argv[INDEX_TWO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSAppManager::OnKillProcessWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -473,7 +473,7 @@ void JSApplicationStateObserver::OnForegroundApplicationChanged(const AppStateDa }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSApplicationStateObserver::OnForegroundApplicationChanged", engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } @@ -500,7 +500,7 @@ void JSApplicationStateObserver::OnAbilityStateChanged(const AbilityStateData &a }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSApplicationStateObserver::OnAbilityStateChanged", engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } @@ -526,7 +526,7 @@ void JSApplicationStateObserver::OnExtensionStateChanged(const AbilityStateData }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSApplicationStateObserver::OnExtensionStateChanged", engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } @@ -552,7 +552,7 @@ void JSApplicationStateObserver::OnProcessCreated(const ProcessData &processData }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSApplicationStateObserver::OnProcessCreated", engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } @@ -578,7 +578,7 @@ void JSApplicationStateObserver::OnProcessDied(const ProcessData &processData) }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSApplicationStateObserver::OnProcessCreated", engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } diff --git a/frameworks/js/napi/aafwk/app/error_manager/BUILD.gn b/frameworks/js/napi/aafwk/app/error_manager/BUILD.gn index 1bab1a984a..8922c7279d 100644 --- a/frameworks/js/napi/aafwk/app/error_manager/BUILD.gn +++ b/frameworks/js/napi/aafwk/app/error_manager/BUILD.gn @@ -27,9 +27,9 @@ ohos_shared_library("errormanager_napi") { "js_error_observer.cpp", ] - configs = [ "${ability_runtime_path}/services/common:common_config" ] + configs = [ "${ability_runtime_services_path}/common:common_config" ] - deps = [ "${ability_runtime_path}/frameworks/kits/appkit:appkit_native" ] + deps = [ "${ability_runtime_kits_path}/appkit:appkit_native" ] external_deps = [ "ability_base:base", diff --git a/frameworks/js/napi/aafwk/app/error_manager/js_error_manager.cpp b/frameworks/js/napi/aafwk/app/error_manager/js_error_manager.cpp index 219a8de17b..d96ce718d1 100644 --- a/frameworks/js/napi/aafwk/app/error_manager/js_error_manager.cpp +++ b/frameworks/js/napi/aafwk/app/error_manager/js_error_manager.cpp @@ -114,7 +114,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[INDEX_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSErrorManager::OnUnregisterErrorObserver", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } diff --git a/frameworks/js/napi/aafwk/app/error_manager/js_error_observer.cpp b/frameworks/js/napi/aafwk/app/error_manager/js_error_observer.cpp index b336c008b0..b775a46186 100644 --- a/frameworks/js/napi/aafwk/app/error_manager/js_error_observer.cpp +++ b/frameworks/js/napi/aafwk/app/error_manager/js_error_observer.cpp @@ -42,7 +42,7 @@ void JsErrorObserver::OnUnhandledException(std::string errMsg) }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsErrorObserver::OnUnhandledException", engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } diff --git a/frameworks/js/napi/aafwk/extensioncontext/extension_context.js b/frameworks/js/napi/aafwk/extensioncontext/extension_context.js index efd518fc1b..792ab6ad65 100644 --- a/frameworks/js/napi/aafwk/extensioncontext/extension_context.js +++ b/frameworks/js/napi/aafwk/extensioncontext/extension_context.js @@ -19,6 +19,7 @@ class ExtensionContext extends Context { super(obj); this.currentHapModuleInfo = obj.currentHapModuleInfo this.config = obj.config + this.extensionAbilityInfo = obj.extensionAbilityInfo } onUpdateConfiguration(config) { diff --git a/frameworks/js/napi/aafwk/featureAbility/BUILD.gn b/frameworks/js/napi/aafwk/featureAbility/BUILD.gn index c8533f0c34..5d9fca51ca 100644 --- a/frameworks/js/napi/aafwk/featureAbility/BUILD.gn +++ b/frameworks/js/napi/aafwk/featureAbility/BUILD.gn @@ -36,7 +36,7 @@ ohos_shared_library("featureability") { deps = [ "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", "${ability_runtime_kits_path}/appkit:appkit_native", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", "//third_party/libuv:uv_static", ] @@ -56,7 +56,6 @@ ohos_shared_library("featureability") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "napi:ace_napi", - "relational_store:native_appdatafwk", "relational_store:native_rdb", "relational_store:rdb_data_share_adapter", "utils_base:utils", diff --git a/frameworks/js/napi/aafwk/feature_ability/BUILD.gn b/frameworks/js/napi/aafwk/feature_ability/BUILD.gn index c0e9e4aa7c..9c84008a76 100644 --- a/frameworks/js/napi/aafwk/feature_ability/BUILD.gn +++ b/frameworks/js/napi/aafwk/feature_ability/BUILD.gn @@ -25,7 +25,7 @@ ohos_shared_library("featureability_napi") { configs = [ "${ability_runtime_services_path}/common:common_config" ] - deps = [ "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common" ] + deps = [ "${ability_runtime_napi_path}/inner/napi_common:napi_common" ] external_deps = [ "ability_base:want", diff --git a/frameworks/js/napi/aafwk/feature_ability/js_feature_ability.cpp b/frameworks/js/napi/aafwk/feature_ability/js_feature_ability.cpp index 12d9a67c70..a749f821f8 100644 --- a/frameworks/js/napi/aafwk/feature_ability/js_feature_ability.cpp +++ b/frameworks/js/napi/aafwk/feature_ability/js_feature_ability.cpp @@ -127,7 +127,7 @@ NativeValue* JsFeatureAbility::OnStartAbility(NativeEngine &engine, NativeCallba }; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSFeatureAbility::OnStartAbility", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return result; } @@ -234,7 +234,7 @@ NativeValue *JsFeatureAbility::OnFinishWithResult(NativeEngine &engine, NativeCa }; NativeValue *result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSFeatureAbility::OnFinishWithResult", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return result; } diff --git a/frameworks/js/napi/aafwk/inner/napi_common/BUILD.gn b/frameworks/js/napi/aafwk/inner/napi_common/BUILD.gn index 6406aacf0c..c7671318c5 100644 --- a/frameworks/js/napi/aafwk/inner/napi_common/BUILD.gn +++ b/frameworks/js/napi/aafwk/inner/napi_common/BUILD.gn @@ -53,8 +53,6 @@ ohos_shared_library("napi_common") { "ipc:ipc_core", "ipc_js:rpc", "napi:ace_napi", - "relational_store:native_appdatafwk", - "relational_store:native_rdb", "utils_base:utils", ] diff --git a/frameworks/js/napi/aafwk/inner/napi_common/napi_common_ability.cpp b/frameworks/js/napi/aafwk/inner/napi_common/napi_common_ability.cpp index 14fd22852f..7425eeed9c 100644 --- a/frameworks/js/napi/aafwk/inner/napi_common/napi_common_ability.cpp +++ b/frameworks/js/napi/aafwk/inner/napi_common/napi_common_ability.cpp @@ -4128,7 +4128,7 @@ void NAPIAbilityConnection::OnAbilityConnectDone( return; } - uv_work_t *work = new uv_work_t; + uv_work_t *work = new(std::nothrow) uv_work_t; if (work == nullptr) { HILOG_ERROR("%{public}s, work==nullptr.", __func__); return; @@ -4237,7 +4237,7 @@ void NAPIAbilityConnection::OnAbilityDisconnectDone(const AppExecFwk::ElementNam HILOG_INFO("%{public}s bundleName:%{public}s abilityName:%{public}s moduleName:%{public}s, resultCode:%{public}d", __func__, element.GetBundleName().c_str(), element.GetAbilityName().c_str(), moduleName_.c_str(), resultCode); - uv_work_t *work = new uv_work_t; + uv_work_t *work = new(std::nothrow) uv_work_t; if (work == nullptr) { HILOG_ERROR("%{public}s, work == nullptr.", __func__); return; diff --git a/frameworks/js/napi/aafwk/mission_manager/BUILD.gn b/frameworks/js/napi/aafwk/mission_manager/BUILD.gn index 8f3984ad66..773462646f 100644 --- a/frameworks/js/napi/aafwk/mission_manager/BUILD.gn +++ b/frameworks/js/napi/aafwk/mission_manager/BUILD.gn @@ -29,7 +29,7 @@ ohos_shared_library("missionmanager_napi") { ] deps = [ - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", "${ability_runtime_services_path}/abilitymgr:abilityms", ] @@ -44,7 +44,6 @@ ohos_shared_library("missionmanager_napi") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "ipc_js:rpc", - "resource_management:global_resmgr", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "utils_base:utils", @@ -80,7 +79,7 @@ ohos_shared_library("distributedmissionmanager") { "mission_continue_stub.cpp", ] - deps = [ "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common" ] + deps = [ "${ability_runtime_napi_path}/inner/napi_common:napi_common" ] external_deps = [ "ability_base:want", diff --git a/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.cpp b/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.cpp index e46f8bd75c..00bff8ce4b 100644 --- a/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.cpp +++ b/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.cpp @@ -306,109 +306,109 @@ napi_value NAPI_StopSyncRemoteMissions(napi_env env, napi_callback_info info) return result; } -RegisterMissonCB *CreateRegisterMissonCBCBInfo(napi_env env) +RegisterMissionCB *CreateRegisterMissionCBCBInfo(napi_env env) { HILOG_INFO("%{public}s called.", __func__); - auto registerMissonCB = new (std::nothrow) RegisterMissonCB; - if (registerMissonCB == nullptr) { - HILOG_ERROR("%{public}s registerMissonCB == nullptr", __func__); + auto registerMissionCB = new (std::nothrow) RegisterMissionCB; + if (registerMissionCB == nullptr) { + HILOG_ERROR("%{public}s registerMissionCB == nullptr", __func__); return nullptr; } - registerMissonCB->cbBase.cbInfo.env = env; - registerMissonCB->cbBase.asyncWork = nullptr; - registerMissonCB->cbBase.deferred = nullptr; - registerMissonCB->callbackRef = nullptr; + registerMissionCB->cbBase.cbInfo.env = env; + registerMissionCB->cbBase.asyncWork = nullptr; + registerMissionCB->cbBase.deferred = nullptr; + registerMissionCB->callbackRef = nullptr; HILOG_INFO("%{public}s end.", __func__); - return registerMissonCB; + return registerMissionCB; } -void RegisterMissonExecuteCB(napi_env env, void *data) +void RegisterMissionExecuteCB(napi_env env, void *data) { HILOG_INFO("%{public}s called.", __func__); - auto registerMissonCB = (RegisterMissonCB*)data; + auto registerMissionCB = (RegisterMissionCB*)data; std::lock_guard autoLock(registrationLock_); sptr registration; - auto item = registration_.find(registerMissonCB->deviceId); + auto item = registration_.find(registerMissionCB->deviceId); if (item != registration_.end()) { HILOG_INFO("registration exits."); - registration = registration_[registerMissonCB->deviceId]; + registration = registration_[registerMissionCB->deviceId]; } else { HILOG_INFO("registration not exits."); registration = new (std::nothrow) NAPIRemoteMissionListener(); } - registerMissonCB->missionRegistration = registration; - if (registerMissonCB->missionRegistration == nullptr) { + registerMissionCB->missionRegistration = registration; + if (registerMissionCB->missionRegistration == nullptr) { HILOG_ERROR("%{public}s missionRegistration == nullptr.", __func__); - registerMissonCB->result = -1; + registerMissionCB->result = -1; return; } - registerMissonCB->missionRegistration->SetEnv(env); - registerMissonCB->missionRegistration-> - SetNotifyMissionsChangedCBRef(registerMissonCB->missionRegistrationCB.callback[0]); - registerMissonCB->missionRegistration-> - SetNotifySnapshotCBRef(registerMissonCB->missionRegistrationCB.callback[1]); - registerMissonCB->missionRegistration-> - SetNotifyNetDisconnectCBRef(registerMissonCB-> + registerMissionCB->missionRegistration->SetEnv(env); + registerMissionCB->missionRegistration-> + SetNotifyMissionsChangedCBRef(registerMissionCB->missionRegistrationCB.callback[0]); + registerMissionCB->missionRegistration-> + SetNotifySnapshotCBRef(registerMissionCB->missionRegistrationCB.callback[1]); + registerMissionCB->missionRegistration-> + SetNotifyNetDisconnectCBRef(registerMissionCB-> missionRegistrationCB.callback[2]); // 2 refers the second argument HILOG_INFO("set callback success."); - registerMissonCB->result = + registerMissionCB->result = AbilityManagerClient::GetInstance()-> - RegisterMissionListener(registerMissonCB->deviceId, - registerMissonCB->missionRegistration); - if (registerMissonCB->result == NO_ERROR) { + RegisterMissionListener(registerMissionCB->deviceId, + registerMissionCB->missionRegistration); + if (registerMissionCB->result == NO_ERROR) { HILOG_INFO("add registration."); - registration_[registerMissonCB->deviceId] = registration; + registration_[registerMissionCB->deviceId] = registration; } - HILOG_INFO("%{public}s end.deviceId:%{public}d ", __func__, registerMissonCB->result); + HILOG_INFO("%{public}s end.deviceId:%{public}d ", __func__, registerMissionCB->result); } -void RegisterMissonCallbackCompletedCB(napi_env env, napi_status status, void *data) +void RegisterMissionCallbackCompletedCB(napi_env env, napi_status status, void *data) { HILOG_INFO("%{public}s called.", __func__); - auto registerMissonCB = static_cast(data); + auto registerMissionCB = static_cast(data); // set result napi_value result[2] = { 0 }; napi_get_undefined(env, &result[1]); - if (registerMissonCB->result == 0) { + if (registerMissionCB->result == 0) { napi_get_undefined(env, &result[0]); } else { napi_value message = nullptr; napi_create_string_utf8(env, ("registerMissionListener failed, error : " + - std::to_string(registerMissonCB->result)).c_str(), NAPI_AUTO_LENGTH, &message); + std::to_string(registerMissionCB->result)).c_str(), NAPI_AUTO_LENGTH, &message); napi_create_error(env, nullptr, message, &result[0]); } - if (registerMissonCB->callbackRef == nullptr) { // promise - if (registerMissonCB->result == 0) { - napi_resolve_deferred(env, registerMissonCB->cbBase.deferred, result[1]); + if (registerMissionCB->callbackRef == nullptr) { // promise + if (registerMissionCB->result == 0) { + napi_resolve_deferred(env, registerMissionCB->cbBase.deferred, result[1]); } else { - napi_reject_deferred(env, registerMissonCB->cbBase.deferred, result[0]); + napi_reject_deferred(env, registerMissionCB->cbBase.deferred, result[0]); } } else { // AsyncCallback napi_value callback = nullptr; - napi_get_reference_value(env, registerMissonCB->callbackRef, &callback); + napi_get_reference_value(env, registerMissionCB->callbackRef, &callback); napi_value callResult; napi_call_function(env, nullptr, callback, ARGS_TWO, &result[0], &callResult); - napi_delete_reference(env, registerMissonCB->callbackRef); + napi_delete_reference(env, registerMissionCB->callbackRef); } - NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, registerMissonCB->cbBase.asyncWork)); - delete registerMissonCB; - registerMissonCB = nullptr; + NAPI_CALL_RETURN_VOID(env, napi_delete_async_work(env, registerMissionCB->cbBase.asyncWork)); + delete registerMissionCB; + registerMissionCB = nullptr; HILOG_INFO("%{public}s end.", __func__); } -napi_value RegisterMissonAsync(napi_env env, napi_value *args, RegisterMissonCB *registerMissonCB) +napi_value RegisterMissionAsync(napi_env env, napi_value *args, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s asyncCallback.", __func__); - if (args == nullptr || registerMissonCB == nullptr) { + if (args == nullptr || registerMissionCB == nullptr) { HILOG_ERROR("%{public}s, param == nullptr.", __func__); return nullptr; } napi_value result = nullptr; - if (registerMissonCB->callbackRef == nullptr) { - napi_create_promise(env, ®isterMissonCB->cbBase.deferred, &result); + if (registerMissionCB->callbackRef == nullptr) { + napi_create_promise(env, ®isterMissionCB->cbBase.deferred, &result); } else { napi_get_undefined(env, &result); } @@ -418,16 +418,16 @@ napi_value RegisterMissonAsync(napi_env env, napi_value *args, RegisterMissonCB napi_create_async_work(env, nullptr, resourceName, - RegisterMissonExecuteCB, - RegisterMissonCallbackCompletedCB, - (void *)registerMissonCB, - ®isterMissonCB->cbBase.asyncWork); - napi_queue_async_work(env, registerMissonCB->cbBase.asyncWork); + RegisterMissionExecuteCB, + RegisterMissionCallbackCompletedCB, + (void *)registerMissionCB, + ®isterMissionCB->cbBase.asyncWork); + napi_queue_async_work(env, registerMissionCB->cbBase.asyncWork); HILOG_INFO("%{public}s asyncCallback end.", __func__); return result; } -bool SetCallbackReference(napi_env env, const napi_value& value, RegisterMissonCB *registerMissonCB) +bool SetCallbackReference(napi_env env, const napi_value& value, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s called.", __func__); bool isFirstCallback = false; @@ -452,7 +452,7 @@ bool SetCallbackReference(napi_env env, const napi_value& value, RegisterMissonC HILOG_ERROR("%{public}s, notifyMissionsChanged callback error type.", __func__); return false; } - napi_create_reference(env, jsMethod, 1, ®isterMissonCB->missionRegistrationCB.callback[0]); + napi_create_reference(env, jsMethod, 1, ®isterMissionCB->missionRegistrationCB.callback[0]); napi_get_named_property(env, value, "notifySnapshot", &jsMethod); if (jsMethod == nullptr) { @@ -464,7 +464,7 @@ bool SetCallbackReference(napi_env env, const napi_value& value, RegisterMissonC HILOG_ERROR("%{public}s, notifySnapshot callback error type.", __func__); return false; } - napi_create_reference(env, jsMethod, 1, ®isterMissonCB->missionRegistrationCB.callback[1]); + napi_create_reference(env, jsMethod, 1, ®isterMissionCB->missionRegistrationCB.callback[1]); napi_get_named_property(env, value, "notifyNetDisconnect", &jsMethod); if (jsMethod == nullptr) { @@ -477,18 +477,18 @@ bool SetCallbackReference(napi_env env, const napi_value& value, RegisterMissonC return false; } napi_create_reference(env, jsMethod, 1, - ®isterMissonCB->missionRegistrationCB.callback[2]); // 2 refers the second argument + ®isterMissionCB->missionRegistrationCB.callback[2]); // 2 refers the second argument HILOG_INFO("%{public}s called end.", __func__); return true; } -bool CreateCallbackReference(napi_env env, const napi_value& value, RegisterMissonCB *registerMissonCB) +bool CreateCallbackReference(napi_env env, const napi_value& value, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s called.", __func__); napi_valuetype valuetype = napi_undefined; napi_typeof(env, value, &valuetype); if (valuetype == napi_object) { - if (!SetCallbackReference(env, value, registerMissonCB)) { + if (!SetCallbackReference(env, value, registerMissionCB)) { HILOG_ERROR("%{public}s, Wrong callback.", __func__); return false; } @@ -500,7 +500,7 @@ bool CreateCallbackReference(napi_env env, const napi_value& value, RegisterMiss return true; } -napi_value RegisterMissonWrap(napi_env env, napi_callback_info info, RegisterMissonCB *registerMissonCB) +napi_value RegisterMissionWrap(napi_env env, napi_callback_info info, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s called.", __func__); size_t argcAsync = 3; @@ -540,9 +540,9 @@ napi_value RegisterMissonWrap(napi_env env, napi_callback_info info, RegisterMis HILOG_ERROR("%{public}s, deviceId length not correct", __func__); return nullptr; } - registerMissonCB->deviceId = deviceId; + registerMissionCB->deviceId = deviceId; - if (argcAsync > 1 && !CreateCallbackReference(env, args[1], registerMissonCB)) { + if (argcAsync > 1 && !CreateCallbackReference(env, args[1], registerMissionCB)) { HILOG_ERROR("%{public}s, Wrong arguments.", __func__); return nullptr; } @@ -553,10 +553,10 @@ napi_value RegisterMissonWrap(napi_env env, napi_callback_info info, RegisterMis HILOG_ERROR("%{public}s, callback error type.", __func__); return nullptr; } - napi_create_reference(env, args[ARGS_TWO], 1, ®isterMissonCB->callbackRef); + napi_create_reference(env, args[ARGS_TWO], 1, ®isterMissionCB->callbackRef); } - ret = RegisterMissonAsync(env, args, registerMissonCB); + ret = RegisterMissionAsync(env, args, registerMissionCB); HILOG_INFO("%{public}s called end.", __func__); return ret; } @@ -564,17 +564,17 @@ napi_value RegisterMissonWrap(napi_env env, napi_callback_info info, RegisterMis napi_value NAPI_RegisterMissionListener(napi_env env, napi_callback_info info) { HILOG_INFO("%{public}s called.", __func__); - RegisterMissonCB *registerMissonCB = CreateRegisterMissonCBCBInfo(env); - if (registerMissonCB == nullptr) { - HILOG_ERROR("%{public}s registerMissonCB == nullptr", __func__); + RegisterMissionCB *registerMissionCB = CreateRegisterMissionCBCBInfo(env); + if (registerMissionCB == nullptr) { + HILOG_ERROR("%{public}s registerMissionCB == nullptr", __func__); NAPI_ASSERT(env, false, "wrong arguments"); } - napi_value ret = RegisterMissonWrap(env, info, registerMissonCB); + napi_value ret = RegisterMissionWrap(env, info, registerMissionCB); if (ret == nullptr) { HILOG_ERROR("%{public}s ret == nullptr", __func__); - delete registerMissonCB; - registerMissonCB = nullptr; + delete registerMissionCB; + registerMissionCB = nullptr; NAPI_ASSERT(env, false, "wrong arguments"); } HILOG_INFO("%{public}s end.", __func__); @@ -632,25 +632,26 @@ void UvWorkNotifyMissionChanged(uv_work_t *work, int status) HILOG_ERROR("UvWorkNotifyMissionChanged, work is null"); return; } - RegisterMissonCB *registerMissonCB = static_cast(work->data); - if (registerMissonCB == nullptr) { - HILOG_ERROR("UvWorkNotifyMissionChanged, registerMissonCB is null"); + RegisterMissionCB *registerMissionCB = static_cast(work->data); + if (registerMissionCB == nullptr) { + HILOG_ERROR("UvWorkNotifyMissionChanged, registerMissionCB is null"); delete work; return; } napi_value result = nullptr; result = - WrapString(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->deviceId.c_str(), "deviceId"); + WrapString(registerMissionCB->cbBase.cbInfo.env, registerMissionCB->deviceId.c_str(), "deviceId"); napi_value callback = nullptr; napi_value undefined = nullptr; - napi_get_undefined(registerMissonCB->cbBase.cbInfo.env, &undefined); + napi_get_undefined(registerMissionCB->cbBase.cbInfo.env, &undefined); napi_value callResult = nullptr; - napi_get_reference_value(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->cbBase.cbInfo.callback, &callback); + napi_get_reference_value( + registerMissionCB->cbBase.cbInfo.env, registerMissionCB->cbBase.cbInfo.callback, &callback); - napi_call_function(registerMissonCB->cbBase.cbInfo.env, undefined, callback, 1, &result, &callResult); - delete registerMissonCB; - registerMissonCB = nullptr; + napi_call_function(registerMissionCB->cbBase.cbInfo.env, undefined, callback, 1, &result, &callResult); + delete registerMissionCB; + registerMissionCB = nullptr; delete work; HILOG_INFO("UvWorkNotifyMissionChanged, uv_queue_work end"); } @@ -672,22 +673,22 @@ void NAPIRemoteMissionListener::NotifyMissionsChanged(const std::string& deviceI return; } - auto registerMissonCB = new (std::nothrow) RegisterMissonCB; - if (registerMissonCB == nullptr) { - HILOG_ERROR("%{public}s, registerMissonCB == nullptr.", __func__); + auto registerMissionCB = new (std::nothrow) RegisterMissionCB; + if (registerMissionCB == nullptr) { + HILOG_ERROR("%{public}s, registerMissionCB == nullptr.", __func__); delete work; return; } - registerMissonCB->cbBase.cbInfo.env = env_; - registerMissonCB->cbBase.cbInfo.callback = notifyMissionsChangedRef_; - registerMissonCB->deviceId = deviceId; - work->data = (void *)registerMissonCB; + registerMissionCB->cbBase.cbInfo.env = env_; + registerMissionCB->cbBase.cbInfo.callback = notifyMissionsChangedRef_; + registerMissionCB->deviceId = deviceId; + work->data = (void *)registerMissionCB; int rev = uv_queue_work( loop, work, [](uv_work_t *work) {}, UvWorkNotifyMissionChanged); if (rev != 0) { - delete registerMissonCB; - registerMissonCB = nullptr; + delete registerMissionCB; + registerMissionCB = nullptr; delete work; } HILOG_INFO("%{public}s, end.", __func__); @@ -700,27 +701,28 @@ void UvWorkNotifySnapshot(uv_work_t *work, int status) HILOG_ERROR("UvWorkNotifySnapshot, work is null"); return; } - RegisterMissonCB *registerMissonCB = static_cast(work->data); - if (registerMissonCB == nullptr) { - HILOG_ERROR("UvWorkNotifySnapshot, registerMissonCB is null"); + RegisterMissionCB *registerMissionCB = static_cast(work->data); + if (registerMissionCB == nullptr) { + HILOG_ERROR("UvWorkNotifySnapshot, registerMissionCB is null"); delete work; return; } napi_value result[2] = {0}; result[0] = - WrapString(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->deviceId.c_str(), "deviceId"); + WrapString(registerMissionCB->cbBase.cbInfo.env, registerMissionCB->deviceId.c_str(), "deviceId"); result[1] = - WrapInt32(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->missionId, "missionId"); + WrapInt32(registerMissionCB->cbBase.cbInfo.env, registerMissionCB->missionId, "missionId"); napi_value callback = nullptr; napi_value undefined = nullptr; - napi_get_undefined(registerMissonCB->cbBase.cbInfo.env, &undefined); + napi_get_undefined(registerMissionCB->cbBase.cbInfo.env, &undefined); napi_value callResult = nullptr; - napi_get_reference_value(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->cbBase.cbInfo.callback, &callback); + napi_get_reference_value( + registerMissionCB->cbBase.cbInfo.env, registerMissionCB->cbBase.cbInfo.callback, &callback); - napi_call_function(registerMissonCB->cbBase.cbInfo.env, undefined, callback, ARGS_TWO, &result[0], &callResult); - delete registerMissonCB; - registerMissonCB = nullptr; + napi_call_function(registerMissionCB->cbBase.cbInfo.env, undefined, callback, ARGS_TWO, &result[0], &callResult); + delete registerMissionCB; + registerMissionCB = nullptr; delete work; HILOG_INFO("UvWorkNotifySnapshot, uv_queue_work end"); } @@ -741,23 +743,23 @@ void NAPIRemoteMissionListener::NotifySnapshot(const std::string& deviceId, int3 return; } - auto registerMissonCB = new (std::nothrow) RegisterMissonCB; - if (registerMissonCB == nullptr) { - HILOG_ERROR("%{public}s, registerMissonCB == nullptr.", __func__); + auto registerMissionCB = new (std::nothrow) RegisterMissionCB; + if (registerMissionCB == nullptr) { + HILOG_ERROR("%{public}s, registerMissionCB == nullptr.", __func__); delete work; return; } - registerMissonCB->cbBase.cbInfo.env = env_; - registerMissonCB->cbBase.cbInfo.callback = notifySnapshotRef_; - registerMissonCB->deviceId = deviceId; - registerMissonCB->missionId = missionId; - work->data = (void *)registerMissonCB; + registerMissionCB->cbBase.cbInfo.env = env_; + registerMissionCB->cbBase.cbInfo.callback = notifySnapshotRef_; + registerMissionCB->deviceId = deviceId; + registerMissionCB->missionId = missionId; + work->data = (void *)registerMissionCB; int rev = uv_queue_work( loop, work, [](uv_work_t *work) {}, UvWorkNotifySnapshot); if (rev != 0) { - delete registerMissonCB; - registerMissonCB = nullptr; + delete registerMissionCB; + registerMissionCB = nullptr; delete work; } HILOG_INFO("%{public}s, end.", __func__); @@ -770,28 +772,29 @@ void UvWorkNotifyNetDisconnect(uv_work_t *work, int status) HILOG_ERROR("UvWorkNotifyNetDisconnect, work is null"); return; } - RegisterMissonCB *registerMissonCB = static_cast(work->data); - if (registerMissonCB == nullptr) { - HILOG_ERROR("UvWorkNotifyNetDisconnect, registerMissonCB is null"); + RegisterMissionCB *registerMissionCB = static_cast(work->data); + if (registerMissionCB == nullptr) { + HILOG_ERROR("UvWorkNotifyNetDisconnect, registerMissionCB is null"); delete work; return; } napi_value result[2] = {0}; result[0] = - WrapString(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->deviceId.c_str(), "deviceId"); - HILOG_INFO("UvWorkNotifyNetDisconnect, state = %{public}d", registerMissonCB->state); + WrapString(registerMissionCB->cbBase.cbInfo.env, registerMissionCB->deviceId.c_str(), "deviceId"); + HILOG_INFO("UvWorkNotifyNetDisconnect, state = %{public}d", registerMissionCB->state); result[1] = - WrapInt32(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->state, "state"); + WrapInt32(registerMissionCB->cbBase.cbInfo.env, registerMissionCB->state, "state"); napi_value callback = nullptr; napi_value undefined = nullptr; - napi_get_undefined(registerMissonCB->cbBase.cbInfo.env, &undefined); + napi_get_undefined(registerMissionCB->cbBase.cbInfo.env, &undefined); napi_value callResult = nullptr; - napi_get_reference_value(registerMissonCB->cbBase.cbInfo.env, registerMissonCB->cbBase.cbInfo.callback, &callback); + napi_get_reference_value( + registerMissionCB->cbBase.cbInfo.env, registerMissionCB->cbBase.cbInfo.callback, &callback); - napi_call_function(registerMissonCB->cbBase.cbInfo.env, undefined, callback, ARGS_TWO, &result[0], &callResult); - delete registerMissonCB; - registerMissonCB = nullptr; + napi_call_function(registerMissionCB->cbBase.cbInfo.env, undefined, callback, ARGS_TWO, &result[0], &callResult); + delete registerMissionCB; + registerMissionCB = nullptr; delete work; HILOG_INFO("UvWorkNotifyNetDisconnect, uv_queue_work end"); } @@ -813,102 +816,102 @@ void NAPIRemoteMissionListener::NotifyNetDisconnect(const std::string& deviceId, return; } - auto registerMissonCB = new (std::nothrow) RegisterMissonCB; - if (registerMissonCB == nullptr) { - HILOG_ERROR("%{public}s, registerMissonCB == nullptr.", __func__); + auto registerMissionCB = new (std::nothrow) RegisterMissionCB; + if (registerMissionCB == nullptr) { + HILOG_ERROR("%{public}s, registerMissionCB == nullptr.", __func__); delete work; return; } - registerMissonCB->cbBase.cbInfo.env = env_; - registerMissonCB->cbBase.cbInfo.callback = notifyNetDisconnectRef_; - registerMissonCB->deviceId = deviceId; - registerMissonCB->state = state; - work->data = (void *)registerMissonCB; + registerMissionCB->cbBase.cbInfo.env = env_; + registerMissionCB->cbBase.cbInfo.callback = notifyNetDisconnectRef_; + registerMissionCB->deviceId = deviceId; + registerMissionCB->state = state; + work->data = (void *)registerMissionCB; int rev = uv_queue_work( loop, work, [](uv_work_t *work) {}, UvWorkNotifyNetDisconnect); if (rev != 0) { - delete registerMissonCB; - registerMissonCB = nullptr; + delete registerMissionCB; + registerMissionCB = nullptr; delete work; } HILOG_INFO("%{public}s, end.", __func__); } -void UnRegisterMissonExecuteCB(napi_env env, void *data) +void UnRegisterMissionExecuteCB(napi_env env, void *data) { HILOG_INFO("%{public}s called.", __func__); - auto registerMissonCB = (RegisterMissonCB*)data; + auto registerMissionCB = (RegisterMissionCB*)data; std::lock_guard autoLock(registrationLock_); sptr registration; - auto item = registration_.find(registerMissonCB->deviceId); + auto item = registration_.find(registerMissionCB->deviceId); if (item != registration_.end()) { HILOG_INFO("registration exits."); - registration = registration_[registerMissonCB->deviceId]; + registration = registration_[registerMissionCB->deviceId]; } else { HILOG_INFO("registration not exits."); - registerMissonCB->result = -1; + registerMissionCB->result = -1; return; } - registerMissonCB->missionRegistration = registration; + registerMissionCB->missionRegistration = registration; - registerMissonCB->result = + registerMissionCB->result = AbilityManagerClient::GetInstance()-> - UnRegisterMissionListener(registerMissonCB->deviceId, - registerMissonCB->missionRegistration); - if (registerMissonCB->result == NO_ERROR) { + UnRegisterMissionListener(registerMissionCB->deviceId, + registerMissionCB->missionRegistration); + if (registerMissionCB->result == NO_ERROR) { HILOG_INFO("remove registration."); - registration_.erase(registerMissonCB->deviceId); + registration_.erase(registerMissionCB->deviceId); } - HILOG_INFO("%{public}s end.deviceId:%{public}d ", __func__, registerMissonCB->result); + HILOG_INFO("%{public}s end.deviceId:%{public}d ", __func__, registerMissionCB->result); } -void UnRegisterMissonPromiseCompletedCB(napi_env env, napi_status status, void *data) +void UnRegisterMissionPromiseCompletedCB(napi_env env, napi_status status, void *data) { HILOG_INFO("%{public}s called.", __func__); - auto registerMissonCB = (RegisterMissonCB*)data; + auto registerMissionCB = (RegisterMissionCB*)data; // set result napi_value result[2] = { 0 }; napi_get_undefined(env, &result[1]); - if (registerMissonCB->result == 0) { + if (registerMissionCB->result == 0) { napi_get_undefined(env, &result[0]); } else { napi_value message = nullptr; napi_create_string_utf8(env, ("unRegisterMissionListener failed, error : " + - std::to_string(registerMissonCB->result)).c_str(), NAPI_AUTO_LENGTH, &message); + std::to_string(registerMissionCB->result)).c_str(), NAPI_AUTO_LENGTH, &message); napi_create_error(env, nullptr, message, &result[0]); } - if (registerMissonCB->callbackRef == nullptr) { // promise - if (registerMissonCB->result == 0) { - napi_resolve_deferred(env, registerMissonCB->cbBase.deferred, result[1]); + if (registerMissionCB->callbackRef == nullptr) { // promise + if (registerMissionCB->result == 0) { + napi_resolve_deferred(env, registerMissionCB->cbBase.deferred, result[1]); } else { - napi_reject_deferred(env, registerMissonCB->cbBase.deferred, result[0]); + napi_reject_deferred(env, registerMissionCB->cbBase.deferred, result[0]); } } else { // AsyncCallback napi_value callback = nullptr; - napi_get_reference_value(env, registerMissonCB->callbackRef, &callback); + napi_get_reference_value(env, registerMissionCB->callbackRef, &callback); napi_value callResult; napi_call_function(env, nullptr, callback, ARGS_TWO, &result[0], &callResult); - napi_delete_reference(env, registerMissonCB->callbackRef); + napi_delete_reference(env, registerMissionCB->callbackRef); } - napi_delete_async_work(env, registerMissonCB->cbBase.asyncWork); - delete registerMissonCB; - registerMissonCB = nullptr; + napi_delete_async_work(env, registerMissionCB->cbBase.asyncWork); + delete registerMissionCB; + registerMissionCB = nullptr; HILOG_INFO("%{public}s end.", __func__); } -napi_value UnRegisterMissonPromise(napi_env env, RegisterMissonCB *registerMissonCB) +napi_value UnRegisterMissionPromise(napi_env env, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s asyncCallback.", __func__); - if (registerMissonCB == nullptr) { + if (registerMissionCB == nullptr) { HILOG_ERROR("%{public}s, param == nullptr.", __func__); return nullptr; } napi_value promise = nullptr; - if (registerMissonCB->callbackRef == nullptr) { - napi_create_promise(env, ®isterMissonCB->cbBase.deferred, &promise); + if (registerMissionCB->callbackRef == nullptr) { + napi_create_promise(env, ®isterMissionCB->cbBase.deferred, &promise); } else { napi_get_undefined(env, &promise); } @@ -919,16 +922,16 @@ napi_value UnRegisterMissonPromise(napi_env env, RegisterMissonCB *registerMisso napi_create_async_work(env, nullptr, resourceName, - UnRegisterMissonExecuteCB, - UnRegisterMissonPromiseCompletedCB, - (void *)registerMissonCB, - ®isterMissonCB->cbBase.asyncWork); - napi_queue_async_work(env, registerMissonCB->cbBase.asyncWork); + UnRegisterMissionExecuteCB, + UnRegisterMissionPromiseCompletedCB, + (void *)registerMissionCB, + ®isterMissionCB->cbBase.asyncWork); + napi_queue_async_work(env, registerMissionCB->cbBase.asyncWork); HILOG_INFO("%{public}s asyncCallback end.", __func__); return promise; } -bool GetUnRegisterMissonDeviceId(napi_env env, const napi_value& value, RegisterMissonCB *registerMissonCB) +bool GetUnRegisterMissionDeviceId(napi_env env, const napi_value& value, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s called.", __func__); napi_value firstNApi = nullptr; @@ -959,12 +962,12 @@ bool GetUnRegisterMissonDeviceId(napi_env env, const napi_value& value, Register HILOG_ERROR("%{public}s, deviceId length not correct", __func__); return false; } - registerMissonCB->deviceId = deviceId; + registerMissionCB->deviceId = deviceId; HILOG_INFO("%{public}s called end.", __func__); return true; } -napi_value UnRegisterMissonWrap(napi_env env, napi_callback_info info, RegisterMissonCB *registerMissonCB) +napi_value UnRegisterMissionWrap(napi_env env, napi_callback_info info, RegisterMissionCB *registerMissionCB) { HILOG_INFO("%{public}s called.", __func__); size_t argc = 2; @@ -978,7 +981,7 @@ napi_value UnRegisterMissonWrap(napi_env env, napi_callback_info info, RegisterM return nullptr; } - if (!GetUnRegisterMissonDeviceId(env, args[0], registerMissonCB)) { + if (!GetUnRegisterMissionDeviceId(env, args[0], registerMissionCB)) { HILOG_ERROR("%{public}s, Wrong argument.", __func__); return nullptr; } @@ -990,9 +993,9 @@ napi_value UnRegisterMissonWrap(napi_env env, napi_callback_info info, RegisterM HILOG_ERROR("%{public}s, callback error type.", __func__); return nullptr; } - napi_create_reference(env, args[1], 1, ®isterMissonCB->callbackRef); + napi_create_reference(env, args[1], 1, ®isterMissionCB->callbackRef); } - ret = UnRegisterMissonPromise(env, registerMissonCB); + ret = UnRegisterMissionPromise(env, registerMissionCB); HILOG_INFO("%{public}s called end.", __func__); return ret; } @@ -1000,17 +1003,17 @@ napi_value UnRegisterMissonWrap(napi_env env, napi_callback_info info, RegisterM napi_value NAPI_UnRegisterMissionListener(napi_env env, napi_callback_info info) { HILOG_INFO("%{public}s called.", __func__); - RegisterMissonCB *registerMissonCB = CreateRegisterMissonCBCBInfo(env); - if (registerMissonCB == nullptr) { - HILOG_ERROR("%{public}s registerMissonCB == nullptr", __func__); + RegisterMissionCB *registerMissionCB = CreateRegisterMissionCBCBInfo(env); + if (registerMissionCB == nullptr) { + HILOG_ERROR("%{public}s registerMissionCB == nullptr", __func__); NAPI_ASSERT(env, false, "wrong arguments"); } - napi_value ret = UnRegisterMissonWrap(env, info, registerMissonCB); + napi_value ret = UnRegisterMissionWrap(env, info, registerMissionCB); if (ret == nullptr) { HILOG_ERROR("%{public}s ret == nullptr", __func__); - delete registerMissonCB; - registerMissonCB = nullptr; + delete registerMissionCB; + registerMissionCB = nullptr; NAPI_ASSERT(env, false, "wrong arguments"); } HILOG_INFO("%{public}s end.", __func__); @@ -1316,19 +1319,19 @@ napi_value NAPI_ContinueAbility(napi_env env, napi_callback_info info) void UvWorkOnContinueDone(uv_work_t *work, int status) { - HILOG_INFO("UvWorkOnCountinueDone, uv_queue_work"); + HILOG_INFO("UvWorkOnContinueDone, uv_queue_work"); if (work == nullptr) { - HILOG_ERROR("UvWorkOnCountinueDone, work is null"); + HILOG_ERROR("UvWorkOnContinueDone, work is null"); return; } ContinueAbilityCB *continueAbilityCB = static_cast(work->data); if (continueAbilityCB == nullptr) { - HILOG_ERROR("UvWorkOnCountinueDone, continueAbilityCB is null"); + HILOG_ERROR("UvWorkOnContinueDone, continueAbilityCB is null"); delete work; return; } napi_value result = nullptr; - HILOG_INFO("UvWorkOnCountinueDone, resultCode = %{public}d", continueAbilityCB->resultCode); + HILOG_INFO("UvWorkOnContinueDone, resultCode = %{public}d", continueAbilityCB->resultCode); result = WrapInt32(continueAbilityCB->cbBase.cbInfo.env, continueAbilityCB->resultCode, "resultCode"); @@ -1346,7 +1349,7 @@ void UvWorkOnContinueDone(uv_work_t *work, int status) delete continueAbilityCB; continueAbilityCB = nullptr; delete work; - HILOG_INFO("UvWorkOnCountinueDone, uv_queue_work end"); + HILOG_INFO("UvWorkOnContinueDone, uv_queue_work end"); } void NAPIMissionContinue::OnContinueDone(int32_t result) diff --git a/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.h b/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.h index 2c9bde42d6..5ae222677a 100644 --- a/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.h +++ b/frameworks/js/napi/aafwk/mission_manager/distributed_mission_manager.h @@ -88,7 +88,7 @@ struct MissionRegistrationCB { int resultCode = 0; }; -struct RegisterMissonCB { +struct RegisterMissionCB { CBBase cbBase; std::string deviceId; sptr missionRegistration; diff --git a/frameworks/js/napi/aafwk/mission_manager/js_mission_listener.cpp b/frameworks/js/napi/aafwk/mission_manager/js_mission_listener.cpp index ba95ddae6b..1c2178c45b 100644 --- a/frameworks/js/napi/aafwk/mission_manager/js_mission_listener.cpp +++ b/frameworks/js/napi/aafwk/mission_manager/js_mission_listener.cpp @@ -81,7 +81,7 @@ void JsMissionListener::CallJsMethod(const std::string &methodName, int32_t miss }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsMissionListener::CallJsMethod:" + methodName, *engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } @@ -129,7 +129,8 @@ void JsMissionListener::OnMissionIconUpdated(int32_t missionId, const std::share }); NativeReference* callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule(*engine_, std::make_unique(callback, std::move(execute), std::move(complete))); + AsyncTask::Schedule("JsMissionListener::OnMissionIconUpdated", *engine_, + std::make_unique(callback, std::move(execute), std::move(complete))); } void JsMissionListener::CallJsMissionIconUpdated(int32_t missionId, const std::shared_ptr &icon) diff --git a/frameworks/js/napi/aafwk/mission_manager/mission_manager.cpp b/frameworks/js/napi/aafwk/mission_manager/mission_manager.cpp index e7bd6f68b0..67e6d97b1c 100644 --- a/frameworks/js/napi/aafwk/mission_manager/mission_manager.cpp +++ b/frameworks/js/napi/aafwk/mission_manager/mission_manager.cpp @@ -79,7 +79,13 @@ public: static NativeValue* GetMissionSnapShot(NativeEngine* engine, NativeCallbackInfo* info) { JsMissionManager* me = CheckParamsAndGetThis(engine, info); - return (me != nullptr) ? me->OnGetMissionSnapShot(*engine, *info) : nullptr; + return (me != nullptr) ? me->OnGetMissionSnapShot(*engine, *info, false) : nullptr; + } + + static NativeValue* GetLowResolutionMissionSnapShot(NativeEngine* engine, NativeCallbackInfo* info) + { + JsMissionManager* me = CheckParamsAndGetThis(engine, info); + return (me != nullptr) ? me->OnGetMissionSnapShot(*engine, *info, true) : nullptr; } static NativeValue* LockMission(NativeEngine* engine, NativeCallbackInfo* info) @@ -179,7 +185,7 @@ private: NativeValue* lastParam = (info.argc <= 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnUnregisterMissionListener", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -220,7 +226,7 @@ private: NativeValue* lastParam = (info.argc <= 2) ? nullptr : info.argv[2]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnGetMissionInfos", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -261,12 +267,12 @@ private: NativeValue* lastParam = (info.argc <= 2) ? nullptr : info.argv[2]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnGetMissionInfo", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } - NativeValue* OnGetMissionSnapShot(NativeEngine &engine, NativeCallbackInfo &info) + NativeValue* OnGetMissionSnapShot(NativeEngine &engine, NativeCallbackInfo &info, bool isLowResolution) { HILOG_INFO("%{public}s is called", __FUNCTION__); int32_t errCode = 0; @@ -285,14 +291,14 @@ private: errCode = ERR_NOT_OK; } AsyncTask::CompleteCallback complete = - [deviceId, missionId, errCode](NativeEngine &engine, AsyncTask &task, int32_t status) { + [deviceId, missionId, errCode, isLowResolution](NativeEngine &engine, AsyncTask &task, int32_t status) { if (errCode != 0) { task.Reject(engine, CreateJsError(engine, errCode, "Invalidate params.")); return; } AAFwk::MissionSnapshot missionSnapshot; auto ret = AbilityManagerClient::GetInstance()->GetMissionSnapshot( - deviceId, missionId, missionSnapshot); + deviceId, missionId, missionSnapshot, isLowResolution); if (ret == 0) { NativeValue* objValue = engine.CreateObject(); NativeObject* object = ConvertNativeValueTo(objValue); @@ -315,7 +321,7 @@ private: }; NativeValue* lastParam = (info.argc <= ARG_COUNT_TWO) ? nullptr : info.argv[2]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnGetMissionSnapShot", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -350,7 +356,7 @@ private: NativeValue* lastParam = (info.argc <= 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnLockMission", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -385,7 +391,7 @@ private: NativeValue* lastParam = (info.argc <= 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnUnlockMission", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -420,7 +426,7 @@ private: NativeValue* lastParam = (info.argc <= 1) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnClearMission", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -440,7 +446,7 @@ private: NativeValue* lastParam = (info.argc == 0) ? nullptr : info.argv[0]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnMoveMissionToFront", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -484,7 +490,7 @@ private: NativeValue* lastParam = (info.argc <= unwrapArgc) ? nullptr : info.argv[unwrapArgc]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("MissioManager::OnMoveMissionToFront", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -515,6 +521,8 @@ NativeValue* JsMissionManagerInit(NativeEngine* engine, NativeValue* exportObj) BindNativeFunction(*engine, *object, "getMissionInfos", JsMissionManager::GetMissionInfos); BindNativeFunction(*engine, *object, "getMissionInfo", JsMissionManager::GetMissionInfo); BindNativeFunction(*engine, *object, "getMissionSnapShot", JsMissionManager::GetMissionSnapShot); + BindNativeFunction(*engine, *object, "getLowResolutionMissionSnapShot", + JsMissionManager::GetLowResolutionMissionSnapShot); BindNativeFunction(*engine, *object, "lockMission", JsMissionManager::LockMission); BindNativeFunction(*engine, *object, "unlockMission", JsMissionManager::UnlockMission); BindNativeFunction(*engine, *object, "clearMission", JsMissionManager::ClearMission); diff --git a/frameworks/js/napi/aafwk/particleAbility/BUILD.gn b/frameworks/js/napi/aafwk/particleAbility/BUILD.gn index 1f0e584fa0..ac6fbae974 100644 --- a/frameworks/js/napi/aafwk/particleAbility/BUILD.gn +++ b/frameworks/js/napi/aafwk/particleAbility/BUILD.gn @@ -16,7 +16,7 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") ohos_shared_library("particleability") { include_dirs = [ "//third_party/node/src", - "${ability_runtime_path}/frameworks/js/napi/aafwk/featureAbility", + "${ability_runtime_napi_path}/featureAbility", "${ability_runtime_services_path}/common/include", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/rdb/include", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/common/include", @@ -26,9 +26,9 @@ ohos_shared_library("particleability") { ] sources = [ - "${ability_runtime_path}/frameworks/js/napi/aafwk/featureAbility/napi_context.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/featureAbility/napi_data_ability_helper.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/featureAbility/napi_data_ability_operation.cpp", + "${ability_runtime_napi_path}/featureAbility/napi_context.cpp", + "${ability_runtime_napi_path}/featureAbility/napi_data_ability_helper.cpp", + "${ability_runtime_napi_path}/featureAbility/napi_data_ability_operation.cpp", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/common/src/js_utils.cpp", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/dataability/src/napi_data_ability_predicates.cpp", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/rdb/src/napi_result_set.cpp", @@ -39,7 +39,7 @@ ohos_shared_library("particleability") { deps = [ "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", "${ability_runtime_kits_path}/appkit:appkit_native", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", "//third_party/jsoncpp:jsoncpp", "//third_party/libuv:uv_static", ] @@ -59,7 +59,6 @@ ohos_shared_library("particleability") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "napi:ace_napi", - "relational_store:native_appdatafwk", "relational_store:native_rdb", "relational_store:rdb_data_share_adapter", "utils_base:utils", diff --git a/frameworks/js/napi/aafwk/service_extension_context/service_extension_context.js b/frameworks/js/napi/aafwk/service_extension_context/service_extension_context.js index a5d2d1323e..8dd5cca442 100644 --- a/frameworks/js/napi/aafwk/service_extension_context/service_extension_context.js +++ b/frameworks/js/napi/aafwk/service_extension_context/service_extension_context.js @@ -18,7 +18,6 @@ var ExtensionContext = requireNapi("application.ExtensionContext") class ServiceExtensionContext extends ExtensionContext { constructor(obj) { super(obj); - this.extensionAbilityInfo = obj.extensionAbilityInfo } startAbility(want, options, callback) { diff --git a/frameworks/js/napi/aafwk/uri_permission/BUILD.gn b/frameworks/js/napi/aafwk/uri_permission/BUILD.gn index 6be3c50281..1f01c405b4 100644 --- a/frameworks/js/napi/aafwk/uri_permission/BUILD.gn +++ b/frameworks/js/napi/aafwk/uri_permission/BUILD.gn @@ -26,7 +26,7 @@ ohos_shared_library("uripermissionmanager_napi") { deps = [ "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", ] external_deps = [ diff --git a/frameworks/js/napi/aafwk/uri_permission/js_uri_perm_mgr.cpp b/frameworks/js/napi/aafwk/uri_permission/js_uri_perm_mgr.cpp index b8af047509..16cc90684b 100644 --- a/frameworks/js/napi/aafwk/uri_permission/js_uri_perm_mgr.cpp +++ b/frameworks/js/napi/aafwk/uri_permission/js_uri_perm_mgr.cpp @@ -90,7 +90,7 @@ private: NativeValue* lastParam = (info.argc == argCountThree) ? nullptr : info.argv[argCountThree]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsUriPermMgr::OnVerifyUriPermission", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); HILOG_DEBUG("OnVerifyUriPermission is called end"); return result; diff --git a/frameworks/js/napi/aafwk/wantagent/BUILD.gn b/frameworks/js/napi/aafwk/wantagent/BUILD.gn index 08c33095d5..1c07b11d70 100644 --- a/frameworks/js/napi/aafwk/wantagent/BUILD.gn +++ b/frameworks/js/napi/aafwk/wantagent/BUILD.gn @@ -32,7 +32,7 @@ ohos_shared_library("wantagent") { deps = [ "${ability_runtime_kits_path}/appkit:app_context", "${ability_runtime_kits_path}/appkit:appkit_native", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", ] external_deps = [ diff --git a/frameworks/js/napi/aafwk/wantagent/napi_want_agent.h b/frameworks/js/napi/aafwk/wantagent/napi_want_agent.h index 81f9a82db2..fdad2a453a 100644 --- a/frameworks/js/napi/aafwk/wantagent/napi_want_agent.h +++ b/frameworks/js/napi/aafwk/wantagent/napi_want_agent.h @@ -121,9 +121,9 @@ struct AsyncTriggerCallbackInfo { }; struct CallbackInfo { - std::shared_ptr wantAgent; - napi_env env; - napi_ref ref; + std::shared_ptr wantAgent = nullptr; + napi_env env = nullptr; + napi_ref ref = 0; }; struct TriggerReceiveDataWorker { diff --git a/frameworks/kits/ability/ability_runtime/include/js_extension_context.h b/frameworks/kits/ability/ability_runtime/include/js_extension_context.h index 3bab92bff1..1a54d09dc7 100644 --- a/frameworks/kits/ability/ability_runtime/include/js_extension_context.h +++ b/frameworks/kits/ability/ability_runtime/include/js_extension_context.h @@ -36,7 +36,8 @@ private: std::weak_ptr context_; }; -NativeValue* CreateJsExtensionContext(NativeEngine& engine, const std::shared_ptr& context); +NativeValue* CreateJsExtensionContext(NativeEngine& engine, const std::shared_ptr& context, + std::shared_ptr abilityInfo = nullptr); } // namespace AbilityRuntime } // namespace OHOS #endif // ABILITY_RUNTIME_JS_EXTENSION_CONTEXT_H diff --git a/frameworks/kits/ability/ability_runtime/src/ability_context_impl.cpp b/frameworks/kits/ability/ability_runtime/src/ability_context_impl.cpp index e7bcc82e09..d1072aca2a 100644 --- a/frameworks/kits/ability/ability_runtime/src/ability_context_impl.cpp +++ b/frameworks/kits/ability/ability_runtime/src/ability_context_impl.cpp @@ -453,7 +453,7 @@ ErrCode AbilityContextImpl::StartAbilityByCall( ErrCode AbilityContextImpl::ReleaseAbility(const std::shared_ptr &callback) { - HILOG_DEBUG("AbilityContextImpl::Release begain."); + HILOG_DEBUG("AbilityContextImpl::Release begin."); if (localCallContainer_ == nullptr) { HILOG_ERROR("%{public}s failed, localCallContainer_ is nullptr.", __func__); return ERR_INVALID_VALUE; diff --git a/frameworks/kits/ability/ability_runtime/src/js_extension_context.cpp b/frameworks/kits/ability/ability_runtime/src/js_extension_context.cpp index 183c88a953..f6f3507671 100644 --- a/frameworks/kits/ability/ability_runtime/src/js_extension_context.cpp +++ b/frameworks/kits/ability/ability_runtime/src/js_extension_context.cpp @@ -50,20 +50,75 @@ void JsExtensionContext::ConfigurationUpdated(NativeEngine* engine, const std::s engine->CallFunction(value, method, argv, 1); } -NativeValue* CreateJsExtensionContext(NativeEngine& engine, const std::shared_ptr &context) + +NativeValue* CreateJsExtensionAbilityInfo(NativeEngine& engine, const AppExecFwk::ExtensionAbilityInfo& info) +{ + HILOG_INFO("CreateJsExtensionAbilityInfo"); + NativeValue* objValue = engine.CreateObject(); + NativeObject* object = ConvertNativeValueTo(objValue); + if (object == nullptr) { + HILOG_ERROR("CreateJsExtensionAbilityInfo error, object is nullptr."); + return objValue; + } + object->SetProperty("bundleName", CreateJsValue(engine, info.bundleName)); + object->SetProperty("moduleName", CreateJsValue(engine, info.moduleName)); + object->SetProperty("name", CreateJsValue(engine, info.name)); + object->SetProperty("labelId", CreateJsValue(engine, info.labelId)); + object->SetProperty("descriptionId", CreateJsValue(engine, info.descriptionId)); + object->SetProperty("iconId", CreateJsValue(engine, info.iconId)); + object->SetProperty("isVisible", CreateJsValue(engine, info.visible)); + object->SetProperty("extensionAbilityType", CreateJsValue(engine, info.type)); + NativeValue *permissionArrayValue = engine.CreateArray(info.permissions.size()); + NativeArray *permissionArray = ConvertNativeValueTo(permissionArrayValue); + if (permissionArray != nullptr) { + int index = 0; + for (auto permission : info.permissions) { + permissionArray->SetElement(index++, CreateJsValue(engine, permission)); + } + } + object->SetProperty("permissions", permissionArrayValue); + object->SetProperty("applicationInfo", CreateJsApplicationInfo(engine, info.applicationInfo)); + object->SetProperty("metadata", CreateJsMetadataArray(engine, info.metadata)); + object->SetProperty("enabled", CreateJsValue(engine, info.enabled)); + object->SetProperty("readPermission", CreateJsValue(engine, info.readPermission)); + object->SetProperty("writePermission", CreateJsValue(engine, info.writePermission)); + return objValue; +} + +NativeValue* CreateJsExtensionContext(NativeEngine& engine, const std::shared_ptr &context, + std::shared_ptr abilityInfo) { HILOG_INFO("CreateJsExtensionContext begin"); NativeValue* objValue = CreateJsBaseContext(engine, context); - NativeObject* object = ConvertNativeValueTo(objValue); if (context == nullptr) { HILOG_ERROR("Failed to CreateJsExtensionContext, context is nullptr."); return objValue; } + NativeObject* object = ConvertNativeValueTo(objValue); + if (object == nullptr) { + HILOG_ERROR("Failed to CreateJsExtensionContext, object is nullptr."); + return objValue; + } auto configuration = context->GetConfiguration(); - if (configuration != nullptr && object != nullptr) { + if (configuration != nullptr) { object->SetProperty("config", CreateJsConfiguration(engine, *configuration)); } + auto hapModuleInfo = context->GetHapModuleInfo(); + if (abilityInfo && hapModuleInfo) { + auto isExist = [&abilityInfo](const AppExecFwk::ExtensionAbilityInfo &info) { + HILOG_INFO("%{public}s, %{public}s", info.bundleName.c_str(), info.name.c_str()); + return info.bundleName == abilityInfo->bundleName && info.name == abilityInfo->name; + }; + auto infoIter = std::find_if( + hapModuleInfo->extensionInfos.begin(), hapModuleInfo->extensionInfos.end(), isExist); + if (infoIter == hapModuleInfo->extensionInfos.end()) { + HILOG_ERROR("Set extensionAbilityInfo fail."); + } else { + object->SetProperty("extensionAbilityInfo", CreateJsExtensionAbilityInfo(engine, *infoIter)); + } + } + return objValue; } } // namespace AbilityRuntime diff --git a/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.h b/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.h index 9da99e5e88..6dce8adf48 100644 --- a/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.h +++ b/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.h @@ -149,7 +149,7 @@ public: } int GetMissionSnapshot( - const std::string& deviceId, const int32_t missionId, MissionSnapshot& snapshot) override + const std::string& deviceId, const int32_t missionId, MissionSnapshot& snapshot, bool isLowResolution) override { return 0; } diff --git a/frameworks/kits/ability/ability_runtime/test/moduletest/BUILD.gn b/frameworks/kits/ability/ability_runtime/test/moduletest/BUILD.gn index dfdd7be7b3..7a67a7154b 100644 --- a/frameworks/kits/ability/ability_runtime/test/moduletest/BUILD.gn +++ b/frameworks/kits/ability/ability_runtime/test/moduletest/BUILD.gn @@ -22,24 +22,25 @@ config("module_private_config") { if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } - include_dirs = [ "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS" ] + include_dirs = + [ "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS" ] } ohos_moduletest("ability_caller_fw_module_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", "ability_caller_fw_module_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime:ability_context_native", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/ability_runtime:ability_context_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", diff --git a/frameworks/kits/ability/ability_runtime/test/moduletest/ability_caller_fw_module_test.cpp b/frameworks/kits/ability/ability_runtime/test/moduletest/ability_caller_fw_module_test.cpp index a67bbb6de3..57f44b2b50 100644 --- a/frameworks/kits/ability/ability_runtime/test/moduletest/ability_caller_fw_module_test.cpp +++ b/frameworks/kits/ability/ability_runtime/test/moduletest/ability_caller_fw_module_test.cpp @@ -119,7 +119,7 @@ HWTEST_F(AbilityCallerTest, AaFwk_Ability_StartAbility_0200, Function | MediumTe /** * @tc.number: AaFwk_Ability_StartAbility_0300 * @tc.name: AbilityFwk - * @tc.desc: Ability caller to process StartAbility, and the result is fail because the element of want is empty. + * @tc.desc: Ability caller to process StartAbility, and the result is success because support empty want. */ HWTEST_F(AbilityCallerTest, AaFwk_Ability_StartAbility_0300, Function | MediumTest | Level1) { @@ -129,7 +129,7 @@ HWTEST_F(AbilityCallerTest, AaFwk_Ability_StartAbility_0300, Function | MediumTe EXPECT_FALSE(callback->IsCallBack()); ErrCode ret = context_->StartAbilityByCall(want, callback); - EXPECT_FALSE(ret == 0); + EXPECT_TRUE(ret == 0); } /** diff --git a/frameworks/kits/ability/ability_runtime/test/unittest/BUILD.gn b/frameworks/kits/ability/ability_runtime/test/unittest/BUILD.gn index b16c6486c6..9ac32dac97 100644 --- a/frameworks/kits/ability/ability_runtime/test/unittest/BUILD.gn +++ b/frameworks/kits/ability/ability_runtime/test/unittest/BUILD.gn @@ -25,25 +25,29 @@ config("module_private_config") { ohos_unittest("ability_context_impl_ut_test") { module_out_path = module_out_path - include_dirs = [ "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS" ] + include_dirs = + [ "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS" ] sources = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", "ability_context_impl_ut_test.cpp", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime:ability_context_native", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/ability_runtime:ability_context_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] - external_deps = [ "ability_base:want" ] + external_deps = [ + "ability_base:want", + "bundle_framework:appexecfwk_core", + ] } ohos_unittest("caller_call_back_ut_test") { @@ -51,8 +55,8 @@ ohos_unittest("caller_call_back_ut_test") { sources = [ "caller_call_back_ut_test.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime:ability_context_native", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/ability_runtime:ability_context_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "//third_party/googletest:gtest_main", ] } @@ -60,49 +64,57 @@ ohos_unittest("caller_call_back_ut_test") { ohos_unittest("local_call_container_ut_test") { module_out_path = module_out_path - include_dirs = [ "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS" ] + include_dirs = + [ "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS" ] sources = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", "local_call_container_ut_test.cpp", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime:ability_context_native", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/ability_runtime:ability_context_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] - external_deps = [ "ability_base:want" ] + external_deps = [ + "ability_base:want", + "bundle_framework:appexecfwk_core", + ] } ohos_unittest("local_call_record_ut_test") { module_out_path = module_out_path - include_dirs = [ "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS" ] + include_dirs = + [ "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS" ] sources = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", "local_call_record_ut_test.cpp", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/ability_runtime:ability_context_native", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/ability_runtime:ability_context_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] - external_deps = [ "ability_base:want" ] + external_deps = [ + "ability_base:want", + "bundle_framework:appexecfwk_core", + ] } ################################################################################ diff --git a/frameworks/kits/ability/native/BUILD.gn b/frameworks/kits/ability/native/BUILD.gn index d8cac2d2ba..c7924048cc 100644 --- a/frameworks/kits/ability/native/BUILD.gn +++ b/frameworks/kits/ability/native/BUILD.gn @@ -30,12 +30,11 @@ config("ability_config") { "${ability_runtime_kits_path}/appkit/native/app/include", "${form_fwk_path}/interfaces/kits/native/include", "${ability_runtime_kits_path}/app/native/app/include", - "${ability_runtime_services_path}/common/include", "//third_party/node/src", "${ability_runtime_innerkits_path}/ability_manager/include/continuation", "${ability_runtime_kits_path}/appkit/native/app/include/task", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common", - "${ability_runtime_path}/frameworks/js/napi/aafwk/featureAbility", + "${ability_runtime_napi_path}/inner/napi_common", + "${ability_runtime_napi_path}/featureAbility", ] cflags = [] @@ -71,7 +70,7 @@ config("ability_public_config") { "//third_party/libuv/include", "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", "${ability_runtime_innerkits_path}/ability_manager/include/continuation", - "${global_path}/resource_management/interfaces/inner_api/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", "//third_party/json/include", ] @@ -114,7 +113,6 @@ ohos_shared_library("abilitykit_native") { "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/rdb/include", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi//common/include", "${distributeddatamgr_path}/appdatamgr/frameworks/js/napi/dataability/include", - "${distributeddatamgr_path}/objectstore/interfaces/innerkits/", ] sources = [ @@ -126,11 +124,11 @@ ohos_shared_library("abilitykit_native") { "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", "${ability_runtime_kits_path}/appkit/native/app/src/context_deal.cpp", "${ability_runtime_kits_path}/appkit/native/app/src/sys_mgr_client.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common/napi_common_ability.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common/napi_common_configuration.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common/napi_common_start_options.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common/napi_common_util.cpp", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common/napi_common_want.cpp", + "${ability_runtime_napi_path}/inner/napi_common/napi_common_ability.cpp", + "${ability_runtime_napi_path}/inner/napi_common/napi_common_configuration.cpp", + "${ability_runtime_napi_path}/inner/napi_common/napi_common_start_options.cpp", + "${ability_runtime_napi_path}/inner/napi_common/napi_common_util.cpp", + "${ability_runtime_napi_path}/inner/napi_common/napi_common_want.cpp", "${ability_runtime_services_path}/abilitymgr/src/ability_start_setting.cpp", "${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp", "${ability_runtime_services_path}/common/src/event_report.cpp", @@ -223,12 +221,11 @@ ohos_shared_library("abilitykit_native") { "dataability:native_dataability", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "ipc_js:rpc", - "relational_store:native_appdatafwk", "relational_store:native_rdb", "relational_store:rdb_data_share_adapter", - "resource_management:global_resmgr", "samgr_standard:samgr_proxy", "utils_base:utils", ] @@ -250,8 +247,6 @@ ohos_shared_library("abilitykit_native") { } public_deps = [ - "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//foundation/arkui/napi:ace_napi", ] @@ -278,7 +273,6 @@ ohos_shared_library("abilitykit_native") { external_deps += [ "form_fwk:fmskit_native", "form_fwk:form_manager", - "input:libmmi-client", "multimedia_image_standard:image", ] diff --git a/frameworks/kits/ability/native/src/ability.cpp b/frameworks/kits/ability/native/src/ability.cpp index 485fea2933..2a25687932 100644 --- a/frameworks/kits/ability/native/src/ability.cpp +++ b/frameworks/kits/ability/native/src/ability.cpp @@ -23,9 +23,6 @@ #include "ability_post_event_timeout.h" #include "ability_runtime/js_ability.h" #include "abs_shared_result_set.h" -#ifdef BGTASKMGR_CONTINUOUS_TASK_ENABLE -#include "background_task_mgr_helper.h" -#endif #include "hitrace_meter.h" #include "configuration_convertor.h" #include "connection_manager.h" @@ -33,14 +30,10 @@ #include "continuation_manager.h" #include "continuation_register_manager.h" #include "continuation_register_manager_proxy.h" -#ifdef BGTASKMGR_CONTINUOUS_TASK_ENABLE -#include "continuous_task_param.h" -#endif #include "data_ability_operation.h" #include "data_ability_predicates.h" #include "data_ability_result.h" #include "data_uri_utils.h" -#include "distributed_objectstore.h" #include "hilog_wrapper.h" #include "if_system_ability_manager.h" #include "ipc_skeleton.h" @@ -55,6 +48,15 @@ #include "task_handler_client.h" #include "values_bucket.h" +#ifdef BGTASKMGR_CONTINUOUS_TASK_ENABLE +#include "background_task_mgr_helper.h" +#include "continuous_task_param.h" +#endif + +#ifdef DISTRIBUTED_DATA_OBJECT_ENABLE +#include "distributed_objectstore.h" +#endif + #ifdef SUPPORT_GRAPHICS #include "display_type.h" #include "form_host_client.h" diff --git a/frameworks/kits/ability/native/src/ability_runtime/js_ability_context.cpp b/frameworks/kits/ability/native/src/ability_runtime/js_ability_context.cpp index b5fa7bb88d..51cddba169 100644 --- a/frameworks/kits/ability/native/src/ability_runtime/js_ability_context.cpp +++ b/frameworks/kits/ability/native/src/ability_runtime/js_ability_context.cpp @@ -206,7 +206,7 @@ NativeValue* JsAbilityContext::OnStartAbility(NativeEngine& engine, NativeCallba NativeValue* lastParam = (info.argc == unwrapArgc) ? nullptr : info.argv[unwrapArgc]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStartAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -259,7 +259,7 @@ NativeValue* JsAbilityContext::OnStartAbilityWithAccount(NativeEngine& engine, N NativeValue* lastParam = (info.argc == unwrapArgc) ? nullptr : info.argv[unwrapArgc]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStartAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -356,14 +356,13 @@ NativeValue* JsAbilityContext::OnStartAbilityByCall(NativeEngine& engine, Native if (calls->remoteCallee == nullptr) { HILOG_INFO("OnStartAbilityByCall async wait execute"); - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStartAbilityByCall", engine, CreateAsyncTaskWithLastParam( engine, lastParam, std::move(callExecute), std::move(callComplete), &retsult)); } else { HILOG_INFO("OnStartAbilityByCall promiss return result execute"); - AsyncTask::Schedule( - engine, + AsyncTask::Schedule("JsAbilityContext::OnStartAbilityByCall", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(callComplete), &retsult)); } @@ -518,7 +517,7 @@ NativeValue* JsAbilityContext::OnStartExtensionAbility(NativeEngine& engine, Nat NativeValue* lastParam = (info.argc <= ARGC_ONE) ? nullptr : info.argv[ARGC_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStartExtensionAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -566,7 +565,7 @@ NativeValue* JsAbilityContext::OnStartExtensionAbilityWithAccount(NativeEngine& NativeValue* lastParam = (info.argc <= ARGC_TWO) ? nullptr : info.argv[ARGC_TWO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStartExtensionAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -607,7 +606,7 @@ NativeValue* JsAbilityContext::OnStopExtensionAbility(NativeEngine& engine, Nati NativeValue* lastParam = (info.argc <= ARGC_ONE) ? nullptr : info.argv[ARGC_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStopExtensionAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -654,7 +653,7 @@ NativeValue* JsAbilityContext::OnStopExtensionAbilityWithAccount(NativeEngine& e NativeValue* lastParam = (info.argc <= ARGC_TWO) ? nullptr : info.argv[ARGC_TWO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnStopExtensionAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -695,7 +694,7 @@ NativeValue* JsAbilityContext::OnTerminateSelfWithResult(NativeEngine& engine, N NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnTerminateSelfWithResult", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); HILOG_INFO("OnTerminateSelfWithResult is called end"); return result; @@ -748,7 +747,7 @@ NativeValue* JsAbilityContext::OnConnectAbility(NativeEngine& engine, NativeCall task.Resolve(engine, engine.CreateUndefined()); }; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnConnectAbility", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return engine.CreateNumber(connectId); } @@ -809,7 +808,7 @@ NativeValue* JsAbilityContext::OnConnectAbilityWithAccount(NativeEngine& engine, task.Resolve(engine, engine.CreateUndefined()); }; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnConnectAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return engine.CreateNumber(connectId); } @@ -867,7 +866,7 @@ NativeValue* JsAbilityContext::OnDisconnectAbility(NativeEngine& engine, NativeC NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnDisconnectAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -905,7 +904,7 @@ NativeValue* JsAbilityContext::OnTerminateSelf(NativeEngine& engine, NativeCallb NativeValue* lastParam = (info.argc == ARGC_ZERO) ? nullptr : info.argv[ARGC_ZERO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnTerminateSelf", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -1358,7 +1357,7 @@ NativeValue* JsAbilityContext::OnSetMissionLabel(NativeEngine& engine, NativeCal NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnSetMissionLabel", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -1403,7 +1402,7 @@ NativeValue* JsAbilityContext::OnSetMissionIcon(NativeEngine& engine, NativeCall NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsAbilityContext::OnSetMissionIcon", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } diff --git a/frameworks/kits/ability/native/src/form_runtime/js_form_extension_context.cpp b/frameworks/kits/ability/native/src/form_runtime/js_form_extension_context.cpp index 2020522d87..dfa4b78757 100644 --- a/frameworks/kits/ability/native/src/form_runtime/js_form_extension_context.cpp +++ b/frameworks/kits/ability/native/src/form_runtime/js_form_extension_context.cpp @@ -118,7 +118,7 @@ private: NativeValue* lastParam = (info.argc == UPDATE_FORM_PARAMS_SIZE) ? nullptr : info.argv[info.argc - 1]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsFormExtensionContext::OnUpdateForm", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -172,7 +172,7 @@ private: NativeValue* lastParam = (info.argc == unwrapArgc) ? nullptr : info.argv[unwrapArgc]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JsFormExtensionContext::OnStartAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -182,7 +182,11 @@ private: NativeValue* CreateJsFormExtensionContext(NativeEngine& engine, std::shared_ptr context) { HILOG_INFO("%{public}s called.", __func__); - NativeValue* objValue = CreateJsExtensionContext(engine, context); + std::shared_ptr abilityInfo = nullptr; + if (context) { + abilityInfo = context->GetAbilityInfo(); + } + NativeValue* objValue = CreateJsExtensionContext(engine, context, abilityInfo); NativeObject* object = ConvertNativeValueTo(objValue); std::unique_ptr jsContext = std::make_unique(context); diff --git a/frameworks/kits/ability/native/src/js_service_extension_context.cpp b/frameworks/kits/ability/native/src/js_service_extension_context.cpp index a9b660c77f..0b32737854 100644 --- a/frameworks/kits/ability/native/src/js_service_extension_context.cpp +++ b/frameworks/kits/ability/native/src/js_service_extension_context.cpp @@ -166,7 +166,7 @@ private: NativeValue* lastParam = (info.argc == unwrapArgc) ? nullptr : info.argv[unwrapArgc]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnStartAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -230,7 +230,7 @@ private: NativeValue* lastParam = (info.argc == unwrapArgc) ? nullptr : info.argv[unwrapArgc]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnStartAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -264,7 +264,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_ZERO) ? nullptr : info.argv[INDEX_ZERO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnTerminateAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -316,7 +316,7 @@ private: task.Resolve(engine, engine.CreateUndefined()); }; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnConnectAbility", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return engine.CreateNumber(connectId); } @@ -377,7 +377,7 @@ private: task.Resolve(engine, engine.CreateUndefined()); }; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnConnectAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, nullptr, nullptr, std::move(complete), &result)); return engine.CreateNumber(connectId); } @@ -436,7 +436,7 @@ private: NativeValue* lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[INDEX_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnDisconnectAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -476,7 +476,7 @@ private: NativeValue* lastParam = (info.argc <= ARGC_ONE) ? nullptr : info.argv[ARGC_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnStartExtensionAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -523,7 +523,7 @@ private: NativeValue* lastParam = (info.argc <= ARGC_TWO) ? nullptr : info.argv[ARGC_TWO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnStartExtensionAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -564,7 +564,7 @@ private: NativeValue* lastParam = (info.argc <= ARGC_ONE) ? nullptr : info.argv[ARGC_ONE]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnStopExtensionAbility", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -611,7 +611,7 @@ private: NativeValue* lastParam = (info.argc <= ARGC_TWO) ? nullptr : info.argv[ARGC_TWO]; NativeValue* result = nullptr; - AsyncTask::Schedule( + AsyncTask::Schedule("JSServiceExtensionConnection::OnStopExtensionAbilityWithAccount", engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } @@ -642,40 +642,14 @@ NativeValue* CreateJsMetadataArray(NativeEngine& engine, const std::vector(objValue); - object->SetProperty("bundleName", CreateJsValue(engine, info.bundleName)); - object->SetProperty("moduleName", CreateJsValue(engine, info.moduleName)); - object->SetProperty("name", CreateJsValue(engine, info.name)); - object->SetProperty("labelId", CreateJsValue(engine, info.labelId)); - object->SetProperty("descriptionId", CreateJsValue(engine, info.descriptionId)); - object->SetProperty("iconId", CreateJsValue(engine, info.iconId)); - object->SetProperty("isVisible", CreateJsValue(engine, info.visible)); - object->SetProperty("extensionAbilityType", CreateJsValue(engine, info.type)); - NativeValue *permissionArrayValue = engine.CreateArray(info.permissions.size()); - NativeArray *permissionArray = ConvertNativeValueTo(permissionArrayValue); - if (permissionArray != nullptr) { - int index = 0; - for (auto permission : info.permissions) { - permissionArray->SetElement(index++, CreateJsValue(engine, permission)); - } - } - object->SetProperty("permissions", permissionArrayValue); - object->SetProperty("applicationInfo", CreateJsApplicationInfo(engine, info.applicationInfo)); - object->SetProperty("metadata", CreateJsMetadataArray(engine, info.metadata)); - object->SetProperty("enabled", CreateJsValue(engine, info.enabled)); - object->SetProperty("readPermission", CreateJsValue(engine, info.readPermission)); - object->SetProperty("writePermission", CreateJsValue(engine, info.writePermission)); - return objValue; -} - NativeValue* CreateJsServiceExtensionContext(NativeEngine& engine, std::shared_ptr context) { HILOG_INFO("CreateJsServiceExtensionContext begin"); - NativeValue* objValue = CreateJsExtensionContext(engine, context); + std::shared_ptr abilityInfo = nullptr; + if (context) { + abilityInfo = context->GetAbilityInfo(); + } + NativeValue* objValue = CreateJsExtensionContext(engine, context, abilityInfo); NativeObject* object = ConvertNativeValueTo(objValue); std::unique_ptr jsContext = std::make_unique(context); @@ -700,25 +674,6 @@ NativeValue* CreateJsServiceExtensionContext(NativeEngine& engine, std::shared_p BindNativeFunction(engine, *object, "stopServiceExtensionAbilityWithAccount", JsServiceExtensionContext::StopServiceExtensionAbilityWithAccount); - if (context) { - HILOG_INFO("Set ExtensionAbilityInfo Property"); - auto abilityInfo = context->GetAbilityInfo(); - auto hapModuleInfo = context->GetHapModuleInfo(); - if (abilityInfo && hapModuleInfo) { - auto isExist = [&abilityInfo](const AppExecFwk::ExtensionAbilityInfo &info) { - HILOG_INFO("%{public}s, %{public}s", info.bundleName.c_str(), info.name.c_str()); - return info.bundleName == abilityInfo->bundleName && info.name == abilityInfo->name; - }; - auto infoIter = std::find_if( - hapModuleInfo->extensionInfos.begin(), hapModuleInfo->extensionInfos.end(), isExist); - if (infoIter == hapModuleInfo->extensionInfos.end()) { - HILOG_INFO("Get target fail."); - return objValue; - } - object->SetProperty("extensionAbilityInfo", CreateJsExtensionAbilityInfo(engine, *infoIter)); - } - } - return objValue; } diff --git a/frameworks/kits/ability/native/src/js_static_subscriber_extension_context.cpp b/frameworks/kits/ability/native/src/js_static_subscriber_extension_context.cpp index e350c9ee33..ef1486b9ea 100644 --- a/frameworks/kits/ability/native/src/js_static_subscriber_extension_context.cpp +++ b/frameworks/kits/ability/native/src/js_static_subscriber_extension_context.cpp @@ -47,7 +47,11 @@ NativeValue* CreateJsStaticSubscriberExtensionContext(NativeEngine& engine, std::shared_ptr context) { HILOG_INFO("CreateJsStaticSubscriberExtensionContext begin"); - NativeValue *objValue = CreateJsExtensionContext(engine, context); + std::shared_ptr abilityInfo = nullptr; + if (context) { + abilityInfo = context->GetAbilityInfo(); + } + NativeValue *objValue = CreateJsExtensionContext(engine, context, abilityInfo); NativeObject *object = ConvertNativeValueTo(objValue); std::unique_ptr jsContext = diff --git a/frameworks/kits/ability/native/test/BUILD.gn b/frameworks/kits/ability/native/test/BUILD.gn index 48dd23a955..8cc1173b97 100644 --- a/frameworks/kits/ability/native/test/BUILD.gn +++ b/frameworks/kits/ability/native/test/BUILD.gn @@ -20,19 +20,17 @@ module_output_path = "ability_runtime/ability_test" config("module_private_config") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include/task", - "${ability_runtime_path}/frameworks/kits/appkit/native/test/mock/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", + "${ability_runtime_kits_path}/appkit/native/app/include", + "${ability_runtime_kits_path}/appkit/native/app/include/task", + "${ability_runtime_kits_path}/appkit/native/test/mock/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", "${distributeddatamgr_path}/distributeddatamgr/interfaces/innerkits/app_distributeddata/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", ] @@ -56,18 +54,17 @@ config("module_private_config") { config("module_ability_context_config") { visibility = [ ":*" ] include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/test/mock/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", + "${ability_runtime_kits_path}/appkit/native/test/mock/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/base/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "//third_party/googletest/googlemock/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_kits_path}/appkit/native/app/include", "${multimodalinput_path}/interfaces/native/innerkits/event/include", "//third_party/libuv/include", "${global_path}/resource_management/interfaces/inner_api/include", @@ -85,23 +82,21 @@ config("module_ability_context_config") { ohos_unittest("ability_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ability_record_mgr.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ability_record_mgr.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "unittest/ability_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -113,7 +108,9 @@ ohos_unittest("ability_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -136,19 +133,19 @@ ohos_unittest("ability_lifecycle_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -168,20 +165,19 @@ ohos_unittest("ability_lifecycle_executor_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ - "ability_base:configuration", "ability_base:want", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -202,14 +198,12 @@ ohos_unittest("ability_context_interface_test") { configs = [ ":module_ability_context_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -217,6 +211,7 @@ ohos_unittest("ability_context_interface_test") { external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -236,22 +231,17 @@ ohos_unittest("ability_context_test") { "unittest/ability_context_test.cpp", ] - include_dirs = [ - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common", - "//foundation/arkui/napi/interfaces/kits", - ] + include_dirs = [ "${ability_runtime_napi_path}/inner/napi_common" ] configs = [ ":module_ability_context_config" ] deps = [ - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common:napi_common", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_napi_path}/inner/napi_common:napi_common", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//foundation/arkui/napi:ace_napi", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -259,8 +249,10 @@ ohos_unittest("ability_context_test") { external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", + "napi:ace_napi", ] if (ability_runtime_graphics) { @@ -272,7 +264,7 @@ ohos_unittest("page_ability_impl_test") { module_out_path = module_output_path if (ability_runtime_graphics) { sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_replace_ability_impl.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_replace_ability_impl.cpp", "../src/page_ability_impl.cpp", "unittest/page_ability_impl_test.cpp", ] @@ -280,21 +272,20 @@ ohos_unittest("page_ability_impl_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "${multimodalinput_path}/frameworks/proxy:libmmi-common", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "input:libmmi-client", @@ -313,20 +304,19 @@ ohos_unittest("service_ability_impl_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", @@ -347,20 +337,19 @@ ohos_unittest("scene_created_test") { sources = [ "unittest/scene_created_test.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "input:libmmi-client", "ipc:ipc_core", @@ -370,17 +359,16 @@ ohos_unittest("scene_created_test") { ohos_unittest("data_ability_helper_test") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/abilitymgr/include" ] + include_dirs = [ "${ability_runtime_services_path}/abilitymgr/include" ] sources = [ "unittest/data_ability_helper_test.cpp" ] configs = [ ":module_ability_context_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -391,6 +379,7 @@ ohos_unittest("data_ability_helper_test") { "ability_base:want", "ability_base:zuri", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -409,13 +398,11 @@ ohos_unittest("data_ability_operation_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -425,7 +412,9 @@ ohos_unittest("data_ability_operation_test") { "ability_base:base", "ability_base:want", "ability_base:zuri", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -440,22 +429,20 @@ ohos_unittest("data_ability_operation_test") { ohos_unittest("ability_impl_active_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -465,6 +452,8 @@ ohos_unittest("ability_impl_active_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -478,23 +467,21 @@ ohos_unittest("ability_impl_active_test") { ohos_unittest("ability_impl_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -505,8 +492,10 @@ ohos_unittest("ability_impl_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -526,13 +515,13 @@ ohos_unittest("ability_impl_test") { ohos_unittest("ability_thread_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_data_ability_impl.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_deal.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_data_ability_impl.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_deal.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "mock/include/mock_ability_manager_client.cpp", "mock/include/sys_mgr_client_mock.cpp", "unittest/ability_thread_test.cpp", @@ -541,14 +530,12 @@ ohos_unittest("ability_thread_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -559,7 +546,9 @@ ohos_unittest("ability_thread_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -581,19 +570,17 @@ ohos_unittest("ability_thread_test") { ohos_unittest("ability_thread_call_request_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", "unittest/ability_thread_call_request_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", ] @@ -602,13 +589,15 @@ ohos_unittest("ability_thread_call_request_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", ] } ohos_unittest("form_provider_client_test") { module_out_path = module_output_path if (ability_runtime_graphics) { - include_dirs = [ "${bundlefwk_inner_api_path}/appexecfwk_base/include" ] + include_dirs = [] sources = [ "mock/include/mock_form_supply_callback.cpp", @@ -618,24 +607,23 @@ ohos_unittest("form_provider_client_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "${graphic_path}:libwmclient", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ - "ability_base:configuration", "ability_base:want", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "form_fwk:form_manager", "hiviewdfx_hilog_native:libhilog", "input:libmmi-client", @@ -647,27 +635,25 @@ ohos_unittest("form_provider_client_test") { ohos_unittest("data_ability_impl_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_replace_ability_impl.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_deal.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_replace_ability_impl.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_deal.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "unittest/data_ability_impl_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -677,7 +663,9 @@ ohos_unittest("data_ability_impl_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -699,27 +687,25 @@ ohos_unittest("data_ability_impl_test") { ohos_unittest("data_ability_impl_file_secondpart_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_replace_ability_impl.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_deal.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_replace_ability_impl.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_deal.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "unittest/data_ability_impl_file_secondpart_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -730,7 +716,9 @@ ohos_unittest("data_ability_impl_file_secondpart_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -752,27 +740,25 @@ ohos_unittest("data_ability_impl_file_secondpart_test") { ohos_unittest("data_ability_impl_file_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_replace_ability_impl.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_deal.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_replace_ability_impl.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_deal.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "unittest/data_ability_impl_file_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -783,7 +769,9 @@ ohos_unittest("data_ability_impl_file_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -805,13 +793,13 @@ ohos_unittest("data_ability_impl_file_test") { ohos_unittest("ability_thread_dataability_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_data_ability_impl.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_deal.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_data_ability_impl.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_deal.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "mock/include/mock_ability_manager_client.cpp", "mock/include/sys_mgr_client_mock.cpp", "unittest/ability_thread_dataability_test.cpp", @@ -820,14 +808,12 @@ ohos_unittest("ability_thread_dataability_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -838,7 +824,9 @@ ohos_unittest("ability_thread_dataability_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -859,8 +847,7 @@ ohos_unittest("ability_thread_dataability_test") { config("data_uri_utils_test_config") { visibility = [ ":*" ] - include_dirs = - [ "${ability_runtime_path}/frameworks/kits/ability/native/include/" ] + include_dirs = [ "${ability_runtime_kits_path}/ability/native/include/" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -879,21 +866,21 @@ ohos_unittest("data_uri_utils_test") { ] sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/src/data_uri_utils.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/unittest/data_uri_utils_test.cpp", + "${ability_runtime_kits_path}/ability/native/src/data_uri_utils.cpp", + "${ability_runtime_kits_path}/ability/native/test/unittest/data_uri_utils_test.cpp", ] deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -905,12 +892,11 @@ ohos_unittest("data_uri_utils_test") { ohos_unittest("pac_map_test") { module_out_path = module_output_path - sources = [ "${ability_runtime_path}/frameworks/kits/ability/native/test/unittest/pac_map_test.cpp" ] + sources = [ "${ability_runtime_kits_path}/ability/native/test/unittest/pac_map_test.cpp" ] configs = [ ":module_private_config" ] deps = [ - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -918,6 +904,7 @@ ohos_unittest("pac_map_test") { external_deps = [ "ability_base:base", "ability_base:want", + "bundle_framework:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -930,7 +917,7 @@ ohos_unittest("pac_map_test") { ohos_unittest("ability_permission_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/unittest/ability_permission_test.cpp", + "${ability_runtime_kits_path}/ability/native/test/unittest/ability_permission_test.cpp", "mock/include/mock_ability_manager_service.cpp", "mock/include/mock_bundle_manager.cpp", "mock/include/sys_mgr_client_mock.cpp", @@ -939,14 +926,12 @@ ohos_unittest("ability_permission_test") { configs = [ ":module_ability_context_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -954,7 +939,9 @@ ohos_unittest("ability_permission_test") { external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -965,12 +952,12 @@ ohos_unittest("ability_permission_test") { ohos_unittest("task_handler_client_test") { module_out_path = module_output_path - sources = [ "${ability_runtime_path}/frameworks/kits/ability/native/test/unittest/task_handler_client_test.cpp" ] + sources = [ "${ability_runtime_kits_path}/ability/native/test/unittest/task_handler_client_test.cpp" ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -987,23 +974,22 @@ ohos_unittest("task_handler_client_test") { ohos_unittest("ability_thread_for_ability_on_configuration_update") { module_out_path = module_output_path - sources = [ "${ability_runtime_path}/frameworks/kits/ability/native/test/unittest/ability_thread_for_ability_on_configuration_update.cpp" ] + sources = [ "${ability_runtime_kits_path}/ability/native/test/unittest/ability_thread_for_ability_on_configuration_update.cpp" ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -1015,12 +1001,12 @@ ohos_unittest("ability_thread_for_ability_on_configuration_update") { ohos_unittest("data_ability_result_test") { module_out_path = module_output_path - sources = [ "${ability_runtime_path}/frameworks/kits/ability/native/test/unittest/data_ability_result_test.cpp" ] + sources = [ "${ability_runtime_kits_path}/ability/native/test/unittest/data_ability_result_test.cpp" ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "//third_party/googletest:gtest_main", ] @@ -1039,11 +1025,11 @@ ohos_unittest("form_host_client_test") { module_out_path = module_output_path if (ability_runtime_graphics) { sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ability_record_mgr.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_start_setting.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ability_record_mgr.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_start_setting.cpp", "mock/include/mock_bundle_manager_form.cpp", "unittest/form_host_client_test.cpp", ] @@ -1051,15 +1037,13 @@ ohos_unittest("form_host_client_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "${graphic_path}:libwmclient", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -1069,7 +1053,9 @@ ohos_unittest("form_host_client_test") { "ability_base:configuration", "ability_base:want", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "form_fwk:fmskit_native", "form_fwk:form_manager", "hiviewdfx_hilog_native:libhilog", @@ -1082,23 +1068,21 @@ ohos_unittest("form_host_client_test") { ohos_unittest("continuation_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/ohos_application.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/ohos_application.cpp", "unittest/continuation_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -1109,7 +1093,9 @@ ohos_unittest("continuation_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", @@ -1125,7 +1111,7 @@ ohos_unittest("new_ability_impl_test") { module_out_path = module_output_path if (ability_runtime_graphics) { sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_replace_ability_impl.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_replace_ability_impl.cpp", "../src/new_ability_impl.cpp", "unittest/new_ability_impl_test.cpp", ] @@ -1133,21 +1119,20 @@ ohos_unittest("new_ability_impl_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "${multimodalinput_path}/frameworks/proxy:libmmi-common", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "input:libmmi-client", diff --git a/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h b/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h index 65e8c7250d..5f3cf1d1b7 100644 --- a/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h +++ b/frameworks/kits/ability/native/test/mock/include/mock_ability_manager_service.h @@ -192,7 +192,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/frameworks/kits/appkit/BUILD.gn b/frameworks/kits/appkit/BUILD.gn index 009f246f13..008e003792 100644 --- a/frameworks/kits/appkit/BUILD.gn +++ b/frameworks/kits/appkit/BUILD.gn @@ -46,7 +46,7 @@ config("appkit_config") { } include_dirs = [ - "${ability_runtime_path}/frameworks/kits/ability/native/include", + "${ability_runtime_kits_path}/ability/native/include", "//third_party/json/include", ] } @@ -78,10 +78,10 @@ ohos_shared_library("appkit_native") { "native/ability_runtime/context", "native/app/include", "native/app/include/task", - "${ability_runtime_path}/services/common/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/frameworks/js/napi/aafwk/inner/napi_common", + "${ability_runtime_services_path}/common/include", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_napi_path}/inner/napi_common", ] configs = [ ":appkit_config" ] @@ -115,8 +115,8 @@ ohos_shared_library("appkit_native") { deps = [ ":appkit_delegator", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:app_context_utils", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:app_context_utils", ] public_deps = @@ -246,7 +246,7 @@ ohos_shared_library("app_context_utils") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:app_context", + "${ability_runtime_kits_path}/appkit:app_context", "//base/hiviewdfx/hiview/adapter/utility:hiview_adapter_utility", ] @@ -296,8 +296,8 @@ ohos_shared_library("appkit_delegator") { "native/ability_runtime/app", "native/ability_runtime/context", "native/ability_delegator/include", - "${ability_runtime_path}/services/common/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", + "${ability_runtime_services_path}/common/include", + "${ability_runtime_kits_path}/ability/native/include", ] configs = [ ":appkit_config" ] @@ -325,7 +325,7 @@ ohos_shared_library("appkit_delegator") { deps = [ ":delegator_mgmt_abc", ":delegator_mgmt_js", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", + "${ability_runtime_kits_path}/appkit:app_context", ] external_deps = [ diff --git a/frameworks/kits/appkit/native/ability_runtime/context/ability_lifecycle_callback.cpp b/frameworks/kits/appkit/native/ability_runtime/context/ability_lifecycle_callback.cpp index 600f8c3efc..5965b76878 100644 --- a/frameworks/kits/appkit/native/ability_runtime/context/ability_lifecycle_callback.cpp +++ b/frameworks/kits/appkit/native/ability_runtime/context/ability_lifecycle_callback.cpp @@ -77,7 +77,8 @@ void JsAbilityLifecycleCallback::CallJsMethod( }); NativeReference *callback = nullptr; std::unique_ptr execute = nullptr; - AsyncTask::Schedule(*engine_, std::make_unique(callback, std::move(execute), std::move(complete))); + AsyncTask::Schedule("JsAbilityLifecycleCallback::CallJsMethod:" + methodName, + *engine_, std::make_unique(callback, std::move(execute), std::move(complete))); } void JsAbilityLifecycleCallback::OnAbilityCreate(const std::weak_ptr &abilityObj) diff --git a/frameworks/kits/appkit/native/ability_runtime/context/js_application_context_utils.cpp b/frameworks/kits/appkit/native/ability_runtime/context/js_application_context_utils.cpp index 50f8674966..91f3e9e410 100644 --- a/frameworks/kits/appkit/native/ability_runtime/context/js_application_context_utils.cpp +++ b/frameworks/kits/appkit/native/ability_runtime/context/js_application_context_utils.cpp @@ -453,7 +453,8 @@ NativeValue *JsApplicationContextUtils::OnUnregisterAbilityLifecycleCallback( }; NativeValue *lastParam = (info.argc == ARGC_ONE) ? nullptr : info.argv[INDEX_ONE]; NativeValue *result = nullptr; - AsyncTask::Schedule(engine, CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); + AsyncTask::Schedule("JsApplicationContextUtils::OnUnregisterAbilityLifecycleCallback", engine, + CreateAsyncTaskWithLastParam(engine, lastParam, nullptr, std::move(complete), &result)); return result; } } // namespace diff --git a/frameworks/kits/appkit/native/app/include/main_thread.h b/frameworks/kits/appkit/native/app/include/main_thread.h index b6f12e063a..174002976d 100644 --- a/frameworks/kits/appkit/native/app/include/main_thread.h +++ b/frameworks/kits/appkit/native/app/include/main_thread.h @@ -460,8 +460,6 @@ private: */ void LoadAbilityLibrary(const std::vector &libraryPaths); - void LoadNativeLiabrary(std::string &nativeLibraryPath); - void LoadAppLibrary(); void ChangeToLocalPath(const std::string &bundleName, @@ -495,7 +493,6 @@ private: std::shared_ptr &contextDeal, ApplicationInfo &appInfo, BundleInfo& bundleInfo, const Configuration &config); std::vector fileEntries_; - std::vector nativeFileEntries_; std::vector handleAbilityLib_; // the handler of ACE Library. #endif // ABILITY_LIBRARY_LOADER #ifdef APPLICATION_LIBRARY_LOADER diff --git a/frameworks/kits/appkit/native/app/src/main_thread.cpp b/frameworks/kits/appkit/native/app/src/main_thread.cpp index aa3bda48b3..bf29c4bb17 100644 --- a/frameworks/kits/appkit/native/app/src/main_thread.cpp +++ b/frameworks/kits/appkit/native/app/src/main_thread.cpp @@ -107,7 +107,6 @@ MainThread::MainThread() { #ifdef ABILITY_LIBRARY_LOADER fileEntries_.clear(); - nativeFileEntries_.clear(); handleAbilityLib_.clear(); #endif // ABILITY_LIBRARY_LOADER } @@ -812,17 +811,13 @@ void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData, con return; } - ApplicationInfo appInfo = appLaunchData.GetApplicationInfo(); - if (appLaunchData.IsNativeApplication()) { - HILOG_INFO("%{public}s load native application so.", __func__); - std::vector localPaths; - ChangeToLocalPath(appLaunchData.GetApplicationInfo().bundleName, - appLaunchData.GetApplicationInfo().moduleSourceDirs, localPaths); - LoadAbilityLibrary(localPaths); - LoadNativeLiabrary(appInfo.nativeLibraryPath); - } + std::vector localPaths; + ChangeToLocalPath(appLaunchData.GetApplicationInfo().bundleName, + appLaunchData.GetApplicationInfo().moduleSourceDirs, localPaths); + LoadAbilityLibrary(localPaths); LoadAppLibrary(); + ApplicationInfo appInfo = appLaunchData.GetApplicationInfo(); ProcessInfo processInfo = appLaunchData.GetProcessInfo(); Profile appProfile = appLaunchData.GetProfile(); @@ -897,7 +892,7 @@ void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData, con } std::string libPath = LOCAL_CODE_PATH; libPath += (libPath.back() == '/') ? nativeLibraryPath : "/" + nativeLibraryPath; - HILOG_INFO("napi lib path = %{public}s", libPath.c_str()); + HILOG_INFO("napi lib path = %{private}s", libPath.c_str()); options.packagePath = libPath; } auto runtime = AbilityRuntime::Runtime::Create(options); @@ -1019,46 +1014,6 @@ void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData, con HILOG_INFO("MainThread::handleLaunchApplication called end."); } -void MainThread::LoadNativeLiabrary(std::string &nativeLibraryPath) -{ -#ifdef ABILITY_LIBRARY_LOADER - if (nativeLibraryPath.empty()) { - HILOG_INFO("Native library path is empty."); - return; - } - - if (nativeLibraryPath.back() == '/') { - nativeLibraryPath.pop_back(); - } - std::string libPath = LOCAL_CODE_PATH; - libPath += (libPath.back() == '/') ? nativeLibraryPath : "/" + nativeLibraryPath; - HILOG_INFO("native library path = %{public}s", libPath.c_str()); - - if (!ScanDir(libPath, nativeFileEntries_)) { - HILOG_INFO("%{public}s scanDir %{public}s not exits", __func__, libPath.c_str()); - } - - if (nativeFileEntries_.empty()) { - HILOG_INFO("No native library"); - return; - } - - void *handleAbilityLib = nullptr; - for (auto fileEntry : nativeFileEntries_) { - if (!fileEntry.empty()) { - handleAbilityLib = dlopen(fileEntry.c_str(), RTLD_NOW | RTLD_GLOBAL); - if (handleAbilityLib == nullptr) { - HILOG_ERROR("%{public}s Fail to dlopen %{public}s, [%{public}s]", - __func__, fileEntry.c_str(), dlerror()); - exit(-1); - } - HILOG_INFO("%{public}s Success to dlopen %{public}s", __func__, fileEntry.c_str()); - handleAbilityLib_.emplace_back(handleAbilityLib); - } - } -#endif -} - void MainThread::ChangeToLocalPath(const std::string &bundleName, const std::vector &sourceDirs, std::vector &localPath) { @@ -1803,7 +1758,6 @@ void MainThread::CloseAbilityLibrary() } handleAbilityLib_.clear(); fileEntries_.clear(); - nativeFileEntries_.clear(); } bool MainThread::ScanDir(const std::string &dirPath, std::vector &files) diff --git a/frameworks/kits/appkit/native/test/BUILD.gn b/frameworks/kits/appkit/native/test/BUILD.gn index 4fe52306da..dcd8e8a19f 100644 --- a/frameworks/kits/appkit/native/test/BUILD.gn +++ b/frameworks/kits/appkit/native/test/BUILD.gn @@ -15,21 +15,20 @@ import("//build/test.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") module_output_path = "ability_runtime/application_test" -ABILITY_INNERKITS_PATH = "${ability_runtime_path}/interfaces/inner_api" +ABILITY_INNERKITS_PATH = "${ability_runtime_innerkits_path}" ############################################################################### config("module_private_config") { visibility = [ ":*" ] include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime/context", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", + "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/test/mock/include", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include/task", + "${ability_runtime_kits_path}/appkit/native/test/mock/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_kits_path}/appkit/native/app/include/task", ] cflags = [] if (target_cpu == "arm") { @@ -44,16 +43,13 @@ config("module_private_config") { config("module_context_config") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/test/mock/include", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include/task", - "${ability_runtime_path}/frameworks/kits/ability/native/include", + "${ability_runtime_kits_path}/appkit/native/test/mock/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", + "${ability_runtime_kits_path}/appkit/native/app/include/task", + "${ability_runtime_kits_path}/ability/native/include", ] cflags = [] if (target_cpu == "arm") { @@ -76,20 +72,19 @@ ohos_unittest("context_deal_interface_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ - "ability_base:want", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -102,8 +97,8 @@ ohos_unittest("context_deal_interface_test") { ohos_unittest("application_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", "../app/src/ohos_application.cpp", "unittest/ability_stage_test.cpp", "unittest/application_data_manager_test.cpp", @@ -114,25 +109,24 @@ ohos_unittest("application_test") { configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", - - #"${ability_runtime_path}/frameworks/kits/appkit:appkit_native", ] external_deps = [ + "ability_base:base", "ability_base:configuration", "ability_base:want", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -141,9 +135,9 @@ ohos_unittest("application_test") { ohos_unittest("context_container_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_bundle_manager.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", "../app/src/ohos_application.cpp", "unittest/context_container_test.cpp", ] @@ -151,13 +145,11 @@ ohos_unittest("context_container_test") { configs = [ ":module_context_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -166,6 +158,8 @@ ohos_unittest("context_container_test") { "ability_base:configuration", "ability_base:want", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -174,9 +168,9 @@ ohos_unittest("context_container_test") { ohos_unittest("context_deal_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_bundle_manager.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", "../app/src/ohos_application.cpp", "mock/include/mock_ability_manager_client.cpp", "unittest/context_deal_test.cpp", @@ -185,13 +179,11 @@ ohos_unittest("context_deal_test") { configs = [ ":module_context_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -201,6 +193,8 @@ ohos_unittest("context_deal_test") { "ability_base:configuration", "ability_base:want", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -209,8 +203,8 @@ ohos_unittest("context_deal_test") { ohos_unittest("application_impl_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_context.cpp", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/app_loader.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_context.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/app_loader.cpp", "../app/src/application_impl.cpp", "../app/src/ohos_application.cpp", "unittest/application_impl_test.cpp", @@ -220,14 +214,12 @@ ohos_unittest("application_impl_test") { deps = [ "${ABILITY_INNERKITS_PATH}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -236,7 +228,9 @@ ohos_unittest("application_impl_test") { "ability_base:configuration", "ability_base:want", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -245,10 +239,9 @@ ohos_unittest("application_impl_test") { config("ability_start_setting_config") { visibility = [ ":*" ] include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", - "//foundation/appexecfwk/common/log/include/", + "${ability_runtime_kits_path}/appkit/native/app/include", "//utils/native/base/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", ] } @@ -261,12 +254,12 @@ ohos_unittest("ability_start_setting_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/src/ability_start_setting.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_start_setting.cpp", "unittest/ability_start_setting_test.cpp", ] deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/googletest:gtest_main", "//utils/native/base:utils", "//utils/native/base:utilsbase", @@ -294,7 +287,7 @@ ohos_unittest("watchdog_test") { sources = [ "unittest/watchdog_test.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/googletest:gtest_main", "//utils/native/base:utils", "//utils/native/base:utilsbase", @@ -302,6 +295,8 @@ ohos_unittest("watchdog_test") { external_deps = [ "ability_base:base", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.cpp b/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.cpp index 246852961b..414c36477f 100644 --- a/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.cpp +++ b/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.cpp @@ -97,7 +97,7 @@ int MockAbilityDelegatorStub::ReleaseAbility(const sptr &con } int MockAbilityDelegatorStub::GetMissionSnapshot(const std::string& deviceId, int32_t missionId, - MissionSnapshot& snapshot) + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } @@ -279,7 +279,7 @@ int MockAbilityDelegatorStub2::ReleaseAbility(const sptr &co } int MockAbilityDelegatorStub2::GetMissionSnapshot(const std::string& deviceId, int32_t missionId, - MissionSnapshot& snapshot) + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.h b/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.h index ed3c9a3c11..9ce596a96f 100644 --- a/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.h +++ b/frameworks/kits/appkit/native/test/mock/ability_delegator/mock_ability_delegator_stub.h @@ -125,7 +125,8 @@ public: const Want &want, const sptr &connect, const sptr &callerToken) override; virtual int ReleaseAbility(const sptr &connect, const AppExecFwk::ElementName &element) override; - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) override; + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) override; virtual int RegisterSnapshotHandler(const sptr& handler) override; virtual int SendANRProcessID(int pid) override; virtual int SetAbilityController(const sptr &abilityController, @@ -260,7 +261,8 @@ public: const Want &want, const sptr &connect, const sptr &callerToken) override; virtual int ReleaseAbility(const sptr &connect, const AppExecFwk::ElementName &element) override; - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) override; + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) override; virtual int RegisterSnapshotHandler(const sptr& handler) override; virtual int SendANRProcessID(int pid) override; virtual int SetAbilityController(const sptr &abilityController, diff --git a/frameworks/kits/appkit/native/test/mock/include/mock_ability_manager_client_interface1.cpp b/frameworks/kits/appkit/native/test/mock/include/mock_ability_manager_client_interface1.cpp index 71b2f1c306..d5e9506388 100644 --- a/frameworks/kits/appkit/native/test/mock/include/mock_ability_manager_client_interface1.cpp +++ b/frameworks/kits/appkit/native/test/mock/include/mock_ability_manager_client_interface1.cpp @@ -137,11 +137,6 @@ ErrCode AbilityManagerClient::StopServiceAbility(const Want &want, const sptr&& task) +void AsyncTask::Schedule(const std::string &name, NativeEngine& engine, std::unique_ptr&& task) { - if (task && task->Start(engine)) { + if (task && task->Start(name, engine)) { task.release(); } } @@ -203,9 +203,9 @@ void AsyncTask::Complete(NativeEngine* engine, int32_t status, void* data) } } -bool AsyncTask::Start(NativeEngine& engine) +bool AsyncTask::Start(const std::string &name, NativeEngine& engine) { - work_.reset(engine.CreateAsyncWork(Execute, Complete, this)); + work_.reset(engine.CreateAsyncWork(name, Execute, Complete, this)); return work_->Queue(); } diff --git a/frameworks/kits/test/BUILD.gn b/frameworks/kits/test/BUILD.gn index 4208a97d9d..21bb9e6f57 100644 --- a/frameworks/kits/test/BUILD.gn +++ b/frameworks/kits/test/BUILD.gn @@ -14,7 +14,7 @@ import("//build/test.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") -module_output_path = "ability_runtime/aafwk_L2" +module_output_path = "ability_runtime/test" ############################################################################### config("module_private_config") { @@ -24,21 +24,18 @@ config("module_private_config") { cflags += [ "-DBINDER_IPC_32BIT" ] } include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/json/include", - "//utils/native/base/include", - "//sdk/appexecfwk_L2/appexecfwk_base/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/services/common/include", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS", - "${ability_runtime_path}/services/common/include", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/common/include", + "${ability_runtime_kits_path}/test/mock/AMS", + "${ability_runtime_services_path}/common/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", + "${ability_runtime_kits_path}/test/mock/DemoAbility", + "${ability_runtime_services_path}/abilitymgr/include", "//third_party/jsoncpp/include", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] } @@ -46,45 +43,44 @@ ohos_moduletest("ability_moduletest") { module_out_path = module_output_path sources = [ "${ability_base_path}/frameworks/native/configuration/src/configuration.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS/mock_ability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility/demo_ability_test.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility/mock_lifecycle_observer.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_callback_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/caller_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/image_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/launch_param.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_state_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_listener_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_listener_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_snapshot.cpp", - "${ability_runtime_path}/services/abilitymgr/src/remote_mission_listener_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/remote_mission_listener_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/wants_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_bundle_manager.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/test/mock/AMS/mock_ability_manager_service.cpp", + "${ability_runtime_kits_path}/test/mock/DemoAbility/demo_ability_test.cpp", + "${ability_runtime_kits_path}/test/mock/DemoAbility/mock_lifecycle_observer.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/image_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_listener_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_listener_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_snapshot.cpp", + "${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp", "moduletest/cpp/abilitytest/ability_test.cpp", ] configs = [ ":module_private_config", "${ability_base_path}:want_public_config", - "${ability_runtime_path}/frameworks/kits/ability/native:ability_config", + "${ability_runtime_kits_path}/ability/native:ability_config", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "//base/hiviewdfx/hiview/adapter/utility:hiview_adapter_utility", @@ -98,6 +94,7 @@ ohos_moduletest("ability_moduletest") { "ability_base:base", "ability_base:want", "ability_base:zuri", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "dataability:native_dataability", "hiviewdfx_hilog_native:libhilog", @@ -115,35 +112,34 @@ ohos_moduletest("ability_moduletest") { ohos_moduletest("ability_conetxt_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS/mock_serviceability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility/demo_ability_test.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility/mock_lifecycle_observer.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_callback_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/caller_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/launch_param.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_state_info.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_bundle_manager.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/test/mock/AMS/mock_serviceability_manager_service.cpp", + "${ability_runtime_kits_path}/test/mock/DemoAbility/demo_ability_test.cpp", + "${ability_runtime_kits_path}/test/mock/DemoAbility/mock_lifecycle_observer.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp", "moduletest/cpp/abilitytest/ability_context_test.cpp", ] configs = [ ":module_private_config", "${ability_base_path}:want_public_config", - "${ability_runtime_path}/frameworks/kits/ability/native:ability_config", + "${ability_runtime_kits_path}/ability/native:ability_config", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "//third_party/googletest:gmock_main", @@ -157,6 +153,7 @@ ohos_moduletest("ability_conetxt_test") { "ability_base:configuration", "ability_base:want", "ability_base:zuri", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "dataability:native_dataability", "hiviewdfx_hilog_native:libhilog", @@ -172,19 +169,17 @@ ohos_moduletest("ability_conetxt_test") { ohos_moduletest("ability_thread_call_request_module_test") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/src/context_container.cpp", - "${ability_runtime_path}/frameworks/kits/test/moduletest/cpp/abilitytest/ability_thread_call_request_module_test.cpp", + "${ability_runtime_kits_path}/appkit/native/app/src/context_container.cpp", + "${ability_runtime_kits_path}/test/moduletest/cpp/abilitytest/ability_thread_call_request_module_test.cpp", ] configs = [ ":module_private_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", ] @@ -193,51 +188,52 @@ ohos_moduletest("ability_thread_call_request_module_test") { "ability_base:want", "ability_base:zuri", "ability_runtime:runtime", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", ] } ohos_moduletest("data_ability_operation_moduletest") { module_out_path = module_output_path sources = [ - "${ability_runtime_path}/frameworks/kits/ability/native/src/data_ability_operation.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/src/data_ability_operation_builder.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/mock_bundle_manager.cpp", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS/mock_ability_manager_client.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/AMS/mock_ability_manager_service.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility/demo_ability_test.cpp", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility/mock_lifecycle_observer.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_callback_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/caller_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_state_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_listener_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_listener_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_snapshot.cpp", - "${ability_runtime_path}/services/abilitymgr/src/remote_mission_listener_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/remote_mission_listener_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/wants_info.cpp", + "${ability_runtime_kits_path}/ability/native/src/data_ability_operation.cpp", + "${ability_runtime_kits_path}/ability/native/src/data_ability_operation_builder.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/mock_bundle_manager.cpp", + "${ability_runtime_kits_path}/ability/native/test/mock/include/sys_mgr_client_mock.cpp", + "${ability_runtime_kits_path}/test/mock/AMS/mock_ability_manager_client.cpp", + "${ability_runtime_kits_path}/test/mock/AMS/mock_ability_manager_service.cpp", + "${ability_runtime_kits_path}/test/mock/DemoAbility/demo_ability_test.cpp", + "${ability_runtime_kits_path}/test/mock/DemoAbility/mock_lifecycle_observer.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_listener_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_listener_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_snapshot.cpp", + "${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp", "moduletest/cpp/abilitytest/data_ability_operation_module_test.cpp", ] configs = [ ":module_private_config", "${ability_base_path}:want_public_config", - "${ability_runtime_path}/frameworks/kits/ability/native:ability_config", + "${ability_runtime_kits_path}/ability/native:ability_config", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "${global_path}/resource_management/frameworks/resmgr:global_resmgr", "//third_party/googletest:gmock_main", @@ -269,29 +265,26 @@ ohos_moduletest("data_ability_helper_module_test") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/frameworks/kits/test/mock/DemoAbility", - "${ability_runtime_path}/frameworks/kits/test/mock/DemoObServer", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "${ability_runtime_path}/services/dataobsmgr/include", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", + "${ability_runtime_kits_path}/test/mock/DemoAbility", + "${ability_runtime_kits_path}/test/mock/DemoObServer", + "${ability_runtime_kits_path}/ability/native/test/mock/include", + "${ability_runtime_services_path}/dataobsmgr/include", + "${ability_runtime_innerkits_path}/dataobs_manager/include", "${distributedschedule_path}/samgr/services/samgr/native/include", - "//foundation/communication/ipc/interfaces/innerkits/libdbinder/include", ] - sources = [ "${ability_runtime_path}/frameworks/kits/test/moduletest/cpp/abilitytest/data_ability_helper_module_test.cpp" ] + sources = [ "${ability_runtime_kits_path}/test/moduletest/cpp/abilitytest/data_ability_helper_module_test.cpp" ] configs = [ ":module_private_config", "${ability_base_path}:want_public_config", - "${ability_runtime_path}/frameworks/kits/ability/native:ability_config", + "${ability_runtime_kits_path}/ability/native:ability_config", ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] @@ -300,7 +293,9 @@ ohos_moduletest("data_ability_helper_module_test") { "ability_base:base", "ability_base:want", "ability_base:zuri", + "bundle_framework:appexecfwk_base", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/frameworks/kits/test/mock/AMS/mock_ability_manager_service.h b/frameworks/kits/test/mock/AMS/mock_ability_manager_service.h index d43670b407..dd4313dc9b 100644 --- a/frameworks/kits/test/mock/AMS/mock_ability_manager_service.h +++ b/frameworks/kits/test/mock/AMS/mock_ability_manager_service.h @@ -176,7 +176,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/frameworks/kits/test/mock/AMS/mock_serviceability_manager_service.h b/frameworks/kits/test/mock/AMS/mock_serviceability_manager_service.h index c8dbe185ed..8d8e905aef 100644 --- a/frameworks/kits/test/mock/AMS/mock_serviceability_manager_service.h +++ b/frameworks/kits/test/mock/AMS/mock_serviceability_manager_service.h @@ -188,7 +188,8 @@ public: return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/frameworks/kits/wantagent/BUILD.gn b/frameworks/kits/wantagent/BUILD.gn index 71b378d5dd..b5c1fced0a 100644 --- a/frameworks/kits/wantagent/BUILD.gn +++ b/frameworks/kits/wantagent/BUILD.gn @@ -63,11 +63,9 @@ ohos_shared_library("wantagent_innerkits") { "ability_runtime:ability_manager", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", - "common_event_service:cesfwk_core", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "resource_management:global_resmgr", "samgr_standard:samgr_proxy", "utils_base:utils", ] diff --git a/frameworks/kits/wantagent/test/unittest/completed_dispatcher_test/BUILD.gn b/frameworks/kits/wantagent/test/unittest/completed_dispatcher_test/BUILD.gn index 0504bd86e5..b051db8d43 100644 --- a/frameworks/kits/wantagent/test/unittest/completed_dispatcher_test/BUILD.gn +++ b/frameworks/kits/wantagent/test/unittest/completed_dispatcher_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ans_standard/wantagent" ohos_unittest("completed_dispatcher_test") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/abilitymgr/include" ] + include_dirs = [ "${ability_runtime_services_path}/abilitymgr/include" ] sources = [ "completed_dispatcher_test.cpp" ] @@ -29,9 +29,9 @@ ohos_unittest("completed_dispatcher_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", diff --git a/frameworks/kits/wantagent/test/unittest/pending_want_test/BUILD.gn b/frameworks/kits/wantagent/test/unittest/pending_want_test/BUILD.gn index 3a7c88c355..60a1b9359e 100644 --- a/frameworks/kits/wantagent/test/unittest/pending_want_test/BUILD.gn +++ b/frameworks/kits/wantagent/test/unittest/pending_want_test/BUILD.gn @@ -20,11 +20,9 @@ module_output_path = "ans_standard/wantagent" ohos_unittest("pending_want_test") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime/context/", - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime", - "${ability_runtime_path}/services/abilitymgr/include", - "//foundation/distributedschedule/samgr/adapter/interfaces/innerkits/include/", - "//utils/native/base/include", + "${ability_runtime_kits_path}/appkit/native/ability_runtime/context/", + "${ability_runtime_kits_path}/appkit/native/ability_runtime", + "${ability_runtime_services_path}/abilitymgr/include", ] sources = [ "pending_want_test.cpp" ] @@ -35,10 +33,10 @@ ohos_unittest("pending_want_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", diff --git a/frameworks/kits/wantagent/test/unittest/trigger_Info_test/BUILD.gn b/frameworks/kits/wantagent/test/unittest/trigger_Info_test/BUILD.gn index b3d799b4ff..c9c7aae6b3 100644 --- a/frameworks/kits/wantagent/test/unittest/trigger_Info_test/BUILD.gn +++ b/frameworks/kits/wantagent/test/unittest/trigger_Info_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ans_standard/wantagent" ohos_unittest("trigger_Info_test") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/abilitymgr/include" ] + include_dirs = [ "${ability_runtime_services_path}/abilitymgr/include" ] sources = [ "trigger_Info_test.cpp" ] @@ -29,9 +29,9 @@ ohos_unittest("trigger_Info_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", diff --git a/frameworks/kits/wantagent/test/unittest/want_agent_helper_test/BUILD.gn b/frameworks/kits/wantagent/test/unittest/want_agent_helper_test/BUILD.gn index 14dbd53bfc..b71a380f7f 100644 --- a/frameworks/kits/wantagent/test/unittest/want_agent_helper_test/BUILD.gn +++ b/frameworks/kits/wantagent/test/unittest/want_agent_helper_test/BUILD.gn @@ -20,9 +20,9 @@ module_output_path = "ans_standard/wantagent" ohos_unittest("want_agent_helper_test") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime/context/", - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_kits_path}/appkit/native/ability_runtime/context/", + "${ability_runtime_kits_path}/appkit/native/ability_runtime", + "${ability_runtime_services_path}/abilitymgr/include", ] sources = [ "want_agent_helper_test.cpp" ] @@ -33,10 +33,10 @@ ohos_unittest("want_agent_helper_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", diff --git a/frameworks/kits/wantagent/test/unittest/want_agent_info_test/BUILD.gn b/frameworks/kits/wantagent/test/unittest/want_agent_info_test/BUILD.gn index 200f530308..1d11545b8b 100644 --- a/frameworks/kits/wantagent/test/unittest/want_agent_info_test/BUILD.gn +++ b/frameworks/kits/wantagent/test/unittest/want_agent_info_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ans_standard/wantagent" ohos_unittest("want_agent_info_test") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/abilitymgr/include" ] + include_dirs = [ "${ability_runtime_services_path}/abilitymgr/include" ] sources = [ "want_agent_info_test.cpp" ] @@ -29,9 +29,9 @@ ohos_unittest("want_agent_info_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", diff --git a/frameworks/kits/wantagent/test/unittest/want_agent_test/BUILD.gn b/frameworks/kits/wantagent/test/unittest/want_agent_test/BUILD.gn index 927faaa7e3..892a3a1d82 100644 --- a/frameworks/kits/wantagent/test/unittest/want_agent_test/BUILD.gn +++ b/frameworks/kits/wantagent/test/unittest/want_agent_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ans_standard/wantagent" ohos_unittest("want_agent_test") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/abilitymgr/include" ] + include_dirs = [ "${ability_runtime_services_path}/abilitymgr/include" ] sources = [ "want_agent_test.cpp" ] @@ -29,9 +29,9 @@ ohos_unittest("want_agent_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", diff --git a/interfaces/inner_api/ability_manager/BUILD.gn b/interfaces/inner_api/ability_manager/BUILD.gn index e8097be31d..3b51540bd6 100644 --- a/interfaces/inner_api/ability_manager/BUILD.gn +++ b/interfaces/inner_api/ability_manager/BUILD.gn @@ -23,15 +23,11 @@ config("ability_manager_public_config") { "${ability_base_innerapi_path}/uri/include", "//third_party/jsoncpp/include", "${ability_base_innerapi_path}/want/include", - "//utils/native/base/include", "${ability_runtime_kits_path}/ability/native/include", "${bundlefwk_inner_api_path}/appexecfwk_base/include", "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", "${ability_runtime_innerkits_path}/app_manager/include/appmgr", "${ability_runtime_kits_path}/appkit/native/app/include", - "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb/include", - "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/appdatafwk/include", - "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability/include", "${ability_runtime_innerkits_path}/dataobs_manager/include", ] @@ -109,7 +105,6 @@ ohos_shared_library("ability_manager") { "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "relational_store:native_appdatafwk", "relational_store:native_rdb", "samgr_standard:samgr_proxy", "utils_base:utils", diff --git a/interfaces/inner_api/ability_manager/include/ability_manager_client.h b/interfaces/inner_api/ability_manager/include/ability_manager_client.h index 0975a24223..163951b60b 100644 --- a/interfaces/inner_api/ability_manager/include/ability_manager_client.h +++ b/interfaces/inner_api/ability_manager/include/ability_manager_client.h @@ -311,14 +311,6 @@ public: */ ErrCode StopServiceAbility(const Want &want); - /** - * Get mission snapshot by mission id - * - * @param missionId the id of the mission to retrieve the sAutoapshots - * @return Returns ERR_OK on success, others on failure. - */ - ErrCode GetMissionSnapshot(const int32_t missionId, MissionSnapshot &missionSnapshot); - /** * Kill the process immediately. * @@ -376,7 +368,7 @@ public: * @param SystemMemoryAttr, memory information. */ void GetSystemMemoryAttr(AppExecFwk::SystemMemoryAttr &memoryInfo); - + ErrCode GetAppMemorySize(); bool IsRamConstrainedDevice(); @@ -502,10 +494,12 @@ public: * @brief Get the Mission Snapshot Info object * @param deviceId local or remote deviceid. * @param missionId Id of target mission. - * @param snapshot snapshot of target mission + * @param snapshot snapshot of target mission. + * @param isLowResolution get low resolution snapshot. * @return Returns ERR_OK on success, others on failure. */ - ErrCode GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot); + ErrCode GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution = false); /** * @brief Clean mission by id. diff --git a/interfaces/inner_api/ability_manager/include/ability_manager_errors.h b/interfaces/inner_api/ability_manager/include/ability_manager_errors.h index 08363cf48e..35a4129579 100644 --- a/interfaces/inner_api/ability_manager/include/ability_manager_errors.h +++ b/interfaces/inner_api/ability_manager/include/ability_manager_errors.h @@ -120,9 +120,9 @@ enum { */ TERMINATE_SERVICE_IS_CONNECTED, /** - * Result(2097172) for StartAbility:The ability to start is already activing.. + * Result(2097172) for StartAbility:The ability to start is already activating.. */ - START_SERVICE_ABILITY_ACTIVING, + START_SERVICE_ABILITY_ACTIVATING, /** * Result(2097173) for move mission to top: An error of moving stack. */ @@ -165,7 +165,7 @@ enum { GET_BUNDLENAME_BY_UID_FAIL, /** - * Result(2097182) for misson not found. + * Result(2097182) for mission not found. */ MISSION_NOT_FOUND, diff --git a/interfaces/inner_api/ability_manager/include/ability_manager_interface.h b/interfaces/inner_api/ability_manager/include/ability_manager_interface.h index d8afc9645b..ae76d6be01 100644 --- a/interfaces/inner_api/ability_manager/include/ability_manager_interface.h +++ b/interfaces/inner_api/ability_manager/include/ability_manager_interface.h @@ -438,7 +438,8 @@ public: virtual int GetMissionInfo(const std::string &deviceId, int32_t missionId, MissionInfo &missionInfo) = 0; - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) = 0; + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) = 0; virtual int CleanMission(int32_t missionId) = 0; diff --git a/interfaces/inner_api/ability_manager/include/window_manager_service_handler.h b/interfaces/inner_api/ability_manager/include/window_manager_service_handler.h index 0a845e6af1..4160396a29 100644 --- a/interfaces/inner_api/ability_manager/include/window_manager_service_handler.h +++ b/interfaces/inner_api/ability_manager/include/window_manager_service_handler.h @@ -55,7 +55,7 @@ public: ON_HOT_STARTING_WINDOW, // ipc id for CancelStartingWindow - ON_CANCLE_STARTING_WINDOW, + ON_CANCEL_STARTING_WINDOW, }; }; } // namespace AAFwk diff --git a/interfaces/inner_api/ability_manager/src/window_manager_service_handler_proxy.cpp b/interfaces/inner_api/ability_manager/src/window_manager_service_handler_proxy.cpp index d2dcc8da27..54e6e75044 100644 --- a/interfaces/inner_api/ability_manager/src/window_manager_service_handler_proxy.cpp +++ b/interfaces/inner_api/ability_manager/src/window_manager_service_handler_proxy.cpp @@ -151,7 +151,7 @@ void WindowManagerServiceHandlerProxy::CancelStartingWindow(sptr } MessageParcel reply; MessageOption option(MessageOption::TF_ASYNC); - int error = Remote()->SendRequest(WMSCmd::ON_CANCLE_STARTING_WINDOW, data, reply, option); + int error = Remote()->SendRequest(WMSCmd::ON_CANCEL_STARTING_WINDOW, data, reply, option); if (error != ERR_OK) { HILOG_ERROR("SendRequest fail, error: %{public}d", error); } diff --git a/interfaces/inner_api/ability_manager/src/window_manager_service_handler_stub.cpp b/interfaces/inner_api/ability_manager/src/window_manager_service_handler_stub.cpp index 35323ff7fb..7659e2fc50 100644 --- a/interfaces/inner_api/ability_manager/src/window_manager_service_handler_stub.cpp +++ b/interfaces/inner_api/ability_manager/src/window_manager_service_handler_stub.cpp @@ -37,7 +37,7 @@ void WindowManagerServiceHandlerStub::Init() requestFuncMap_[ON_GET_FOCUS_ABILITY] = &WindowManagerServiceHandlerStub::GetFocusWindowInner; requestFuncMap_[ON_COLD_STARTING_WINDOW] = &WindowManagerServiceHandlerStub::StartingWindowCold; requestFuncMap_[ON_HOT_STARTING_WINDOW] = &WindowManagerServiceHandlerStub::StartingWindowHot; - requestFuncMap_[ON_CANCLE_STARTING_WINDOW] = &WindowManagerServiceHandlerStub::CancelStartingWindowInner; + requestFuncMap_[ON_CANCEL_STARTING_WINDOW] = &WindowManagerServiceHandlerStub::CancelStartingWindowInner; } int WindowManagerServiceHandlerStub::OnRemoteRequest( diff --git a/interfaces/inner_api/app_manager/BUILD.gn b/interfaces/inner_api/app_manager/BUILD.gn index a8d6b405e7..58226b051b 100644 --- a/interfaces/inner_api/app_manager/BUILD.gn +++ b/interfaces/inner_api/app_manager/BUILD.gn @@ -35,8 +35,8 @@ config("appmgr_core_config") { ohos_shared_library("app_manager") { include_dirs = [ "//third_party/json/include", - "${ability_runtime_path}/services/appmgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/appmgr/include", + "${ability_runtime_services_path}/common/include", ] sources = [ @@ -94,8 +94,6 @@ ohos_shared_library("app_manager") { "ability_base:configuration", "ability_base:want", "bundle_framework:appexecfwk_base", - "common_event_service:cesfwk_core", - "common_event_service:cesfwk_innerkits", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h index aa6476c07c..a237f59c24 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h +++ b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_interface.h @@ -50,7 +50,7 @@ public: * TerminateAbility, call TerminateAbility() through the proxy object, terminate the token ability. * * @param token, token, he unique identification to terminate the ability. - * @param clearMissionFlag, indicates whether terminate the ability when clearMision. + * @param clearMissionFlag, indicates whether terminate the ability when clearMission. * @return */ virtual void TerminateAbility(const sptr &token, bool clearMissionFlag) = 0; diff --git a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h index 3ac75a6c4d..8c21228a14 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h +++ b/interfaces/inner_api/app_manager/include/appmgr/ams_mgr_proxy.h @@ -44,7 +44,7 @@ public: * TerminateAbility, call TerminateAbility() through the proxy object, terminate the token ability. * * @param token, token, he unique identification to terminate the ability. - * @param clearMissionFlag, indicates whether terminate the ability when clearMision. + * @param clearMissionFlag, indicates whether terminate the ability when clearMission. * @return */ virtual void TerminateAbility(const sptr &token, bool clearMissionFlag) override; diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_launch_data.h b/interfaces/inner_api/app_manager/include/appmgr/app_launch_data.h index 48b9e53844..84ed0bb854 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_launch_data.h +++ b/interfaces/inner_api/app_manager/include/appmgr/app_launch_data.h @@ -145,26 +145,6 @@ public: return userTestRecord_; } - /** - * Save native application tag. - * - * @param isNativeApplication Indicates whether it is a native application. - */ - inline void SetNativeApplicatonTag(bool isNativeApplication) - { - isNativeApplication_ = isNativeApplication; - } - - /** - * Get native application tag. - * - * @return native application tag. - */ - inline bool IsNativeApplication() const - { - return isNativeApplication_; - } - /** * @brief read this Sequenceable object from a Parcel. * @@ -194,7 +174,6 @@ private: int32_t recordId_ = 0; int32_t uId_ = 0; std::shared_ptr userTestRecord_ = nullptr; - bool isNativeApplication_ = false; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h b/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h index a39ffd81fa..f5ea685c15 100644 --- a/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h +++ b/interfaces/inner_api/app_manager/include/appmgr/app_mgr_client.h @@ -48,7 +48,7 @@ public: * Terminate ability. * * @param token Ability identify. - * @param clearMissionFlag, indicates whether terminate the ability when clearMision. + * @param clearMissionFlag, indicates whether terminate the ability when clearMission. * @return Returns RESULT_OK on success, others on failure. */ virtual AppMgrResultCode TerminateAbility(const sptr &token, bool clearMissionFlag); diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_launch_data.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_launch_data.cpp index 465d65c64f..611a048e69 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/app_launch_data.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/app_launch_data.cpp @@ -78,11 +78,6 @@ bool AppLaunchData::Marshalling(Parcel &parcel) const return false; } } - - if (!parcel.WriteBool(isNativeApplication_)) { - HILOG_ERROR("Failed to write isNativeApplication_"); - return false; - } return true; } @@ -120,8 +115,6 @@ bool AppLaunchData::ReadFromParcel(Parcel &parcel) return false; } } - - isNativeApplication_ = parcel.ReadBool(); return true; } diff --git a/interfaces/inner_api/dataobs_manager/BUILD.gn b/interfaces/inner_api/dataobs_manager/BUILD.gn index 9ba3a4ad30..7db6903402 100644 --- a/interfaces/inner_api/dataobs_manager/BUILD.gn +++ b/interfaces/inner_api/dataobs_manager/BUILD.gn @@ -18,8 +18,6 @@ config("dataobs_manager_public_config") { visibility = [ ":*" ] include_dirs = [ "include/", - "//base/notification/eventhandler/interfaces/inner_api", - "//utils/native/base/include", "//utils/system/safwk/native/include", "${ability_runtime_kits_path}/ability/native/include", "${ability_runtime_services_path}/dataobsmgr/include", diff --git a/interfaces/inner_api/runtime/include/js_runtime_utils.h b/interfaces/inner_api/runtime/include/js_runtime_utils.h index 421f454556..7d89a5c544 100644 --- a/interfaces/inner_api/runtime/include/js_runtime_utils.h +++ b/interfaces/inner_api/runtime/include/js_runtime_utils.h @@ -147,7 +147,7 @@ public: using ExecuteCallback = std::function; using CompleteCallback = std::function; - static void Schedule(NativeEngine& engine, std::unique_ptr&& task); + static void Schedule(const std::string &name, NativeEngine& engine, std::unique_ptr&& task); AsyncTask(NativeDeferred* deferred, std::unique_ptr&& execute, std::unique_ptr&& complete); @@ -162,7 +162,7 @@ private: static void Execute(NativeEngine* engine, void* data); static void Complete(NativeEngine* engine, int32_t status, void* data); - bool Start(NativeEngine& engine); + bool Start(const std::string &name, NativeEngine& engine); std::unique_ptr deferred_; std::unique_ptr callbackRef_; diff --git a/services/abilitymgr/BUILD.gn b/services/abilitymgr/BUILD.gn index 0fc4d6a3ee..494dc239d8 100644 --- a/services/abilitymgr/BUILD.gn +++ b/services/abilitymgr/BUILD.gn @@ -33,7 +33,6 @@ config("abilityms_config") { "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", "${ability_runtime_services_path}/common/include", - "//utils/native/base/include", "//prebuilts/jdk/jdk8/linux-x86/include", "//prebuilts/jdk/jdk8/linux-x86/include/linux", "//third_party/json/include", @@ -47,10 +46,9 @@ config("abilityms_config") { "//base/account/os_account/frameworks/common/account_error/include", "//base/account/os_account/frameworks/common/database/include", "//base/account/os_account/interfaces/innerkits/osaccount/native/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include", - "${ability_runtime_path}/interfaces/inner_api/wantagent/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime", + "${ability_runtime_innerkits_path}/wantagent/include", + "${ability_runtime_kits_path}ive/ability_runtime", "${bgtaskmgr_interfaces_path}/innerkits/include", "${bgtaskmgr_frameworks_path}/common/include", "${bgtaskmgr_frameworks_path}/include", @@ -105,7 +103,6 @@ ohos_shared_library("abilityms") { "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", - "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", "eventhandler:libeventhandler", @@ -115,7 +112,6 @@ ohos_shared_library("abilityms") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_rdb", - "resource_management:global_resmgr", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "startup_l2:syspara", diff --git a/services/abilitymgr/include/ability_manager_proxy.h b/services/abilitymgr/include/ability_manager_proxy.h index a8aa20db39..c928a75b07 100644 --- a/services/abilitymgr/include/ability_manager_proxy.h +++ b/services/abilitymgr/include/ability_manager_proxy.h @@ -474,7 +474,8 @@ public: virtual int RegisterSnapshotHandler(const sptr& handler) override; - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) override; + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) override; virtual int StartUserTest(const Want &want, const sptr &observer) override; diff --git a/services/abilitymgr/include/ability_manager_service.h b/services/abilitymgr/include/ability_manager_service.h index eb3290cf10..679ce9d134 100644 --- a/services/abilitymgr/include/ability_manager_service.h +++ b/services/abilitymgr/include/ability_manager_service.h @@ -628,7 +628,7 @@ public: virtual int RegisterSnapshotHandler(const sptr& handler) override; virtual int32_t GetMissionSnapshot(const std::string& deviceId, int32_t missionId, - MissionSnapshot& snapshot) override; + MissionSnapshot& snapshot, bool isLowResolution) override; /** * Set ability controller. @@ -952,7 +952,7 @@ private: const std::string &args, std::vector &info, bool isClient, bool isUserID, int userId); ErrCode ProcessMultiParam(std::vector &argsStr, std::string &result); void ShowHelp(std::string &result); - void ShowIllealInfomation(std::string &result); + void ShowIllegalInfomation(std::string &result); void InitConnectManager(int32_t userId, bool switchUser); void InitDataAbilityManager(int32_t userId, bool switchUser); diff --git a/services/abilitymgr/include/ability_record.h b/services/abilitymgr/include/ability_record.h index eaf223bfdf..1d71de7524 100644 --- a/services/abilitymgr/include/ability_record.h +++ b/services/abilitymgr/include/ability_record.h @@ -902,7 +902,7 @@ private: bool clearMissionFlag_ = false; int32_t restartCount_ = -1; - int32_t restratMax_ = -1; + int32_t restartMax_ = -1; std::string specifiedFlag_; std::mutex lock_; mutable std::mutex dumpInfoLock_; diff --git a/services/abilitymgr/include/app_scheduler.h b/services/abilitymgr/include/app_scheduler.h index 11a82f7573..e83e5a4e33 100644 --- a/services/abilitymgr/include/app_scheduler.h +++ b/services/abilitymgr/include/app_scheduler.h @@ -124,17 +124,17 @@ public: * terminate ability with token. * * @param token, the token of ability. - * @param clearMissionFlag, indicates whether terminate the ability when clearMision. + * @param clearMissionFlag, indicates whether terminate the ability when clearMission. * @return true on success ,false on failure. */ int TerminateAbility(const sptr &token, bool clearMissionFlag); /** - * move ability to forground. + * move ability to foreground. * * @param token, the token of ability. */ - void MoveToForground(const sptr &token); + void MoveToForeground(const sptr &token); /** * move ability to background. diff --git a/services/abilitymgr/include/mission_data_storage.h b/services/abilitymgr/include/mission_data_storage.h index af9f5cab32..fafd66ab48 100644 --- a/services/abilitymgr/include/mission_data_storage.h +++ b/services/abilitymgr/include/mission_data_storage.h @@ -29,8 +29,12 @@ namespace AAFwk { const std::string TASK_DATA_FILE_BASE_PATH = "/data/service/el1/public/AbilityManagerService"; const std::string MISSION_DATA_FILE_PATH = "MissionInfo"; const std::string MISSION_JSON_FILE_PREFIX = "mission"; +const std::string LOW_RESOLUTION_FLAG = "little"; const std::string JSON_FILE_SUFFIX = ".json"; const std::string PNG_FILE_SUFFIX = ".png"; +const std::string FILE_SEPARATOR = "/"; +const std::string UNDERLINE_SEPARATOR = "_"; +const int32_t SCALE = 2; class MissionDataStorage : public std::enable_shared_from_this { public: @@ -73,25 +77,31 @@ public: /** * @brief Get the Mission Snapshot object - * @param missionId - * @param missionSnapshot + * @param missionId id of mission. + * @param missionSnapshot snapshot of target mission id. + * @param isLowResolution low resolution. * @return Returns true if this function is successfully called; returns false otherwise. */ - bool GetMissionSnapshot(int32_t missionId, MissionSnapshot& missionSnapshot); + bool GetMissionSnapshot(int32_t missionId, MissionSnapshot& missionSnapshot, bool isLowResolution); #ifdef SUPPORT_GRAPHICS -public: + /** + * Get low resoultion pixelmap of source. + * + * @param source source pixelmap. + * @return return reduced pixel map. + */ + static std::shared_ptr GetReducedPixelMap( + const std::shared_ptr& source); + /** * @brief Get the Snapshot object * @param missionId Indicates this mission id. * @return Returns PixelMap of snapshot. */ - sptr GetSnapshot(int missionId) const; - - std::unique_ptr GetPixelMap(int missionId) const; + sptr GetSnapshot(int missionId, bool isLowResolution = false) const; -private: - std::map> cachedPixelMap_; + std::unique_ptr GetPixelMap(int missionId, bool isLowResolution) const; #endif private: @@ -99,10 +109,11 @@ private: std::string GetMissionDataFilePath(int missionId); - std::string GetMissionSnapshotPath(int32_t missionId) const; + std::string GetMissionSnapshotPath(int32_t missionId, bool isLowResolution) const; bool CheckFileNameValid(const std::string &fileName); +#ifdef SUPPORT_GRAPHICS bool WriteToPng(const char* fileName, uint32_t width, uint32_t height, const uint8_t* data); bool GetCachedSnapshot(int32_t missionId, MissionSnapshot& missionSnapshot); @@ -110,13 +121,20 @@ private: bool SaveCachedSnapshot(int32_t missionId, const MissionSnapshot& missionSnapshot); bool DeleteCachedSnapshot(int32_t missionId); + void DeleteMissionSnapshot(int32_t missionId, bool isLowResolution); void SaveSnapshotFile(int32_t missionId, const MissionSnapshot& missionSnapshot); + void SaveSnapshotFile(int32_t missionId, const std::shared_ptr& snapshot, + bool isPrivate, bool isLowResolution); + + std::map> cachedPixelMap_; +#endif + int userId_ = 0; std::shared_ptr handler_; std::mutex cachedPixelMapMutex_; }; } // namespace AAFwk } // namespace OHOS -#endif // FOUNDATION_AAFWK_SERVICES_ABILITYMGR_INCLUDE_MISSION_DATA_STORAGE_H +#endif // FOUNDATION_AAFWK_SERVICES_ABILITYMGR_INCLUDE_MISSION_DATA_STORAGE_H \ No newline at end of file diff --git a/services/abilitymgr/include/mission_info_mgr.h b/services/abilitymgr/include/mission_info_mgr.h index dd18bee70e..3a2c6b0039 100644 --- a/services/abilitymgr/include/mission_info_mgr.h +++ b/services/abilitymgr/include/mission_info_mgr.h @@ -36,10 +36,10 @@ class MissionInfoMgr : public std::enable_shared_from_this { public: /** * @brief generate mission id of mission info object. - * @param misisonId Indicates the missionInfo object of user to operate. + * @param missionId Indicates the missionInfo object of user to operate. * @return Returns true if the missionId is successfully generated; returns false otherwise. */ - bool GenerateMissionId(int32_t &misisonId); + bool GenerateMissionId(int32_t &missionId); /** * @brief initialization of mission info manager. @@ -137,10 +137,11 @@ public: * @param missionId mission id * @param abilityToken abilityToken to get current mission snapshot * @param missionSnapshot result of snapshot + * @param isLowResolution low resolution snapshot. * @return return true if update mission snapshot success, else false */ bool UpdateMissionSnapshot(int32_t missionId, const sptr& abilityToken, - MissionSnapshot& missionSnapshot) const; + MissionSnapshot& missionSnapshot, bool isLowResolution = false) const; #ifdef SUPPORT_GRAPHICS /** @@ -156,11 +157,12 @@ public: * @param missionId mission id * @param abilityToken abilityToken to get current mission snapshot * @param missionSnapshot result of snapshot + # @param isLowResolution low resolution. * @param force force get snapshot from window manager service. * @return true return true if get mission snapshot success, else false */ bool GetMissionSnapshot(int32_t missionId, const sptr& abilityToken, - MissionSnapshot& missionSnapshot, bool force = false) const; + MissionSnapshot& missionSnapshot, bool isLowResolution, bool force = false) const; /** * @brief register snapshotHandler @@ -179,8 +181,8 @@ private: void GetMatchedMission(const std::string &bundleName, int32_t uid, std::list &missions); private: - int32_t currentMisionId_ = MIN_MISSION_ID; - std::unordered_map missionIdMap_; // key:distributed misisonid, vaule: has been saved + int32_t currentMissionId_ = MIN_MISSION_ID; + std::unordered_map missionIdMap_; // key:distributed missionid, vaule: has been saved std::list missionInfoList_; std::shared_ptr taskDataPersistenceMgr_; sptr snapshotHandler_; diff --git a/services/abilitymgr/include/mission_list_manager.h b/services/abilitymgr/include/mission_list_manager.h index 9899f97450..390a1c3e63 100644 --- a/services/abilitymgr/include/mission_list_manager.h +++ b/services/abilitymgr/include/mission_list_manager.h @@ -93,23 +93,23 @@ public: int AttachAbilityThread(const sptr &scheduler, const sptr &token); /** - * push waitting ability to queue. + * push waiting ability to queue. * * @param abilityRequest, the request of ability. */ - void EnqueueWaittingAbility(const AbilityRequest &abilityRequest); + void EnqueueWaitingAbility(const AbilityRequest &abilityRequest); /** - * push front waitting ability to queue. + * push front waiting ability to queue. * * @param abilityRequest, the request of ability. */ - void EnqueueWaittingAbilityToFront(const AbilityRequest &abilityRequest); + void EnqueueWaitingAbilityToFront(const AbilityRequest &abilityRequest); /** - * start waitting ability. + * start waiting ability. */ - void StartWaittingAbility(); + void StartWaitingAbility(); /** * @brief Get the Ability Record By Token object @@ -230,9 +230,9 @@ public: void OnAbilityDied(std::shared_ptr abilityRecord, int32_t currentUserId); /** - * @brief handle when call contection died + * @brief handle when call connection died * - * @param callRecord the died call contection + * @param callRecord the died call connection */ void OnCallConnectDied(const std::shared_ptr &callRecord); @@ -293,7 +293,7 @@ public: void OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want); /** - * resolve the call ipc of ability for schudeling oncall. + * resolve the call ipc of ability for scheduling oncall. * * @param abilityRequest, target ability request. */ @@ -317,10 +317,11 @@ public: * @param missionId mission id * @param abilityToken abilityToken to get current mission snapshot * @param missionSnapshot result of snapshot + * @param isLowResolution low resolution. * @return Returns true on success, false on failure. */ bool GetMissionSnapshot(int32_t missionId, const sptr& abilityToken, - MissionSnapshot& missionSnapshot); + MissionSnapshot& missionSnapshot, bool isLowResolution); void GetAbilityRunningInfos(std::vector &info, bool isPerm); #ifdef ABILITY_COMMAND_FOR_TEST @@ -330,7 +331,7 @@ public: * @param abilityRecordId The Ability Record Id. * @return Returns ERR_OK on success, others on failure. */ - int BlockAbility(int abilityReocrdId); + int BlockAbility(int abilityRecordId); #endif void UninstallApp(const std::string &bundleName, int32_t uid); @@ -348,7 +349,7 @@ public: * * @param abilityToken target ability token. * @param label target label. - * @return Retun 0 if success. + * @return Return 0 if success. */ int SetMissionLabel(const sptr &abilityToken, const std::string &label); @@ -357,7 +358,7 @@ public: * * @param token target ability token. * @param icon target label. - * @return Retun 0 if success. + * @return Return 0 if success. */ int SetMissionIcon(const sptr &token, const std::shared_ptr &icon); @@ -407,7 +408,7 @@ private: const std::shared_ptr &caller, int requestCode); std::shared_ptr GetTargetMissionList(int missionId, std::shared_ptr &mission); void UpdateMissionTimeStamp(const std::shared_ptr &abilityRecord); - void PostStartWaittingAbility(); + void PostStartWaitingAbility(); void HandleAbilityDied(std::shared_ptr abilityRecord); void HandleLauncherDied(std::shared_ptr ability); void HandleAbilityDiedByDefault(std::shared_ptr abilityRecord); @@ -420,7 +421,7 @@ private: // handle timeout event void HandleLoadTimeout(const std::shared_ptr &ability); - void HandleForgroundTimeout(const std::shared_ptr &ability); + void HandleForegroundTimeout(const std::shared_ptr &ability); void HandleTimeoutAndResumeAbility(const std::shared_ptr &ability); void MoveToTerminateList(const std::shared_ptr &ability); void DelayedResumeTimeout(const std::shared_ptr &callerAbility); @@ -433,7 +434,7 @@ private: int CallAbilityLocked(const AbilityRequest &abilityRequest); void UpdateMissionSnapshot(const std::shared_ptr &abilityRecord); void AddUninstallTags(const std::string &bundleName, int32_t uid); - void EraseWaittingAbility(const std::string &bundleName, int32_t uid); + void EraseWaitingAbility(const std::string &bundleName, int32_t uid); void RemoveMissionLocked(int32_t missionId); void TerminatePreviousAbility(const std::shared_ptr &abilityRecord); @@ -448,7 +449,7 @@ private: std::shared_ptr launcherList_; std::list> terminateAbilityList_; - std::queue waittingAbilityQueue_; + std::queue waitingAbilityQueue_; std::shared_ptr listenerController_; class MissionDmInitCallback : public DistributedHardware::DmInitCallback { diff --git a/services/abilitymgr/include/task_data_persistence_mgr.h b/services/abilitymgr/include/task_data_persistence_mgr.h index 437c640e47..df145af92b 100644 --- a/services/abilitymgr/include/task_data_persistence_mgr.h +++ b/services/abilitymgr/include/task_data_persistence_mgr.h @@ -88,10 +88,11 @@ public: /** * @brief Get the mission snapshot object * @param missionId id of mission - * @param missionSnapshot + * @param missionSnapshot output snapshot of mission. + * @param isLowResolution low resolution. * @return return true if update mission snapshot success, else false */ - bool GetMissionSnapshot(int missionId, MissionSnapshot& missionSnapshot); + bool GetMissionSnapshot(int missionId, MissionSnapshot& missionSnapshot, bool isLowResolution); private: std::unordered_map> missionDataStorageMgr_; diff --git a/services/abilitymgr/resource/ams_service_config.json b/services/abilitymgr/resource/ams_service_config.json index 752a8094f3..d28d6c11a6 100644 --- a/services/abilitymgr/resource/ams_service_config.json +++ b/services/abilitymgr/resource/ams_service_config.json @@ -3,7 +3,7 @@ "startup_settings_data": true, "mission_save_time" : 43200000, "root_launcher_restart_max":15, - "app_not_response_process_timeout_time" : 5000, + "app_not_response_process_timeout_time" : 1000, "ams_timeout_time" : 180, "device_type": "phone" }, diff --git a/services/abilitymgr/src/ability_connect_manager.cpp b/services/abilitymgr/src/ability_connect_manager.cpp index ec3774db2e..a18af0e8a5 100644 --- a/services/abilitymgr/src/ability_connect_manager.cpp +++ b/services/abilitymgr/src/ability_connect_manager.cpp @@ -113,8 +113,8 @@ int AbilityConnectManager::StartAbilityLocked(const AbilityRequest &abilityReque // It may have been started through connect CommandAbility(targetService); } else { - HILOG_ERROR("Target service is already activing."); - return START_SERVICE_ABILITY_ACTIVING; + HILOG_ERROR("Target service is already activating."); + return START_SERVICE_ABILITY_ACTIVATING; } sptr token = targetService->GetToken(); @@ -285,7 +285,7 @@ int AbilityConnectManager::ConnectAbilityLocked(const AbilityRequest &abilityReq ConnectAbility(targetService); } } else { - HILOG_ERROR("Target service is already activing."); + HILOG_ERROR("Target service is already activating."); } auto token = targetService->GetToken(); @@ -327,7 +327,7 @@ int AbilityConnectManager::DisconnectAbilityLocked(const sptrHandleDisconnectTask(connectRecordList); @@ -363,15 +363,15 @@ void AbilityConnectManager::OnAbilityRequestDone(const sptr &toke { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); std::lock_guard guard(Lock_); - auto abilitState = DelayedSingleton::GetInstance()->ConvertToAppAbilityState(state); + auto abilityState = DelayedSingleton::GetInstance()->ConvertToAppAbilityState(state); auto abilityRecord = GetServiceRecordByToken(token); CHECK_POINTER(abilityRecord); std::string element = abilityRecord->GetWant().GetElement().GetURI(); HILOG_INFO("Ability: %{public}s", element.c_str()); - if (abilitState == AppAbilityState::ABILITY_STATE_FOREGROUND) { + if (abilityState == AppAbilityState::ABILITY_STATE_FOREGROUND) { abilityRecord->Inactivate(); - } else if (abilitState == AppAbilityState::ABILITY_STATE_BACKGROUND) { + } else if (abilityState == AppAbilityState::ABILITY_STATE_BACKGROUND) { DelayedSingleton::GetInstance()->TerminateAbility(token, false); RemoveServiceAbility(abilityRecord); } @@ -1049,8 +1049,8 @@ bool AbilityConnectManager::IsAbilityNeedRestart(const std::shared_ptrGetAbilityInfo().name == mainElemen || + auto findKeepAliveAbility = [abilityRecord](const std::string &mainElement) { + return (abilityRecord->GetAbilityInfo().name == mainElement || abilityRecord->GetAbilityInfo().name == AbilityConfig::SYSTEM_UI_ABILITY_NAME || abilityRecord->GetAbilityInfo().name == AbilityConfig::LAUNCHER_ABILITY_NAME); }; diff --git a/services/abilitymgr/src/ability_manager_client.cpp b/services/abilitymgr/src/ability_manager_client.cpp index 40e6b1d7f2..9a9dc6ffbd 100644 --- a/services/abilitymgr/src/ability_manager_client.cpp +++ b/services/abilitymgr/src/ability_manager_client.cpp @@ -741,11 +741,11 @@ ErrCode AbilityManagerClient::RegisterSnapshotHandler(const sptrGetMissionSnapshot(deviceId, missionId, snapshot); + return abms->GetMissionSnapshot(deviceId, missionId, snapshot, isLowResolution); } ErrCode AbilityManagerClient::StartUserTest(const Want &want, const sptr &observer) diff --git a/services/abilitymgr/src/ability_manager_proxy.cpp b/services/abilitymgr/src/ability_manager_proxy.cpp index f2c83a6cc8..da8d4f1a1e 100644 --- a/services/abilitymgr/src/ability_manager_proxy.cpp +++ b/services/abilitymgr/src/ability_manager_proxy.cpp @@ -843,7 +843,8 @@ int AbilityManagerProxy::GetParcelableInfos(MessageParcel &reply, std::vector return NO_ERROR; } -int AbilityManagerProxy::GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) +int AbilityManagerProxy::GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { int error; MessageParcel data; @@ -861,6 +862,10 @@ int AbilityManagerProxy::GetMissionSnapshot(const std::string& deviceId, int32_t HILOG_ERROR("missionId write failed."); return ERR_INVALID_VALUE; } + if (!data.WriteBool(isLowResolution)) { + HILOG_ERROR("isLowResolution write failed."); + return ERR_INVALID_VALUE; + } error = Remote()->SendRequest(IAbilityManager::GET_MISSION_SNAPSHOT_INFO, data, reply, option); if (error != NO_ERROR) { HILOG_ERROR("Send request error: %{public}d", error); diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index 24b68f4c07..47e3a67c50 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -131,7 +131,7 @@ const std::map AbilityManagerServic std::map::value_type("-m", KEY_DUMP_MISSION), std::map::value_type("--top", KEY_DUMP_TOP_ABILITY), std::map::value_type("-t", KEY_DUMP_TOP_ABILITY), - std::map::value_type("--waitting-queue", KEY_DUMP_WAIT_QUEUE), + std::map::value_type("--waiting-queue", KEY_DUMP_WAIT_QUEUE), std::map::value_type("-w", KEY_DUMP_WAIT_QUEUE), std::map::value_type("--serv", KEY_DUMP_SERVICE), std::map::value_type("-e", KEY_DUMP_SERVICE), @@ -2750,7 +2750,7 @@ void AbilityManagerService::StartHighestPriorityAbility(bool isBoot) auto userId = GetUserId(); HILOG_DEBUG("%{public}s, QueryAbilityInfo, userId is %{public}d", __func__, userId); - /* Query the highest priority abiltiy or extension ability, and start it. usually, it is OOBE or launcher */ + /* Query the highest priority ability or extension ability, and start it. usually, it is OOBE or launcher */ Want want; want.AddEntity(HIGHEST_PRIORITY_ABILITY_ENTITY); AppExecFwk::AbilityInfo abilityInfo; @@ -2775,13 +2775,13 @@ void AbilityManagerService::StartHighestPriorityAbility(bool isBoot) Want abilityWant; // donot use 'want' here, because the entity of 'want' is not empty if (!abilityInfo.name.empty()) { - /* highest priority abiltiy */ + /* highest priority ability */ HILOG_INFO("Start the highest priority ability. bundleName: %{public}s, ability:%{public}s", abilityInfo.bundleName.c_str(), abilityInfo.name.c_str()); abilityWant.SetElementName(abilityInfo.bundleName, abilityInfo.name); } else { - /* highest priority extension abiltiy */ - HILOG_INFO("Start the highest priority entension ability. bundleName: %{public}s, ability:%{public}s", + /* highest priority extension ability */ + HILOG_INFO("Start the highest priority extension ability. bundleName: %{public}s, ability:%{public}s", extensionAbilityInfo.bundleName.c_str(), extensionAbilityInfo.name.c_str()); abilityWant.SetElementName(extensionAbilityInfo.bundleName, extensionAbilityInfo.name); } @@ -3795,7 +3795,7 @@ int AbilityManagerService::RegisterSnapshotHandler(const sptr& } int32_t AbilityManagerService::GetMissionSnapshot(const std::string& deviceId, int32_t missionId, - MissionSnapshot& missionSnapshot) + MissionSnapshot& missionSnapshot, bool isLowResolution) { if (VerifyMissionPermission() == CHECK_PERMISSION_FAILED) { HILOG_ERROR("%{public}s: Permission verification failed", __func__); @@ -3812,7 +3812,7 @@ int32_t AbilityManagerService::GetMissionSnapshot(const std::string& deviceId, i return INNER_ERR; } auto token = GetAbilityTokenByMissionId(missionId); - bool result = currentMissionListManager_->GetMissionSnapshot(missionId, token, missionSnapshot); + bool result = currentMissionListManager_->GetMissionSnapshot(missionId, token, missionSnapshot, isLowResolution); if (!result) { return INNER_ERR; } @@ -4623,10 +4623,10 @@ int AbilityManagerService::BlockAmsService() { HILOG_DEBUG("%{public}s", __func__); if (handler_) { - HILOG_DEBUG("%{public}s begain post block ams service task", __func__); + HILOG_DEBUG("%{public}s begin post block ams service task", __func__); auto BlockAmsServiceTask = [aams = shared_from_this()]() { while (1) { - HILOG_DEBUG("%{public}s begain waiting", __func__); + HILOG_DEBUG("%{public}s begin waiting", __func__); std::this_thread::sleep_for(BLOCK_AMS_SERVICE_TIME*1s); } }; @@ -4709,7 +4709,7 @@ int AbilityManagerService::Dump(int fd, const std::vector &args) } else { errCode = ProcessMultiParam(argsStr, result); if (errCode == ERR_AAFWK_HIDUMP_INVALID_ARGS) { - ShowIllealInfomation(result); + ShowIllegalInfomation(result); } } @@ -4791,7 +4791,7 @@ void AbilityManagerService::ShowHelp(std::string &result) .append("dump all data ability infomation in the system"); } -void AbilityManagerService::ShowIllealInfomation(std::string &result) +void AbilityManagerService::ShowIllegalInfomation(std::string &result) { result.append(ILLEGAL_INFOMATION); } diff --git a/services/abilitymgr/src/ability_manager_stub.cpp b/services/abilitymgr/src/ability_manager_stub.cpp index c0c673befa..612046cf20 100644 --- a/services/abilitymgr/src/ability_manager_stub.cpp +++ b/services/abilitymgr/src/ability_manager_stub.cpp @@ -1188,8 +1188,9 @@ int AbilityManagerStub::GetMissionSnapshotInfoInner(MessageParcel &data, Message { std::string deviceId = data.ReadString(); int32_t missionId = data.ReadInt32(); + bool isLowResolution = data.ReadBool(); MissionSnapshot missionSnapshot; - int32_t result = GetMissionSnapshot(deviceId, missionId, missionSnapshot); + int32_t result = GetMissionSnapshot(deviceId, missionId, missionSnapshot, isLowResolution); HILOG_INFO("snapshot: AbilityManagerStub get snapshot result = %{public}d", result); if (!reply.WriteParcelable(&missionSnapshot)) { HILOG_ERROR("GetMissionSnapshot error"); @@ -1339,8 +1340,8 @@ int AbilityManagerStub::ForceTimeoutForTestInner(MessageParcel &data, MessagePar int AbilityManagerStub::BlockAbilityInner(MessageParcel &data, MessageParcel &reply) { - int32_t abilityReocrdId = data.ReadInt32(); - int32_t result = BlockAbility(abilityReocrdId); + int32_t abilityRecordId = data.ReadInt32(); + int32_t result = BlockAbility(abilityRecordId); if (!reply.WriteInt32(result)) { HILOG_ERROR("reply write failed."); return ERR_INVALID_VALUE; diff --git a/services/abilitymgr/src/ability_record.cpp b/services/abilitymgr/src/ability_record.cpp index 490fe4540a..8c0f581444 100644 --- a/services/abilitymgr/src/ability_record.cpp +++ b/services/abilitymgr/src/ability_record.cpp @@ -112,9 +112,9 @@ AbilityRecord::AbilityRecord(const Want &want, const AppExecFwk::AbilityInfo &ab recordId_ = abilityRecordId++; auto abilityMgr = DelayedSingleton::GetInstance(); if (abilityMgr) { - abilityMgr->GetMaxRestartNum(restratMax_); + abilityMgr->GetMaxRestartNum(restartMax_); } - restartCount_ = restratMax_; + restartCount_ = restartMax_; } AbilityRecord::~AbilityRecord() @@ -256,10 +256,10 @@ void AbilityRecord::ProcessForegroundAbility(uint32_t sceneFlag) if (isReady_) { if (IsAbilityState(AbilityState::BACKGROUND)) { - // background to activte state - HILOG_DEBUG("MoveToForground, %{public}s", element.c_str()); + // background to active state + HILOG_DEBUG("MoveToForeground, %{public}s", element.c_str()); lifeCycleStateInfo_.sceneFlagBak = sceneFlag; - DelayedSingleton::GetInstance()->MoveToForground(token_); + DelayedSingleton::GetInstance()->MoveToForeground(token_); } else { HILOG_DEBUG("Activate %{public}s", element.c_str()); ForegroundAbility(nullptr, sceneFlag); @@ -282,15 +282,15 @@ void AbilityRecord::ProcessForegroundAbility(bool isRecent, const AbilityRequest if (isReady_) { if (IsAbilityState(AbilityState::BACKGROUND)) { - // background to activte state - HILOG_DEBUG("MoveToForground, %{public}s", element.c_str()); + // background to active state + HILOG_DEBUG("MoveToForeground, %{public}s", element.c_str()); lifeCycleStateInfo_.sceneFlagBak = sceneFlag; StartingWindowTask(isRecent, false, abilityRequest, startOptions); AnimationTask(isRecent, abilityRequest, startOptions, callerAbility); CancelStartingWindowHotTask(); - DelayedSingleton::GetInstance()->MoveToForground(token_); + DelayedSingleton::GetInstance()->MoveToForeground(token_); } else { HILOG_DEBUG("Activate %{public}s", element.c_str()); ForegroundAbility(nullptr, sceneFlag); @@ -1021,13 +1021,13 @@ void AbilityRecord::SaveResultToCallers(const int resultCode, const Want *result HILOG_WARN("callerRecordList is empty."); return; } - auto lastestCaller = callerRecordList.back(); + auto latestCaller = callerRecordList.back(); for (auto caller : callerRecordList) { if (caller == nullptr) { HILOG_WARN("Caller record is nullptr."); continue; } - if (caller == lastestCaller) { + if (caller == latestCaller) { HILOG_INFO("Caller record is the latest."); SaveResult(resultCode, resultWant, caller); continue; @@ -1566,7 +1566,7 @@ void AbilityRecord::SetRestarting(const bool isRestart) HILOG_DEBUG("SetRestarting: %{public}d", isRestarting_); if (isLauncherRoot_ && IsLauncherAbility()) { - restartCount_ = isRestart ? (--restartCount_) : restratMax_; + restartCount_ = isRestart ? (--restartCount_) : restartMax_; HILOG_INFO("root launcher restart count: %{public}d", restartCount_); } } @@ -1577,7 +1577,7 @@ void AbilityRecord::SetRestarting(const bool isRestart, int32_t canReStartCount) HILOG_DEBUG("SetRestarting: %{public}d, restart count: %{public}d", isRestarting_, canReStartCount); if (isLauncherRoot_ && IsLauncherAbility()) { - restartCount_ = isRestart ? canReStartCount : restratMax_; + restartCount_ = isRestart ? canReStartCount : restartMax_; HILOG_INFO("root launcher restart count: %{public}d", restartCount_); } } @@ -1731,7 +1731,7 @@ ResolveResultType AbilityRecord::Resolve(const AbilityRequest &abilityRequest) { auto callback = abilityRequest.connect; if (abilityRequest.callType != AbilityCallType::CALL_REQUEST_TYPE || !callback) { - HILOG_ERROR("only startd by call type can create a call record."); + HILOG_ERROR("only start by call type can create a call record."); return ResolveResultType::NG_INNER_ERROR; } if (!callContainer_) { @@ -1970,7 +1970,7 @@ int AbilityRecord::BlockAbility() { HILOG_INFO("BlockAbility."); if (scheduler_) { - HILOG_INFO("scheduler_ begain to call BlockAbility %{public}s", __func__); + HILOG_INFO("scheduler_ begin to call BlockAbility %{public}s", __func__); return scheduler_->BlockAbility(); } return ERR_NO_INIT; diff --git a/services/abilitymgr/src/ams_configuration_parameter.cpp b/services/abilitymgr/src/ams_configuration_parameter.cpp index 8e100e4fcf..90690ea7db 100644 --- a/services/abilitymgr/src/ams_configuration_parameter.cpp +++ b/services/abilitymgr/src/ams_configuration_parameter.cpp @@ -125,7 +125,7 @@ int AmsConfigurationParameter::LoadAppConfigurationForStartUpService(nlohmann::j Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::AMS_TIMEOUT_TIME).get(); maxRestartNum_ = Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::ROOT_LAUNCHER_RESTART_MAX).get(); deviceType_ = Object.at(AmsConfig::SERVICE_ITEM_AMS).at(AmsConfig::DEVICE_TYPE).get(); - HILOG_INFO("get ams service config succes!"); + HILOG_INFO("get ams service config success!"); ret = 0; } diff --git a/services/abilitymgr/src/app_scheduler.cpp b/services/abilitymgr/src/app_scheduler.cpp index f56fe05361..dbd9018ac6 100644 --- a/services/abilitymgr/src/app_scheduler.cpp +++ b/services/abilitymgr/src/app_scheduler.cpp @@ -104,7 +104,7 @@ int AppScheduler::TerminateAbility(const sptr &token, bool clearM return ERR_OK; } -void AppScheduler::MoveToForground(const sptr &token) +void AppScheduler::MoveToForeground(const sptr &token) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); HILOG_DEBUG("Start to move the ability to foreground."); diff --git a/services/abilitymgr/src/mission_data_storage.cpp b/services/abilitymgr/src/mission_data_storage.cpp index d3d3d118d4..0dff8adc31 100644 --- a/services/abilitymgr/src/mission_data_storage.cpp +++ b/services/abilitymgr/src/mission_data_storage.cpp @@ -103,6 +103,46 @@ void MissionDataStorage::DeleteMissionInfo(int missionId) DeleteMissionSnapshot(missionId); } +void MissionDataStorage::SaveMissionSnapshot(int32_t missionId, const MissionSnapshot& missionSnapshot) +{ +#ifdef SUPPORT_GRAPHICS + HILOG_INFO("snapshot: save snapshot from cache, missionId = %{public}d", missionId); + SaveCachedSnapshot(missionId, missionSnapshot); + SaveSnapshotFile(missionId, missionSnapshot); + HILOG_INFO("snapshot: delete snapshot from cache, missionId = %{public}d", missionId); + DeleteCachedSnapshot(missionId); +#endif +} + +void MissionDataStorage::DeleteMissionSnapshot(int32_t missionId) +{ +#ifdef SUPPORT_GRAPHICS + DeleteMissionSnapshot(missionId, false); + DeleteMissionSnapshot(missionId, true); +#endif +} + +bool MissionDataStorage::GetMissionSnapshot(int32_t missionId, MissionSnapshot& missionSnapshot, bool isLowResolution) +{ +#ifdef SUPPORT_GRAPHICS + if (GetCachedSnapshot(missionId, missionSnapshot)) { + if (isLowResolution) { + missionSnapshot.snapshot = GetReducedPixelMap(missionSnapshot.snapshot); + } + HILOG_INFO("snapshot: GetMissionSnapshot from cache, missionId = %{public}d", missionId); + return true; + } + + auto pixelMap = GetPixelMap(missionId, isLowResolution); + if (!pixelMap) { + HILOG_ERROR("%{public}s: GetPixelMap failed.", __func__); + return false; + } + missionSnapshot.snapshot = std::move(pixelMap); +#endif + return true; +} + std::string MissionDataStorage::GetMissionDataDirPath() const { return TASK_DATA_FILE_BASE_PATH + "/" + std::to_string(userId_) + "/" + MISSION_DATA_FILE_PATH; @@ -114,6 +154,17 @@ std::string MissionDataStorage::GetMissionDataFilePath(int missionId) + MISSION_JSON_FILE_PREFIX + "_" + std::to_string(missionId) + JSON_FILE_SUFFIX; } +std::string MissionDataStorage::GetMissionSnapshotPath(int32_t missionId, bool isLowResolution) const +{ + std::string filePath = GetMissionDataDirPath() + FILE_SEPARATOR + MISSION_JSON_FILE_PREFIX + + UNDERLINE_SEPARATOR + std::to_string(missionId); + if (isLowResolution) { + filePath = filePath + UNDERLINE_SEPARATOR + LOW_RESOLUTION_FLAG; + } + filePath = filePath + PNG_FILE_SUFFIX; + return filePath; +} + bool MissionDataStorage::CheckFileNameValid(const std::string &fileName) { std::string fileNameExcludePath = OHOS::HiviewDFX::FileUtil::ExtractFileName(fileName); @@ -140,9 +191,21 @@ bool MissionDataStorage::CheckFileNameValid(const std::string &fileName) return true; } +#ifdef SUPPORT_GRAPHICS void MissionDataStorage::SaveSnapshotFile(int32_t missionId, const MissionSnapshot& missionSnapshot) { - std::string filePath = GetMissionSnapshotPath(missionId); + SaveSnapshotFile(missionId, missionSnapshot.snapshot, missionSnapshot.isPrivate, false); + SaveSnapshotFile(missionId, GetReducedPixelMap(missionSnapshot.snapshot), missionSnapshot.isPrivate, true); +} + +void MissionDataStorage::SaveSnapshotFile(int32_t missionId, const std::shared_ptr& snapshot, + bool isPrivate, bool isLowResolution) +{ + if (!snapshot) { + return; + } + + std::string filePath = GetMissionSnapshotPath(missionId, isLowResolution); std::string dirPath = OHOS::HiviewDFX::FileUtil::ExtractFilePath(filePath); if (!OHOS::HiviewDFX::FileUtil::FileExists(dirPath)) { bool createDir = OHOS::HiviewDFX::FileUtil::ForceCreateDirectory(dirPath); @@ -151,79 +214,75 @@ void MissionDataStorage::SaveSnapshotFile(int32_t missionId, const MissionSnapsh return; } } -#ifdef SUPPORT_GRAPHICS + bool saveMissionFile = false; - if (missionSnapshot.isPrivate) { - ssize_t dataLength = missionSnapshot.snapshot->GetWidth() * missionSnapshot.snapshot->GetHeight() * BPP; + if (isPrivate) { + ssize_t dataLength = snapshot->GetWidth() * snapshot->GetHeight() * BPP; uint8_t* data = (uint8_t*) malloc(dataLength); if (memset_s(data, dataLength, 0xff, dataLength) == EOK) { - saveMissionFile = WriteToPng(filePath.c_str(), missionSnapshot.snapshot->GetWidth(), - missionSnapshot.snapshot->GetHeight(), data); + saveMissionFile = WriteToPng(filePath.c_str(), snapshot->GetWidth(), snapshot->GetHeight(), data); } free(data); } else { - const uint8_t* data = missionSnapshot.snapshot->GetPixels(); - saveMissionFile = WriteToPng(filePath.c_str(), missionSnapshot.snapshot->GetWidth(), - missionSnapshot.snapshot->GetHeight(), data); + const uint8_t* data = snapshot->GetPixels(); + saveMissionFile = WriteToPng(filePath.c_str(), snapshot->GetWidth(), snapshot->GetHeight(), data); } if (!saveMissionFile) { HILOG_ERROR("snapshot: save mission snapshot failed, path = %{public}s.", filePath.c_str()); } -#endif } -void MissionDataStorage::SaveMissionSnapshot(int32_t missionId, const MissionSnapshot& missionSnapshot) +std::shared_ptr MissionDataStorage::GetReducedPixelMap( + const std::shared_ptr& snapshot) { - HILOG_INFO("snapshot: save snapshot from cache, missionId = %{public}d", missionId); - SaveCachedSnapshot(missionId, missionSnapshot); - SaveSnapshotFile(missionId, missionSnapshot); - HILOG_INFO("snapshot: delete snapshot from cache, missionId = %{public}d", missionId); - DeleteCachedSnapshot(missionId); + if (!snapshot) { + return nullptr; + } + + OHOS::Media::InitializationOptions options; + options.size.width = snapshot->GetWidth() / SCALE; + options.size.height = snapshot->GetHeight() / SCALE; + std::unique_ptr reducedPixelMap = OHOS::Media::PixelMap::Create(*snapshot, options); + return std::shared_ptr(reducedPixelMap.release()); } bool MissionDataStorage::GetCachedSnapshot(int32_t missionId, MissionSnapshot& missionSnapshot) { -#ifdef SUPPORT_GRAPHICS std::lock_guard lock(cachedPixelMapMutex_); auto pixelMap = cachedPixelMap_.find(missionId); if (pixelMap != cachedPixelMap_.end()) { missionSnapshot.snapshot = pixelMap->second; return true; } -#endif return false; } bool MissionDataStorage::SaveCachedSnapshot(int32_t missionId, const MissionSnapshot& missionSnapshot) { -#ifdef SUPPORT_GRAPHICS std::lock_guard lock(cachedPixelMapMutex_); auto result = cachedPixelMap_.insert_or_assign(missionId, missionSnapshot.snapshot); if (!result.second) { HILOG_ERROR("snapshot: save snapshot cache failed, missionId = %{public}d", missionId); return false; } -#endif return true; } bool MissionDataStorage::DeleteCachedSnapshot(int32_t missionId) { -#ifdef SUPPORT_GRAPHICS std::lock_guard lock(cachedPixelMapMutex_); auto result = cachedPixelMap_.erase(missionId); if (result != 1) { HILOG_ERROR("snapshot: delete snapshot cache failed, missionId = %{public}d", missionId); return false; } -#endif return true; } -void MissionDataStorage::DeleteMissionSnapshot(int32_t missionId) +void MissionDataStorage::DeleteMissionSnapshot(int32_t missionId, bool isLowResolution) { - std::string filePath = GetMissionSnapshotPath(missionId); + std::string filePath = GetMissionSnapshotPath(missionId, isLowResolution); std::string dirPath = OHOS::HiviewDFX::FileUtil::ExtractFilePath(filePath); if (!OHOS::HiviewDFX::FileUtil::FileExists(filePath)) { HILOG_WARN("snapshot: remove snapshot file %{public}s failed, file not exists", filePath.c_str()); @@ -235,10 +294,9 @@ void MissionDataStorage::DeleteMissionSnapshot(int32_t missionId) } } -#ifdef SUPPORT_GRAPHICS -sptr MissionDataStorage::GetSnapshot(int missionId) const +sptr MissionDataStorage::GetSnapshot(int missionId, bool isLowResolution) const { - auto pixelMapPtr = GetPixelMap(missionId); + auto pixelMapPtr = GetPixelMap(missionId, isLowResolution); if (!pixelMapPtr) { HILOG_ERROR("%{public}s: GetPixelMap failed.", __func__); return nullptr; @@ -246,9 +304,9 @@ sptr MissionDataStorage::GetSnapshot(int missionId) const return sptr(pixelMapPtr.release()); } -std::unique_ptr MissionDataStorage::GetPixelMap(int missionId) const +std::unique_ptr MissionDataStorage::GetPixelMap(int missionId, bool isLowResolution) const { - std::string filePath = GetMissionSnapshotPath(missionId); + std::string filePath = GetMissionSnapshotPath(missionId, isLowResolution); if (!OHOS::HiviewDFX::FileUtil::FileExists(filePath)) { HILOG_INFO("snapshot: storage snapshot not exists, missionId = %{public}d", missionId); return nullptr; @@ -268,35 +326,9 @@ std::unique_ptr MissionDataStorage::GetPixelMap(int missionId) } return pixelMapPtr; } -#endif - -bool MissionDataStorage::GetMissionSnapshot(int32_t missionId, MissionSnapshot& missionSnapshot) -{ -#ifdef SUPPORT_GRAPHICS - if (GetCachedSnapshot(missionId, missionSnapshot)) { - HILOG_INFO("snapshot: GetMissionSnapshot from cache, missionId = %{public}d", missionId); - return true; - } - - auto pixelMap = GetPixelMap(missionId); - if (!pixelMap) { - HILOG_ERROR("%{public}s: GetPixelMap failed.", __func__); - return false; - } - missionSnapshot.snapshot = std::move(pixelMap); -#endif - return true; -} - -std::string MissionDataStorage::GetMissionSnapshotPath(int32_t missionId) const -{ - return GetMissionDataDirPath() + "/" - + MISSION_JSON_FILE_PREFIX + "_" + std::to_string(missionId) + PNG_FILE_SUFFIX; -} bool MissionDataStorage::WriteToPng(const char* fileName, uint32_t width, uint32_t height, const uint8_t* data) { -#ifdef SUPPORT_GRAPHICS if (data == nullptr) { HILOG_ERROR("snapshot: data error, nullptr!\n"); return false; @@ -347,8 +379,9 @@ bool MissionDataStorage::WriteToPng(const char* fileName, uint32_t width, uint32 // free memory png_destroy_write_struct(&png_ptr, &info_ptr); (void)fclose(fp); -#endif + return true; } +#endif } // namespace AAFwk -} // namespace OHOS +} // namespace OHOS \ No newline at end of file diff --git a/services/abilitymgr/src/mission_info_mgr.cpp b/services/abilitymgr/src/mission_info_mgr.cpp index b6fc85c75b..69ea1c85d2 100644 --- a/services/abilitymgr/src/mission_info_mgr.cpp +++ b/services/abilitymgr/src/mission_info_mgr.cpp @@ -32,15 +32,15 @@ MissionInfoMgr::~MissionInfoMgr() bool MissionInfoMgr::GenerateMissionId(int32_t &missionId) { std::lock_guard lock(mutex_); - if (currentMisionId_ == MAX_MISSION_ID) { - currentMisionId_ = MIN_MISSION_ID; + if (currentMissionId_ == MAX_MISSION_ID) { + currentMissionId_ = MIN_MISSION_ID; } - for (int32_t index = currentMisionId_; index < MAX_MISSION_ID; index++) { + for (int32_t index = currentMissionId_; index < MAX_MISSION_ID; index++) { if (missionIdMap_.find(index) == missionIdMap_.end()) { missionId = index; missionIdMap_[missionId] = false; - currentMisionId_ = missionId + 1; + currentMissionId_ = missionId + 1; return true; } } @@ -144,7 +144,7 @@ bool MissionInfoMgr::DeleteMissionInfo(int missionId) } if (!missionIdMap_[missionId]) { - HILOG_WARN("missionId %{public}d distriubted but not saved, no need delete", missionId); + HILOG_WARN("missionId %{public}d distributed but not saved, no need delete", missionId); missionIdMap_.erase(missionId); return true; } @@ -405,7 +405,7 @@ void MissionInfoMgr::RegisterSnapshotHandler(const sptr& handl } bool MissionInfoMgr::UpdateMissionSnapshot(int32_t missionId, const sptr& abilityToken, - MissionSnapshot& missionSnapshot) const + MissionSnapshot& missionSnapshot, bool isLowResolution) const { HILOG_INFO("Update mission snapshot, missionId:%{public}d.", missionId); std::lock_guard lock(mutex_); @@ -430,11 +430,18 @@ bool MissionInfoMgr::UpdateMissionSnapshot(int32_t missionId, const sptrmissionInfo.want.GetElement(); - if (!taskDataPersistenceMgr_->SaveMissionSnapshot(missionId, missionSnapshot)) { + + MissionSnapshot savedSnapshot = missionSnapshot; +#ifdef SUPPORT_GRAPHICS + savedSnapshot.snapshot = snapshot.GetPixelMap(); +#endif + if (!taskDataPersistenceMgr_->SaveMissionSnapshot(missionId, savedSnapshot)) { HILOG_ERROR("snapshot: save mission snapshot failed"); return false; } @@ -463,7 +470,7 @@ sptr MissionInfoMgr::GetSnapshot(int32_t missionId) const #endif bool MissionInfoMgr::GetMissionSnapshot(int32_t missionId, const sptr& abilityToken, - MissionSnapshot& missionSnapshot, bool force) const + MissionSnapshot& missionSnapshot, bool isLowResolution, bool force) const { HILOG_INFO("mission_list_info GetMissionSnapshot, missionId:%{public}d, force:%{public}d", missionId, force); std::lock_guard lock(mutex_); @@ -481,16 +488,16 @@ bool MissionInfoMgr::GetMissionSnapshot(int32_t missionId, const sptrGetMissionSnapshot(missionId, missionSnapshot)) { + if (taskDataPersistenceMgr_->GetMissionSnapshot(missionId, missionSnapshot, isLowResolution)) { missionSnapshot.topAbility = it->missionInfo.want.GetElement(); HILOG_ERROR("mission_list_info GetMissionSnapshot, find snapshot OK, missionId:%{public}d", missionId); return true; } HILOG_INFO("snapshot: storage mission snapshot not exists, create new snapshot"); - return UpdateMissionSnapshot(missionId, abilityToken, missionSnapshot); + return UpdateMissionSnapshot(missionId, abilityToken, missionSnapshot, isLowResolution); } } // namespace AAFwk } // namespace OHOS diff --git a/services/abilitymgr/src/mission_list.cpp b/services/abilitymgr/src/mission_list.cpp index 566302ebd9..145f3a8e98 100644 --- a/services/abilitymgr/src/mission_list.cpp +++ b/services/abilitymgr/src/mission_list.cpp @@ -314,7 +314,7 @@ void MissionList::DumpStateByRecordId( auto abilityRecord = mission->GetAbilityRecord(); if (abilityRecord) { if (abilityRecord->GetRecordId() == abilityRecordId) { - HILOG_INFO("record begain to call DumpAbilityState %{public}s", __func__); + HILOG_INFO("record begin to call DumpAbilityState %{public}s", __func__); abilityRecord->DumpAbilityState(info, isClient, params); return; } @@ -336,7 +336,7 @@ void MissionList::DumpList(std::vector &info, bool isClient) auto abilityRecord = mission->GetAbilityRecord(); if (abilityRecord) { - HILOG_INFO("record begain to call DumpAbilityState %{public}s", __func__); + HILOG_INFO("record begin to call DumpAbilityState %{public}s", __func__); std::vector params; abilityRecord->DumpAbilityState(info, isClient, params); } @@ -353,7 +353,7 @@ int MissionList::BlockAbilityByRecordId(int32_t abilityRecordId) auto abilityRecord = mission->GetAbilityRecord(); if (abilityRecord) { if (abilityRecord->GetRecordId() == abilityRecordId) { - HILOG_INFO("record begain to call BlockAbilityByRecordId %{public}s", __func__); + HILOG_INFO("record begin to call BlockAbilityByRecordId %{public}s", __func__); return abilityRecord->BlockAbility(); } } diff --git a/services/abilitymgr/src/mission_list_manager.cpp b/services/abilitymgr/src/mission_list_manager.cpp index b09c1615bb..ac83b0183a 100644 --- a/services/abilitymgr/src/mission_list_manager.cpp +++ b/services/abilitymgr/src/mission_list_manager.cpp @@ -79,7 +79,7 @@ int MissionListManager::StartAbility(const AbilityRequest &abilityRequest) element.c_str(), AbilityRecord::ConvertAbilityState(state).c_str()); if (state == FOREGROUNDING) { HILOG_INFO("Top ability is foregrounding, so enqueue ability for waiting."); - EnqueueWaittingAbility(abilityRequest); + EnqueueWaitingAbility(abilityRequest); return START_ABILITY_WAITING; } } @@ -100,7 +100,7 @@ int MissionListManager::StartAbility(const std::shared_ptr &curre { auto isSpecified = (abilityRequest.abilityInfo.launchMode == AppExecFwk::LaunchMode::SPECIFIED); if (isSpecified) { - EnqueueWaittingAbilityToFront(abilityRequest); + EnqueueWaitingAbilityToFront(abilityRequest); DelayedSingleton::GetInstance()->StartSpecifiedAbility( abilityRequest.want, abilityRequest.abilityInfo); return 0; @@ -200,26 +200,26 @@ int MissionListManager::MoveMissionToFront(int32_t missionId, bool isCallerFromL return ERR_OK; } -void MissionListManager::EnqueueWaittingAbility(const AbilityRequest &abilityRequest) +void MissionListManager::EnqueueWaitingAbility(const AbilityRequest &abilityRequest) { - waittingAbilityQueue_.push(abilityRequest); + waitingAbilityQueue_.push(abilityRequest); return; } -void MissionListManager::EnqueueWaittingAbilityToFront(const AbilityRequest &abilityRequest) +void MissionListManager::EnqueueWaitingAbilityToFront(const AbilityRequest &abilityRequest) { std::lock_guard guard(managerLock_); std::queue abilityQueue; abilityQueue.push(abilityRequest); - waittingAbilityQueue_.swap(abilityQueue); + waitingAbilityQueue_.swap(abilityQueue); while (!abilityQueue.empty()) { AbilityRequest tempAbilityRequest = abilityQueue.front(); abilityQueue.pop(); - waittingAbilityQueue_.push(tempAbilityRequest); + waitingAbilityQueue_.push(tempAbilityRequest); } } -void MissionListManager::StartWaittingAbility() +void MissionListManager::StartWaitingAbility() { HILOG_INFO("%{public}s was called.", __func__); std::lock_guard guard(managerLock_); @@ -231,10 +231,10 @@ void MissionListManager::StartWaittingAbility() return; } - if (!waittingAbilityQueue_.empty()) { - AbilityRequest abilityRequest = waittingAbilityQueue_.front(); + if (!waitingAbilityQueue_.empty()) { + AbilityRequest abilityRequest = waitingAbilityQueue_.front(); HILOG_INFO("%{public}s. ability name: %{public}s", __func__, abilityRequest.abilityInfo.name.c_str()); - waittingAbilityQueue_.pop(); + waitingAbilityQueue_.pop(); auto callerAbility = GetAbilityRecordByToken(abilityRequest.callerToken); StartAbility(topAbility, callerAbility, abilityRequest); return; @@ -421,13 +421,13 @@ std::shared_ptr MissionListManager::GetTargetMissionList( { // priority : starting launcher ability. if (abilityRequest.abilityInfo.applicationInfo.isLauncherApp) { - HILOG_DEBUG("ability reques is launcher app."); + HILOG_DEBUG("ability request is launcher app."); return launcherList_; } // no caller ability, start ability from system service. if (!callerAbility) { - HILOG_DEBUG("ability reques without caller."); + HILOG_DEBUG("ability request without caller."); std::shared_ptr targetMissionList = std::make_shared(); return targetMissionList; } @@ -473,7 +473,7 @@ std::shared_ptr MissionListManager::GetTargetMissionListByDefault( // target mission should in caller mission list if (callerList != defaultStandardList_ && callerList != defaultSingleList_) { - HILOG_DEBUG("GetTargetMissionListByDefault target is cller list."); + HILOG_DEBUG("GetTargetMissionListByDefault target is caller list."); return callerList; } @@ -535,7 +535,7 @@ void MissionListManager::MoveMissionToTargetList(bool isCallFromLauncher, return; } - // 3. reused mission is in default, move frome default to target list. + // 3. reused mission is in default, move from default to target list. if (missionList == defaultSingleList_ || missionList == defaultStandardList_) { missionList->RemoveMission(mission); targetMissionList->AddMissionToTop(mission); @@ -636,7 +636,7 @@ int MissionListManager::AttachAbilityThread(const sptr &sched auto abilityRecord = GetAbilityRecordByToken(token); CHECK_POINTER_AND_RETURN(abilityRecord, ERR_INVALID_VALUE); - HILOG_DEBUG("AbilityMS attch abilityThread, name is %{public}s.", abilityRecord->GetAbilityInfo().name.c_str()); + HILOG_DEBUG("AbilityMS attach abilityThread, name is %{public}s.", abilityRecord->GetAbilityInfo().name.c_str()); std::shared_ptr handler = DelayedSingleton::GetInstance()->GetEventHandler(); @@ -656,7 +656,7 @@ int MissionListManager::AttachAbilityThread(const sptr &sched abilityRecord->CallRequest(); } - DelayedSingleton::GetInstance()->MoveToForground(token); + DelayedSingleton::GetInstance()->MoveToForeground(token); return ERR_OK; } @@ -665,8 +665,8 @@ void MissionListManager::OnAbilityRequestDone(const sptr &token, { HILOG_DEBUG("Ability request state %{public}d done.", state); std::lock_guard guard(managerLock_); - AppAbilityState abilitState = DelayedSingleton::GetInstance()->ConvertToAppAbilityState(state); - if (abilitState == AppAbilityState::ABILITY_STATE_FOREGROUND) { + AppAbilityState abilityState = DelayedSingleton::GetInstance()->ConvertToAppAbilityState(state); + if (abilityState == AppAbilityState::ABILITY_STATE_FOREGROUND) { auto abilityRecord = GetAbilityRecordByToken(token); CHECK_POINTER(abilityRecord); std::string element = abilityRecord->GetWant().GetElement().GetURI(); @@ -850,7 +850,7 @@ int MissionListManager::DispatchForeground(const std::shared_ptr auto self(shared_from_this()); if (success) { #ifdef SUPPORT_GRAPHICS - HILOG_INFO("%{public}s foreground successed.", __func__); + HILOG_INFO("%{public}s foreground succeeded.", __func__); abilityRecord->SetStartingWindow(false); #endif auto task = [self, abilityRecord]() { self->CompleteForegroundSuccess(abilityRecord); }; @@ -906,38 +906,38 @@ void MissionListManager::CompleteForegroundSuccess(const std::shared_ptrStartWaittingAbility(); }; + auto startWaitingAbilityTask = [self]() { self->StartWaitingAbility(); }; auto handler = DelayedSingleton::GetInstance()->GetEventHandler(); CHECK_POINTER_LOG(handler, "Fail to get AbilityEventHandler."); /* PostTask to trigger start Ability from waiting queue */ - handler->PostTask(startWaittingAbilityTask, "startWaittingAbility", NEXTABILITY_TIMEOUT); + handler->PostTask(startWaitingAbilityTask, "startWaitingAbility", NEXTABILITY_TIMEOUT); TerminatePreviousAbility(abilityRecord); } void MissionListManager::TerminatePreviousAbility(const std::shared_ptr &abilityRecord) { - auto teminatingAbilityRecord = abilityRecord->GetPreAbilityRecord(); - if (!teminatingAbilityRecord) { - HILOG_INFO("%{public}s, teminatingAbilityRecord is nullptr.", __func__); + auto terminatingAbilityRecord = abilityRecord->GetPreAbilityRecord(); + if (!terminatingAbilityRecord) { + HILOG_INFO("%{public}s, terminatingAbilityRecord is nullptr.", __func__); return; } abilityRecord->SetPreAbilityRecord(nullptr); auto self(shared_from_this()); - if (teminatingAbilityRecord->GetAbilityState() == AbilityState::FOREGROUND) { - auto task = [teminatingAbilityRecord, self] { - HILOG_INFO("%{public}s, teminatingAbilityRecord move to background.", __func__); - self->CompleteBackground(teminatingAbilityRecord); + if (terminatingAbilityRecord->GetAbilityState() == AbilityState::FOREGROUND) { + auto task = [terminatingAbilityRecord, self] { + HILOG_INFO("%{public}s, terminatingAbilityRecord move to background.", __func__); + self->CompleteBackground(terminatingAbilityRecord); }; - teminatingAbilityRecord->BackgroundAbility(task); + terminatingAbilityRecord->BackgroundAbility(task); } - if (teminatingAbilityRecord->GetAbilityState() == AbilityState::BACKGROUND) { - auto task = [teminatingAbilityRecord, self]() { - HILOG_INFO("%{public}s, To terminate teminatingAbilityRecord.", __func__); - self->CompleteTerminate(teminatingAbilityRecord); + if (terminatingAbilityRecord->GetAbilityState() == AbilityState::BACKGROUND) { + auto task = [terminatingAbilityRecord, self]() { + HILOG_INFO("%{public}s, To terminate terminatingAbilityRecord.", __func__); + self->CompleteTerminate(terminatingAbilityRecord); }; - teminatingAbilityRecord->Terminate(task); + terminatingAbilityRecord->Terminate(task); } } @@ -993,7 +993,7 @@ void MissionListManager::CompleteBackground(const std::shared_ptr } } - // new version. started by caller, sdheduler call request + // new version. started by caller, scheduler call request if (abilityRecord->IsStartedByCall() && abilityRecord->IsStartToBackground() && abilityRecord->IsReady()) { HILOG_DEBUG("call request after completing background state"); abilityRecord->CallRequest(); @@ -1061,7 +1061,7 @@ int MissionListManager::TerminateAbilityLocked(const std::shared_ptrSendResultToCallers(); - // 1. if the ability was foregorund, first should find wether there is other ability foregorund + // 1. if the ability was foreground, first should find wether there is other ability foreground if (abilityRecord->IsAbilityState(FOREGROUND) || abilityRecord->IsAbilityState(FOREGROUNDING)) { HILOG_DEBUG("current ability is active"); if (abilityRecord->GetNextAbilityRecord()) { @@ -1429,8 +1429,8 @@ void MissionListManager::PrintTimeOutLog(const std::shared_ptr &a std::string eventType = "LIFECYCLE_TIMEOUT"; OHOS::HiviewDFX::HiSysEvent::Write(OHOS::HiviewDFX::HiSysEvent::Domain::AAFWK, eventType, OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, - EVENT_KEY_UID, std::to_string(processInfo.uid_), - EVENT_KEY_PID, std::to_string(processInfo.pid_), + EVENT_KEY_UID, processInfo.uid_, + EVENT_KEY_PID, processInfo.pid_, EVENT_KEY_PACKAGE_NAME, processInfo.bundleNames, EVENT_KEY_PROCESS_NAME, processInfo.processName_, EVENT_KEY_MESSAGE, msgContent); @@ -1481,7 +1481,7 @@ void MissionListManager::OnTimeOut(uint32_t msgId, int64_t eventId) break; case AbilityManagerService::INACTIVE_TIMEOUT_MSG: case AbilityManagerService::FOREGROUND_TIMEOUT_MSG: - HandleForgroundTimeout(abilityRecord); + HandleForegroundTimeout(abilityRecord); break; default: break; @@ -1507,7 +1507,7 @@ void MissionListManager::HandleLoadTimeout(const std::shared_ptr HandleTimeoutAndResumeAbility(ability); } -void MissionListManager::HandleForgroundTimeout(const std::shared_ptr &ability) +void MissionListManager::HandleForegroundTimeout(const std::shared_ptr &ability) { if (ability == nullptr) { HILOG_ERROR("MissionListManager on time out event: ability record is nullptr."); @@ -1519,7 +1519,7 @@ void MissionListManager::HandleForgroundTimeout(const std::shared_ptrIsAbilityState(AbilityState::FOREGROUNDING)) { - HILOG_ERROR("this ability is not forgrounding state."); + HILOG_ERROR("this ability is not foregrounding state."); return; } @@ -1550,7 +1550,7 @@ void MissionListManager::CompleteForegroundFailed(const std::shared_ptrGetMission(); - if (selMisson == nullptr) { - HILOG_ERROR("timeout misson is nullptr."); + auto selMission = abilityRecord->GetMission(); + if (selMission == nullptr) { + HILOG_ERROR("timeout mission is nullptr."); return; } - missionList->RemoveMission(selMisson); + missionList->RemoveMission(selMission); if (missionList->GetType() == MissionListType::CURRENT && missionList->IsEmpty()) { RemoveMissionList(missionList); } @@ -1647,7 +1647,7 @@ void MissionListManager::MoveToTerminateList(const std::shared_ptr::GetInstance()->GetInnerMissionInfoById( - selMisson->GetMissionId(), info) == 0) { + selMission->GetMissionId(), info) == 0) { info.missionInfo.runningState = -1; DelayedSingleton::GetInstance()->UpdateMissionInfo(info); } @@ -1832,16 +1832,16 @@ void MissionListManager::UpdateMissionTimeStamp(const std::shared_ptr::GetInstance()->UpdateMissionTimeStamp(mission->GetMissionId(), curTime); } -void MissionListManager::PostStartWaittingAbility() +void MissionListManager::PostStartWaitingAbility() { auto self(shared_from_this()); - auto startWaittingAbilityTask = [self]() { self->StartWaittingAbility(); }; + auto startWaitingAbilityTask = [self]() { self->StartWaitingAbility(); }; auto handler = DelayedSingleton::GetInstance()->GetEventHandler(); CHECK_POINTER_LOG(handler, "Fail to get AbilityEventHandler."); /* PostTask to trigger start Ability from waiting queue */ - handler->PostTask(startWaittingAbilityTask, "startWaittingAbility"); + handler->PostTask(startWaitingAbilityTask, "startWaitingAbility"); } void MissionListManager::HandleAbilityDied(std::shared_ptr abilityRecord) @@ -1883,7 +1883,7 @@ void MissionListManager::HandleLauncherDied(std::shared_ptr abili missionList->RemoveMission(mission); } if (isForeground) { - HILOG_INFO("active launchrer ability died, start launcher, %{public}d", __LINE__); + HILOG_INFO("active launcher ability died, start launcher, %{public}d", __LINE__); DelayedStartLauncher(); } } @@ -1976,7 +1976,7 @@ void MissionListManager::BackToLauncher() } std::queue emptyQueue; - std::swap(waittingAbilityQueue_, emptyQueue); + std::swap(waitingAbilityQueue_, emptyQueue); launcherList_->AddMissionToTop(launcherRootMission); MoveMissionListToTop(launcherList_); @@ -2122,23 +2122,23 @@ void MissionListManager::DumpMissionListByRecordId( info.push_back(dumpInfo); for (const auto& missionList : currentMissionLists_) { if (missionList && missionList != launcherList_) { - HILOG_INFO("missionList begain to call DumpMissionListByRecordId %{public}s", __func__); + HILOG_INFO("missionList begin to call DumpMissionListByRecordId %{public}s", __func__); missionList->DumpStateByRecordId(info, isClient, abilityRecordId, params); } } if (defaultStandardList_) { - HILOG_INFO("defaultStandardList begain to call DumpMissionListByRecordId %{public}s", __func__); + HILOG_INFO("defaultStandardList begin to call DumpMissionListByRecordId %{public}s", __func__); defaultStandardList_->DumpStateByRecordId(info, isClient, abilityRecordId, params); } if (defaultSingleList_) { - HILOG_INFO("defaultSingleList begain to call DumpMissionListByRecordId %{public}s", __func__); + HILOG_INFO("defaultSingleList begin to call DumpMissionListByRecordId %{public}s", __func__); defaultSingleList_->DumpStateByRecordId(info, isClient, abilityRecordId, params); } if (launcherList_) { - HILOG_INFO("launcherList begain to call DumpMissionListByRecordId %{public}s", __func__); + HILOG_INFO("launcherList begin to call DumpMissionListByRecordId %{public}s", __func__); launcherList_->DumpStateByRecordId(info, isClient, abilityRecordId, params); } } @@ -2335,7 +2335,7 @@ std::shared_ptr MissionListManager::GetAbilityRecordByName(const } } - // find in lanucheMissionList_ + // find in launcherMissionList_ auto ability = launcherList_->GetAbilityRecordByName(element); if (ability != nullptr) { return ability; @@ -2359,12 +2359,12 @@ void MissionListManager::OnCallConnectDied(const std::shared_ptr &ca void MissionListManager::OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag) { std::lock_guard guard(managerLock_); - if (waittingAbilityQueue_.empty()) { + if (waitingAbilityQueue_.empty()) { return; } - AbilityRequest abilityRequest = waittingAbilityQueue_.front(); - waittingAbilityQueue_.pop(); + AbilityRequest abilityRequest = waitingAbilityQueue_.front(); + waitingAbilityQueue_.pop(); auto currentTopAbility = GetCurrentTopAbilityLocked(); auto callerAbility = GetAbilityRecordByToken(abilityRequest.callerToken); @@ -2393,16 +2393,16 @@ void MissionListManager::OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Wan { HILOG_DEBUG("%{public}s called.", __func__); std::lock_guard guard(managerLock_); - if (waittingAbilityQueue_.empty()) { + if (waitingAbilityQueue_.empty()) { return; } - waittingAbilityQueue_.pop(); + waitingAbilityQueue_.pop(); - if (waittingAbilityQueue_.empty()) { + if (waitingAbilityQueue_.empty()) { return; } - AbilityRequest abilityRequest = waittingAbilityQueue_.front(); - waittingAbilityQueue_.pop(); + AbilityRequest abilityRequest = waitingAbilityQueue_.front(); + waitingAbilityQueue_.pop(); auto currentTopAbility = GetCurrentTopAbilityLocked(); auto callerAbility = GetAbilityRecordByToken(abilityRequest.callerToken); @@ -2443,7 +2443,7 @@ void MissionListManager::RegisterSnapshotHandler(const sptr& h } bool MissionListManager::GetMissionSnapshot(int32_t missionId, const sptr& abilityToken, - MissionSnapshot& missionSnapshot) + MissionSnapshot& missionSnapshot, bool isLowResolution) { HILOG_INFO("snapshot: Start get mission snapshot."); bool forceSnapshot = false; @@ -2455,7 +2455,7 @@ bool MissionListManager::GetMissionSnapshot(int32_t missionId, const sptr::GetInstance()->GetMissionSnapshot( - missionId, abilityToken, missionSnapshot, forceSnapshot); + missionId, abilityToken, missionSnapshot, isLowResolution, forceSnapshot); } void MissionListManager::GetAbilityRunningInfos(std::vector &info, bool isPerm) @@ -2539,20 +2539,20 @@ void MissionListManager::AddUninstallTags(const std::string &bundleName, int32_t listenerController_->HandleUnInstallApp(matchedMissions); } - EraseWaittingAbility(bundleName, uid); + EraseWaitingAbility(bundleName, uid); } -void MissionListManager::EraseWaittingAbility(const std::string &bundleName, int32_t uid) +void MissionListManager::EraseWaitingAbility(const std::string &bundleName, int32_t uid) { std::queue abilityQueue; - waittingAbilityQueue_.swap(abilityQueue); + waitingAbilityQueue_.swap(abilityQueue); while (!abilityQueue.empty()) { AbilityRequest tempAbilityRequest = abilityQueue.front(); abilityQueue.pop(); if (tempAbilityRequest.abilityInfo.bundleName == bundleName && tempAbilityRequest.uid == uid) { - HILOG_INFO("AddUninstallTags, erase AbilityRequest from waittingAbilityQueue."); + HILOG_INFO("AddUninstallTags, erase AbilityRequest from waitingAbilityQueue."); } else { - waittingAbilityQueue_.push(tempAbilityRequest); + waitingAbilityQueue_.push(tempAbilityRequest); } } } @@ -2637,7 +2637,7 @@ int MissionListManager::BlockAbility(int32_t abilityRecordId) int ret = -1; for (const auto &missionList : currentMissionLists_) { if (missionList && missionList != launcherList_) { - HILOG_INFO("missionList begain to call BlockAbilityByRecordId %{public}s", __func__); + HILOG_INFO("missionList begin to call BlockAbilityByRecordId %{public}s", __func__); if (missionList->BlockAbilityByRecordId(abilityRecordId) == ERR_OK) { HILOG_INFO("missionList call BlockAbilityByRecordId success"); ret = ERR_OK; @@ -2646,7 +2646,7 @@ int MissionListManager::BlockAbility(int32_t abilityRecordId) } if (defaultStandardList_) { - HILOG_INFO("defaultStandardList begain to call BlockAbilityByRecordId %{public}s", __func__); + HILOG_INFO("defaultStandardList begin to call BlockAbilityByRecordId %{public}s", __func__); if (defaultStandardList_->BlockAbilityByRecordId(abilityRecordId) == ERR_OK) { HILOG_INFO("defaultStandardList call BlockAbilityByRecordId success"); ret = ERR_OK; @@ -2654,7 +2654,7 @@ int MissionListManager::BlockAbility(int32_t abilityRecordId) } if (defaultSingleList_) { - HILOG_INFO("defaultSingleList begain to call BlockAbilityByRecordId %{public}s", __func__); + HILOG_INFO("defaultSingleList begin to call BlockAbilityByRecordId %{public}s", __func__); if (defaultSingleList_->BlockAbilityByRecordId(abilityRecordId) == ERR_OK) { HILOG_INFO("defaultSingleList_ call BlockAbilityByRecordId success"); ret = ERR_OK; @@ -2662,7 +2662,7 @@ int MissionListManager::BlockAbility(int32_t abilityRecordId) } if (launcherList_) { - HILOG_INFO("launcherList begain to call BlockAbilityByRecordId %{public}s", __func__); + HILOG_INFO("launcherList begin to call BlockAbilityByRecordId %{public}s", __func__); if (launcherList_->BlockAbilityByRecordId(abilityRecordId) == ERR_OK) { HILOG_INFO("launcherList_ call BlockAbilityByRecordId success"); ret = ERR_OK; diff --git a/services/abilitymgr/src/task_data_persistence_mgr.cpp b/services/abilitymgr/src/task_data_persistence_mgr.cpp index 3e65698581..d3ceed284a 100644 --- a/services/abilitymgr/src/task_data_persistence_mgr.cpp +++ b/services/abilitymgr/src/task_data_persistence_mgr.cpp @@ -150,14 +150,14 @@ sptr TaskDataPersistenceMgr::GetSnapshot(int missionId) const } #endif -bool TaskDataPersistenceMgr::GetMissionSnapshot(int missionId, MissionSnapshot& snapshot) +bool TaskDataPersistenceMgr::GetMissionSnapshot(int missionId, MissionSnapshot& snapshot, bool isLowResolution) { std::lock_guard lock(mutex_); if (!currentMissionDataStorage_) { HILOG_ERROR("snapshot: currentMissionDataStorage_ is nullptr"); return false; } - return currentMissionDataStorage_->GetMissionSnapshot(missionId, snapshot); + return currentMissionDataStorage_->GetMissionSnapshot(missionId, snapshot, isLowResolution); } } // namespace AAFwk } // namespace OHOS diff --git a/services/abilitymgr/test/BUILD.gn b/services/abilitymgr/test/BUILD.gn index 68c8e600b5..602e97f8e2 100644 --- a/services/abilitymgr/test/BUILD.gn +++ b/services/abilitymgr/test/BUILD.gn @@ -69,23 +69,18 @@ ohos_source_set("abilityms_test_source") { } include_dirs = [ - "${bundlefwk_inner_api_path}/appexecfwk_core/include/", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/include/distributed_ability_runtime", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", - "//base/account/os_account/frameworks/common/account_error/include", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/interfaces/innerkits/osaccount/native/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/include/distributed_ability_runtime", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] external_dependent_files = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/app_state_callback_host.cpp", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/app_mgr_client.cpp", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/app_state_callback_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/app_state_callback_host.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/app_mgr_client.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/app_state_callback_proxy.cpp", ] sources += external_dependent_files @@ -99,12 +94,10 @@ ohos_source_set("abilityms_test_source") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "//base/hiviewdfx/hiview/adapter/utility:hiview_adapter_utility", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//utils/native/base:utils", ] @@ -143,11 +136,13 @@ ohos_source_set("abilityms_test_source") { "ability_base:configuration", "ability_base:want", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", diff --git a/services/abilitymgr/test/mock/appmgr_test_service/BUILD.gn b/services/abilitymgr/test/mock/appmgr_test_service/BUILD.gn index a37c022a90..4c978af8b8 100644 --- a/services/abilitymgr/test/mock/appmgr_test_service/BUILD.gn +++ b/services/abilitymgr/test/mock/appmgr_test_service/BUILD.gn @@ -16,14 +16,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") config("appmgr_test_service_config") { include_dirs = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/appmgr_test_service/include/", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/appmgr_test_service/include/", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${bundlefwk_inner_api_path}/appexecfwk_core/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/services/common/include", - "//foundation/windowmanager/utils/include", + "${ability_runtime_innerkits_path}/app_manager/include", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_services_path}/common/include", ] } @@ -31,7 +30,7 @@ ohos_source_set("appmgr_test_service") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/aakit/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit/include", "//third_party/jsoncpp/include", ] @@ -43,9 +42,7 @@ ohos_source_set("appmgr_test_service") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", ] @@ -58,6 +55,7 @@ ohos_source_set("appmgr_test_service") { "ability_base:want", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/mock/libs/aakit/BUILD.gn b/services/abilitymgr/test/mock/libs/aakit/BUILD.gn index 80352bdcf9..42de4a939f 100644 --- a/services/abilitymgr/test/mock/libs/aakit/BUILD.gn +++ b/services/abilitymgr/test/mock/libs/aakit/BUILD.gn @@ -16,17 +16,15 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") config("aakit_mock_config") { include_dirs = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/aakit/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_innerkits_path}/app_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", "include/", "//third_party/jsoncpp/include", - "${ability_runtime_path}/services/common/include/", + "${ability_runtime_services_path}/common/include/", ] } @@ -42,18 +40,18 @@ ohos_source_set("aakit_mock") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", ] external_deps = [ + "ability_base:base", "ability_base:configuration", - "ability_base:want", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/mock/libs/appexecfwk_core/BUILD.gn b/services/abilitymgr/test/mock/libs/appexecfwk_core/BUILD.gn index 13258374ea..6e8adccac8 100644 --- a/services/abilitymgr/test/mock/libs/appexecfwk_core/BUILD.gn +++ b/services/abilitymgr/test/mock/libs/appexecfwk_core/BUILD.gn @@ -16,18 +16,15 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") config("appexecfwk_core_mock_config") { include_dirs = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/include/", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/include/appmgr", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/include/bundlemgr", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", - "//base/telephony/core_service/sim/include/", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/aakit/include/", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/include/", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/include/appmgr", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/include/bundlemgr", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/include/", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit/include/", + "${ability_runtime_services_path}/common/include", ] } @@ -40,17 +37,16 @@ ohos_source_set("appexecfwk_appmgr_mock") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//utils/native/base:utils", ] external_deps = [ - "ability_base:want", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -68,10 +64,8 @@ ohos_source_set("appexecfwk_bundlemgr_mock") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -79,7 +73,9 @@ ohos_source_set("appexecfwk_bundlemgr_mock") { external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp b/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp index 9cc3d6f2e4..a7d0a43b5e 100644 --- a/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp +++ b/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp @@ -59,9 +59,9 @@ int AppScheduler::TerminateAbility(const sptr &token, bool isClea return ERR_OK; } -void AppScheduler::MoveToForground(const sptr &token) +void AppScheduler::MoveToForeground(const sptr &token) { - HILOG_INFO("Test AppScheduler::MoveToForground()"); + HILOG_INFO("Test AppScheduler::MoveToForeground()"); } void AppScheduler::MoveToBackground(const sptr &token) @@ -179,5 +179,15 @@ int AppScheduler::StartUserTest( { return 0; } + +int AppScheduler::GetApplicationInfoByProcessID(const int pid, AppExecFwk::ApplicationInfo &application) +{ + return 0; +} + +int AppScheduler::GetAbilityRecordsByProcessID(const int pid, std::vector> &tokens) +{ + return 0; +} } // namespace AAFwk } // namespace OHOS diff --git a/services/abilitymgr/test/mock/libs/arkui_mock/include/ui_service_mgr_client_mock.h b/services/abilitymgr/test/mock/libs/arkui_mock/include/ui_service_mgr_client_mock.h index 8938990ccb..233c67bd2d 100644 --- a/services/abilitymgr/test/mock/libs/arkui_mock/include/ui_service_mgr_client_mock.h +++ b/services/abilitymgr/test/mock/libs/arkui_mock/include/ui_service_mgr_client_mock.h @@ -28,11 +28,11 @@ namespace OHOS { namespace Ace { -class UIServiceMgrClientMock { +class UIServiceMgrClient { public: - UIServiceMgrClientMock(); - virtual ~UIServiceMgrClientMock(); - static std::shared_ptr GetInstance(); + UIServiceMgrClient(); + virtual ~UIServiceMgrClient(); + static std::shared_ptr GetInstance(); ErrCode RegisterCallBack(const AAFwk::Want& want, const sptr& uiService); @@ -62,13 +62,18 @@ public: ErrCode ShowAppPickerDialog( const AAFwk::Want& want, const std::vector& abilityInfos, int32_t userId); - + void static SetDialogCheckState(int pid, const std::string& code) { pid_ = pid; code_ = code; } + bool static GetAppRunningState(void) + { + return appRunning_; + } + private: ErrCode Connect(); @@ -78,10 +83,11 @@ private: int32_t& offsetX, int32_t& offsetY, int32_t& width, int32_t& height, bool& wideScreen); static std::mutex mutex_; - static std::shared_ptr instance_; + static std::shared_ptr instance_; sptr remoteObject_; static int pid_; static std::string code_; + static bool appRunning_; }; } // namespace Ace } // namespace OHOS diff --git a/services/abilitymgr/test/mock/libs/arkui_mock/src/ui_service_mgr_client_mock.cpp b/services/abilitymgr/test/mock/libs/arkui_mock/src/ui_service_mgr_client_mock.cpp index eef1e0514d..9c7212199f 100644 --- a/services/abilitymgr/test/mock/libs/arkui_mock/src/ui_service_mgr_client_mock.cpp +++ b/services/abilitymgr/test/mock/libs/arkui_mock/src/ui_service_mgr_client_mock.cpp @@ -31,99 +31,104 @@ namespace OHOS { namespace Ace { -std::shared_ptr UIServiceMgrClientMock::instance_ = nullptr; -int UIServiceMgrClientMock::pid_ = 0; -std::string UIServiceMgrClientMock::code_ = "0"; -std::mutex UIServiceMgrClientMock::mutex_; +std::shared_ptr UIServiceMgrClient::instance_ = nullptr; +int UIServiceMgrClient::pid_ = 0; +std::string UIServiceMgrClient::code_ = "0"; +std::mutex UIServiceMgrClient::mutex_; +bool UIServiceMgrClient::appRunning_ = true; namespace { const std::string EVENT_WAITING_CODE = "0"; const std::string EVENT_CLOSE_CODE = "1"; } -std::shared_ptr UIServiceMgrClientMock::GetInstance() +std::shared_ptr UIServiceMgrClient::GetInstance() { if (instance_ == nullptr) { std::lock_guard lock_l(mutex_); if (instance_ == nullptr) { - instance_ = std::make_shared(); + instance_ = std::make_shared(); } } return instance_; } -UIServiceMgrClientMock::UIServiceMgrClientMock() +UIServiceMgrClient::UIServiceMgrClient() {} -UIServiceMgrClientMock::~UIServiceMgrClientMock() +UIServiceMgrClient::~UIServiceMgrClient() {} -ErrCode UIServiceMgrClientMock::RegisterCallBack(const AAFwk::Want& want, const sptr& uiService) +ErrCode UIServiceMgrClient::RegisterCallBack(const AAFwk::Want& want, const sptr& uiService) { return 0; } -ErrCode UIServiceMgrClientMock::UnregisterCallBack(const AAFwk::Want& want) +ErrCode UIServiceMgrClient::UnregisterCallBack(const AAFwk::Want& want) { return 0; } -ErrCode UIServiceMgrClientMock::Push(const AAFwk::Want& want, const std::string& name, const std::string& jsonPath, +ErrCode UIServiceMgrClient::Push(const AAFwk::Want& want, const std::string& name, const std::string& jsonPath, const std::string& data, const std::string& extraData) { return 0; } -ErrCode UIServiceMgrClientMock::Request(const AAFwk::Want& want, const std::string& name, const std::string& data) +ErrCode UIServiceMgrClient::Request(const AAFwk::Want& want, const std::string& name, const std::string& data) { return 0; } -ErrCode UIServiceMgrClientMock::ReturnRequest(const AAFwk::Want& want, const std::string& source, +ErrCode UIServiceMgrClient::ReturnRequest(const AAFwk::Want& want, const std::string& source, const std::string& data, const std::string& extraData) { return 0; } -ErrCode UIServiceMgrClientMock::ShowDialog(const std::string& name, const std::string& params, +ErrCode UIServiceMgrClient::ShowDialog(const std::string& name, const std::string& params, OHOS::Rosen::WindowType windowType, int x, int y, int width, int height, DialogCallback callback, int* id) { if (code_ == EVENT_WAITING_CODE) { + appRunning_ = true; + HILOG_INFO("Waiting caller kill the process"); return 0; } if (code_ == EVENT_CLOSE_CODE) { + HILOG_INFO("kill the process"); kill(pid_, SIGKILL); + appRunning_ = false; } return 0; } -ErrCode UIServiceMgrClientMock::CancelDialog(int32_t id) +ErrCode UIServiceMgrClient::CancelDialog(int32_t id) { return 0; } -ErrCode UIServiceMgrClientMock::UpdateDialog(int32_t id, const std::string& data) +ErrCode UIServiceMgrClient::UpdateDialog(int32_t id, const std::string& data) { return 0; } -ErrCode UIServiceMgrClientMock::ShowAppPickerDialog( +ErrCode UIServiceMgrClient::ShowAppPickerDialog( const AAFwk::Want& want, const std::vector& abilityInfos, int32_t userId) { return 0; } -ErrCode UIServiceMgrClientMock::Connect() +ErrCode UIServiceMgrClient::Connect() { return 0; } -const std::string UIServiceMgrClientMock::GetPickerDialogParam( +const std::string UIServiceMgrClient::GetPickerDialogParam( const AAFwk::Want& want, const std::vector& abilityInfos, bool wideScreen) const { return ""; } -void UIServiceMgrClientMock::GetDisplayPosition( +void UIServiceMgrClient::GetDisplayPosition( int32_t& offsetX, int32_t& offsetY, int32_t& width, int32_t& height, bool& wideScreen) { return; diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn index 395e45da4b..b48c62dba4 100644 --- a/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("ability_connect_callback_proxy_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_connect_callback_proxy_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("ability_connect_callback_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -58,6 +56,7 @@ ohos_unittest("ability_connect_callback_proxy_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn index d5f649c7e1..d981387bc3 100644 --- a/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("ability_connect_callback_stub_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_connect_callback_stub_test.cpp", # add mock file ] @@ -38,16 +38,13 @@ ohos_unittest("ability_connect_callback_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - - # "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -60,6 +57,7 @@ ohos_unittest("ability_connect_callback_stub_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn index 717df957ad..bcf36c7113 100644 --- a/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn @@ -21,7 +21,7 @@ ohos_unittest("ability_connect_manage_test") { sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_connect_manage_test.cpp", ] @@ -34,16 +34,14 @@ ohos_unittest("ability_connect_manage_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -53,6 +51,7 @@ ohos_unittest("ability_connect_manage_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/ability_connect_manage_test.cpp b/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/ability_connect_manage_test.cpp index 3136b987e0..80266e42cb 100644 --- a/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/ability_connect_manage_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/ability_connect_manage_test.cpp @@ -185,7 +185,7 @@ HWTEST_F(AbilityConnectManageTest, AAFWK_Connect_Service_001, TestSize.Level1) service->SetAbilityState(OHOS::AAFwk::AbilityState::ACTIVATING); auto result2 = ConnectManager()->StartAbility(abilityRequest_); WaitUntilTaskDone(handler); - EXPECT_EQ(OHOS::AAFwk::START_SERVICE_ABILITY_ACTIVING, result2); + EXPECT_EQ(OHOS::AAFwk::START_SERVICE_ABILITY_ACTIVATING, result2); EXPECT_EQ(static_cast(ConnectManager()->GetServiceMap().size()), 1); } diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_client_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_client_test/BUILD.gn index e4ab9fc9bb..a1a3298a09 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_client_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_client_test/BUILD.gn @@ -21,8 +21,8 @@ ohos_unittest("ability_manager_client_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ @@ -36,16 +36,14 @@ ohos_unittest("ability_manager_client_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -56,7 +54,9 @@ ohos_unittest("ability_manager_client_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_client_test/ability_manager_stub_mock_test.h b/services/abilitymgr/test/unittest/phone/ability_manager_client_test/ability_manager_stub_mock_test.h index d6ffbfbcb2..bfd53331f6 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_client_test/ability_manager_stub_mock_test.h +++ b/services/abilitymgr/test/unittest/phone/ability_manager_client_test/ability_manager_stub_mock_test.h @@ -205,7 +205,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn index ed56600c45..17d6077a8e 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn @@ -22,13 +22,13 @@ ohos_unittest("ability_manager_proxy_test") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/ability_scheduler_mock", - "${ability_runtime_path}/services/common/include", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", + "${ability_runtime_services_path}/common/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_manager_proxy_test.cpp", ] @@ -41,16 +41,13 @@ ohos_unittest("ability_manager_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - - # "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -60,6 +57,7 @@ ohos_unittest("ability_manager_proxy_test") { external_deps = [ "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/ability_manager_stub_mock.h b/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/ability_manager_stub_mock.h index f7d4e7001d..9485a42156 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/ability_manager_stub_mock.h +++ b/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/ability_manager_stub_mock.h @@ -211,7 +211,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_service_account_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_service_account_test/BUILD.gn index 1fcd74efa0..f9554affd8 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_service_account_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_service_account_test/BUILD.gn @@ -23,14 +23,13 @@ ohos_unittest("ability_manager_service_account_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", - "//base/account/os_account/interfaces/innerkits/osaccount/native/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_manager_service_account_test.cpp", ] @@ -40,32 +39,26 @@ ohos_unittest("ability_manager_service_account_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "ability_base:zuri", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/BUILD.gn index dc8d7d386c..4459ba216f 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/BUILD.gn @@ -24,8 +24,8 @@ ohos_unittest("ability_manager_service_anr_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/arkui_mock", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/distributedschedule/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", "//base/notification/common_event_service/frameworks/core/include", "//base/notification/common_event_service/interfaces/inner_api", ] @@ -43,9 +43,9 @@ ohos_unittest("ability_manager_service_anr_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/ability_manager_service_anr_test.cpp b/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/ability_manager_service_anr_test.cpp index 8e9f9849a4..2fe14caf3d 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/ability_manager_service_anr_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_manager_service_anr_test/ability_manager_service_anr_test.cpp @@ -66,12 +66,9 @@ static void WaitUntilTaskFinished() } } -namespace { -const std::string WaitUntilTaskFinishedByTimer = "BundleMgrService"; -} // namespace - class AbilityManagerServiceAnrTest : public testing::Test { public: + static void SetUpTestCase(); static void TearDownTestCase(); void SetUp(); void TearDown(); @@ -80,8 +77,6 @@ public: static constexpr int TEST_WAIT_TIME = 100000; public: - AbilityRequest abilityRequest_; - std::shared_ptr abilityRecord_ {nullptr}; std::shared_ptr abilityMs_ = DelayedSingleton::GetInstance(); }; @@ -110,6 +105,15 @@ void AbilityManagerServiceAnrTest::OnStartAms() abilityMs_->pendingWantManager_ = std::make_shared(); EXPECT_TRUE(abilityMs_->pendingWantManager_); +#ifdef SUPPORT_GRAPHICS + auto deviceType = abilityMs_->amsConfigResolver_->GetDeviceType(); + abilityMs_->sysDialogScheduler_ = std::make_shared(deviceType); +#endif + + auto timeout = abilityMs_->amsConfigResolver_->GetANRTimeOutTime(); + abilityMs_->anrDisposer_ = std::make_shared(timeout); + EXPECT_TRUE(abilityMs_->anrDisposer_); + abilityMs_->eventLoop_->Run(); return; } @@ -122,9 +126,16 @@ void AbilityManagerServiceAnrTest::OnStopAms() abilityMs_->OnStop(); } +void AbilityManagerServiceAnrTest::SetUpTestCase() +{ + OHOS::DelayedSingleton::GetInstance()->RegisterSystemAbility( + OHOS::BUNDLE_MGR_SERVICE_SYS_ABILITY_ID, new BundleMgrService()); +} + void AbilityManagerServiceAnrTest::TearDownTestCase() { OHOS::DelayedSingleton::DestroyInstance(); + OHOS::DelayedSingleton::DestroyInstance(); } void AbilityManagerServiceAnrTest::SetUp() @@ -155,9 +166,10 @@ HWTEST_F(AbilityManagerServiceAnrTest, SendANRProcessID_001, TestSize.Level1) } } else { - Ace::UIServiceMgrClientMock::GetInstance()->SetDialogCheckState(pid, EVENT_CLOSE_CODE); + Ace::UIServiceMgrClient::GetInstance()->SetDialogCheckState(pid, EVENT_CLOSE_CODE); auto result = abilityMs_->SendANRProcessID(pid); sleep(6); + EXPECT_FALSE(Ace::UIServiceMgrClient::GetInstance()->GetAppRunningState()); result = kill(pid, SIGKILL); EXPECT_EQ(result, -1); } @@ -177,14 +189,18 @@ HWTEST_F(AbilityManagerServiceAnrTest, SendANRProcessID_002, TestSize.Level1) pid_t pid; if ((pid=fork()) == 0) { for (;;) { + GTEST_LOG_(INFO) << "sub process"; + usleep(500); } } else { - Ace::UIServiceMgrClientMock::GetInstance()->SetDialogCheckState(pid, EVENT_WAITING_CODE); + Ace::UIServiceMgrClient::GetInstance()->SetDialogCheckState(pid, EVENT_WAITING_CODE); auto result = abilityMs_->SendANRProcessID(pid); - sleep(6); - result = kill(pid, SIGKILL); EXPECT_EQ(result, 0); + sleep(6); + EXPECT_TRUE(Ace::UIServiceMgrClient::GetInstance()->GetAppRunningState()); + (void)kill(pid, SIGKILL); + GTEST_LOG_(INFO) << "process kill result " << errno; } } } diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn index cf88b1a584..133b5dcd0e 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn @@ -23,12 +23,12 @@ ohos_unittest("ability_manager_stub_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/utils/native/include/", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_manager_stub_test.cpp", ] @@ -41,15 +41,13 @@ ohos_unittest("ability_manager_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -59,6 +57,7 @@ ohos_unittest("ability_manager_stub_test") { external_deps = [ "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h index 1ecb45bd96..2af160c590 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h +++ b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/ability_manager_stub_impl_mock.h @@ -283,7 +283,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_test/ability_manager_stub_mock.h b/services/abilitymgr/test/unittest/phone/ability_manager_test/ability_manager_stub_mock.h index e804f9e13b..a7cec18511 100644 --- a/services/abilitymgr/test/unittest/phone/ability_manager_test/ability_manager_stub_mock.h +++ b/services/abilitymgr/test/unittest/phone/ability_manager_test/ability_manager_stub_mock.h @@ -120,7 +120,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/services/abilitymgr/test/unittest/phone/ability_record_dump_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_record_dump_test/BUILD.gn index 23a1a2072a..6f3e4062a7 100644 --- a/services/abilitymgr/test/unittest/phone/ability_record_dump_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_record_dump_test/BUILD.gn @@ -21,10 +21,10 @@ ohos_unittest("ability_record_dump_test") { sources = [ "ability_record_dump_test.cpp" ] - configs = [ "${ability_runtime_path}/services/abilitymgr:abilityms_config" ] + configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] deps = [ - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gtest_main", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn index ef30d76911..9d49d1d919 100644 --- a/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("ability_record_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_record_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("ability_record_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,7 +54,9 @@ ohos_unittest("ability_record_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -71,12 +71,12 @@ ohos_unittest("ability_record_test_call") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/ability_scheduler_mock", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_record_test_call.cpp", # add mock file ] @@ -89,15 +89,13 @@ ohos_unittest("ability_record_test_call") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -108,7 +106,9 @@ ohos_unittest("ability_record_test_call") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn index 22a75c5778..a16d6ffccc 100644 --- a/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn @@ -22,11 +22,11 @@ ohos_unittest("ability_scheduler_proxy_test") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/ability_scheduler_mock", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_scheduler_proxy_test.cpp", ] @@ -39,16 +39,13 @@ ohos_unittest("ability_scheduler_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - - # "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -59,6 +56,7 @@ ohos_unittest("ability_scheduler_proxy_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn index 8f26cdb278..8ba2ff2eda 100644 --- a/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("ability_scheduler_stub_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_scheduler_stub_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("ability_scheduler_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("ability_scheduler_stub_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn index 649433d950..01c8b80723 100644 --- a/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("ability_service_start_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_service_start_test.cpp", # add mock file ] @@ -39,15 +39,13 @@ ohos_unittest("ability_service_start_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -59,6 +57,7 @@ ohos_unittest("ability_service_start_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_timeout_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_timeout_test/BUILD.gn index 88e4e4b47e..0c80e36951 100644 --- a/services/abilitymgr/test/unittest/phone/ability_timeout_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_timeout_test/BUILD.gn @@ -23,13 +23,13 @@ ohos_unittest("ability_timeout_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_timeout_test.cpp", ] @@ -39,16 +39,14 @@ ohos_unittest("ability_timeout_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -61,6 +59,7 @@ ohos_unittest("ability_timeout_test") { "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_timeout_test/ability_timeout_test.cpp b/services/abilitymgr/test/unittest/phone/ability_timeout_test/ability_timeout_test.cpp index e0ff10bd19..b7ae92a8b2 100644 --- a/services/abilitymgr/test/unittest/phone/ability_timeout_test/ability_timeout_test.cpp +++ b/services/abilitymgr/test/unittest/phone/ability_timeout_test/ability_timeout_test.cpp @@ -279,7 +279,7 @@ HWTEST_F(AbilityTimeoutTest, OnAbilityDied_002, TestSize.Level1) EXPECT_TRUE(lauList->GetAbilityRecordByToken(abilityRecord->GetToken()) != nullptr); EXPECT_TRUE(abilityRecord->IsRestarting()); - EXPECT_TRUE(abilityRecord->restartCount_ < abilityRecord->restratMax_); + EXPECT_TRUE(abilityRecord->restartCount_ < abilityRecord->restartMax_); } /* @@ -320,7 +320,7 @@ HWTEST_F(AbilityTimeoutTest, HandleLoadTimeOut_001, TestSize.Level1) EXPECT_TRUE(lauList->GetAbilityRecordByToken(abilityRecord->GetToken()) != nullptr); EXPECT_TRUE(abilityRecord->IsRestarting()); - EXPECT_TRUE(abilityRecord->restartCount_ < abilityRecord->restratMax_); + EXPECT_TRUE(abilityRecord->restartCount_ < abilityRecord->restartMax_); } /* diff --git a/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn index 5f5d1befe0..6c2648e614 100644 --- a/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("ability_token_proxy_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_token_proxy_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("ability_token_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("ability_token_proxy_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn index c71723925d..39870e0637 100644 --- a/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("ability_token_stub_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "ability_token_stub_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("ability_token_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("ability_token_stub_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn index 41e86b9339..d8a59ee2d9 100644 --- a/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn @@ -28,7 +28,7 @@ ohos_unittest("app_scheduler_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/src/app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/src/app_scheduler.cpp", "app_scheduler_test.cpp", ] @@ -42,14 +42,12 @@ ohos_unittest("app_scheduler_test") { } deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -61,6 +59,7 @@ ohos_unittest("app_scheduler_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp b/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp index e5e5029320..30b2616692 100644 --- a/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp +++ b/services/abilitymgr/test/unittest/phone/app_scheduler_test/app_scheduler_test.cpp @@ -230,9 +230,9 @@ HWTEST_F(AppSchedulerTest, AppScheduler_oprator_007, TestSize.Level1) /* * Feature: AppScheduler - * Function: MoveToForground + * Function: MoveToForeground * SubFunction: NA - * FunctionPoints: AppScheduler MoveToForground + * FunctionPoints: AppScheduler MoveToForeground * EnvConditions:NA * CaseDescription: Verify appmgrclient_ Is null causes movetoforground to be invalid */ @@ -248,14 +248,14 @@ HWTEST_F(AppSchedulerTest, AppScheduler_oprator_008, TestSize.Level1) auto record = AbilityRecord::CreateAbilityRecord(abilityReq); auto token = record->GetToken(); - DelayedSingleton::GetInstance()->MoveToForground(token); + DelayedSingleton::GetInstance()->MoveToForeground(token); } /* * Feature: AppScheduler - * Function: MoveToForground + * Function: MoveToForeground * SubFunction: NA - * FunctionPoints: AppScheduler MoveToForground + * FunctionPoints: AppScheduler MoveToForeground * EnvConditions:NA * CaseDescription: Verify the normal process of movetoforground */ @@ -271,7 +271,7 @@ HWTEST_F(AppSchedulerTest, AppScheduler_oprator_009, TestSize.Level1) auto record = AbilityRecord::CreateAbilityRecord(abilityReq); auto token = record->GetToken(); - DelayedSingleton::GetInstance()->MoveToForground(token); + DelayedSingleton::GetInstance()->MoveToForeground(token); } /* diff --git a/services/abilitymgr/test/unittest/phone/call_container_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/call_container_test/BUILD.gn index 8e243d53a5..378faa2f84 100644 --- a/services/abilitymgr/test/unittest/phone/call_container_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/call_container_test/BUILD.gn @@ -21,13 +21,12 @@ ohos_unittest("call_container_test") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/ability_scheduler_mock", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "call_container_test.cpp", ] @@ -37,13 +36,12 @@ ohos_unittest("call_container_test") { ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -54,6 +52,7 @@ ohos_unittest("call_container_test") { "ability_base:want", "ability_base:zuri", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn index dedf22c12b..0655572b07 100644 --- a/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn @@ -22,12 +22,12 @@ ohos_unittest("configuration_test") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/ability_scheduler_mock", - "${ability_runtime_path}/services/abilitymgr/test/mock/include", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", + "${ability_runtime_services_path}/abilitymgr/test/mock/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "configuration_test.cpp", # add mock file ] @@ -40,15 +40,13 @@ ohos_unittest("configuration_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -61,6 +59,7 @@ ohos_unittest("configuration_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn index 34b8dddd81..277c61bc6f 100644 --- a/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("connection_record_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "connection_record_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("connection_record_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -57,6 +55,7 @@ ohos_unittest("connection_record_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn index ce5cadfe7c..a9317d2915 100644 --- a/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn @@ -24,15 +24,13 @@ ohos_unittest("data_ability_manager_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - - # "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_services_path}/common/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/src/app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/src/app_scheduler.cpp", "data_ability_manager_test.cpp", # add mock file ] @@ -47,14 +45,11 @@ ohos_unittest("data_ability_manager_test") { } deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/common:perm_verification", - - #"${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -66,6 +61,7 @@ ohos_unittest("data_ability_manager_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn index 37c6182692..354d524b4b 100644 --- a/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn @@ -23,14 +23,13 @@ ohos_unittest("data_ability_record_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include", + "${ability_runtime_services_path}/common/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "data_ability_record_test.cpp", # add mock file ] @@ -44,16 +43,13 @@ ohos_unittest("data_ability_record_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - - #"${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -64,6 +60,8 @@ ohos_unittest("data_ability_record_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn index fb5380503a..7751db9d8d 100644 --- a/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn @@ -22,11 +22,11 @@ ohos_unittest("lifecycle_deal_test") { include_dirs = [ "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/ability_scheduler_mock", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/ability_scheduler_mock", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "lifecycle_deal_test.cpp", # add mock file ] @@ -39,15 +39,13 @@ ohos_unittest("lifecycle_deal_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -60,6 +58,7 @@ ohos_unittest("lifecycle_deal_test") { "ability_runtime:app_manager", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn index 851bb40779..9e341fefe9 100644 --- a/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("lifecycle_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "lifecycle_test.cpp", # add mock file ] @@ -39,15 +39,13 @@ ohos_unittest("lifecycle_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -59,6 +57,7 @@ ohos_unittest("lifecycle_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_list_dump_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_list_dump_test/BUILD.gn index c3cf0d7210..b1a67ae5cd 100644 --- a/services/abilitymgr/test/unittest/phone/mission_list_dump_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_list_dump_test/BUILD.gn @@ -21,9 +21,9 @@ ohos_unittest("mission_list_dump_test") { sources = [ "mission_list_dump_test.cpp" ] - configs = [ "${ability_runtime_path}/services/abilitymgr:abilityms_config" ] + configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] - deps = [ "${ability_runtime_path}/services/abilitymgr:abilityms" ] + deps = [ "${ability_runtime_services_path}/abilitymgr:abilityms" ] external_deps = [ "ability_base:want", diff --git a/services/abilitymgr/test/unittest/phone/mission_list_manager_dump_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_list_manager_dump_test/BUILD.gn index 811d665c90..05d629760e 100644 --- a/services/abilitymgr/test/unittest/phone/mission_list_manager_dump_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_list_manager_dump_test/BUILD.gn @@ -21,10 +21,10 @@ ohos_unittest("mission_list_manager_dump_test") { sources = [ "mission_list_manager_dump_test.cpp" ] - configs = [ "${ability_runtime_path}/services/abilitymgr:abilityms_config" ] + configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] deps = [ - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gtest_main", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_list_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_list_manager_test/BUILD.gn index cc43da9bb0..85b6007a6f 100644 --- a/services/abilitymgr/test/unittest/phone/mission_list_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_list_manager_test/BUILD.gn @@ -25,8 +25,8 @@ ohos_unittest("mission_list_manager_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", - "${ability_runtime_path}/services/common/src/permission_verification.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/common/src/permission_verification.cpp", "mission_list_manager_test.cpp", # add mock file ] @@ -39,14 +39,12 @@ ohos_unittest("mission_list_manager_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("mission_list_manager_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_list_manager_test/mission_list_manager_test.cpp b/services/abilitymgr/test/unittest/phone/mission_list_manager_test/mission_list_manager_test.cpp index b0fc8a5b9e..1742355485 100644 --- a/services/abilitymgr/test/unittest/phone/mission_list_manager_test/mission_list_manager_test.cpp +++ b/services/abilitymgr/test/unittest/phone/mission_list_manager_test/mission_list_manager_test.cpp @@ -210,7 +210,7 @@ HWTEST_F(MissionListManagerTest, OnAcceptWantResponse_001, TestSize.Level1) AbilityRequest abilityRequest; abilityRequest.callerToken = ability->GetToken(); - missionListManager->EnqueueWaittingAbility(abilityRequest); + missionListManager->EnqueueWaitingAbility(abilityRequest); missionListManager->defaultStandardList_->AddMissionToTop(mission); missionListManager->OnAcceptWantResponse(want, "flag"); diff --git a/services/abilitymgr/test/unittest/phone/mission_list_manager_ut_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_list_manager_ut_test/BUILD.gn index 1b2f6d860e..17be435734 100644 --- a/services/abilitymgr/test/unittest/phone/mission_list_manager_ut_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_list_manager_ut_test/BUILD.gn @@ -37,15 +37,13 @@ ohos_unittest("mission_list_manager_ut_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -57,6 +55,7 @@ ohos_unittest("mission_list_manager_ut_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn index 89e8d6df9a..624e4d6eaa 100644 --- a/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("mission_list_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "mission_list_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("mission_list_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("mission_list_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] @@ -77,12 +76,10 @@ ohos_unittest("mission_list_test_call") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", ] @@ -90,6 +87,8 @@ ohos_unittest("mission_list_test_call") { external_deps = [ "ability_base:want", "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn index 0449f93494..0fedb0afa7 100644 --- a/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("mission_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "mission_test.cpp", # add mock file ] @@ -38,15 +38,13 @@ ohos_unittest("mission_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("mission_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn index dff65749d2..5fbaefd36d 100644 --- a/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn @@ -20,27 +20,25 @@ ohos_unittest("pending_want_key_test") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${ability_base_innerapi_path}/want/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "pending_want_key_test.cpp", # add mock file ] configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -51,6 +49,7 @@ ohos_unittest("pending_want_key_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_manager_dump_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_manager_dump_test/BUILD.gn index da74d0b172..ae885f33f0 100644 --- a/services/abilitymgr/test/unittest/phone/pending_want_manager_dump_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_manager_dump_test/BUILD.gn @@ -21,11 +21,11 @@ ohos_unittest("pending_want_manager_dump_test") { sources = [ "pending_want_manager_dump_test.cpp" ] - configs = [ "${ability_runtime_path}/services/abilitymgr:abilityms_config" ] + configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gtest_main", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn index 6825a563af..d2afa72b80 100644 --- a/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("pending_want_manager_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "pending_want_manager_test.cpp", # add mock file ] @@ -36,15 +36,13 @@ ohos_unittest("pending_want_manager_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -56,6 +54,7 @@ ohos_unittest("pending_want_manager_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn index 65e48c0e5c..cf977c6c67 100644 --- a/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("pending_want_record_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "pending_want_record_test.cpp", # add mock file ] @@ -36,15 +36,13 @@ ohos_unittest("pending_want_record_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -56,6 +54,7 @@ ohos_unittest("pending_want_record_test") { "ability_base:zuri", "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/running_infos_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/running_infos_test/BUILD.gn index ebecc9eb2c..c38d2ff7f8 100644 --- a/services/abilitymgr/test/unittest/phone/running_infos_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/running_infos_test/BUILD.gn @@ -23,13 +23,13 @@ ohos_unittest("running_infos_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "running_infos_test.cpp", ] @@ -39,16 +39,14 @@ ohos_unittest("running_infos_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -60,6 +58,7 @@ ohos_unittest("running_infos_test") { "ability_base:zuri", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn index c18667d7cb..747eae8354 100644 --- a/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("sender_info_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "sender_info_test.cpp", # add mock file ] @@ -36,15 +36,13 @@ ohos_unittest("sender_info_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -55,6 +53,7 @@ ohos_unittest("sender_info_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/specified_mission_list_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/specified_mission_list_test/BUILD.gn index ed6b22f17b..ea70c17546 100644 --- a/services/abilitymgr/test/unittest/phone/specified_mission_list_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/specified_mission_list_test/BUILD.gn @@ -25,8 +25,8 @@ ohos_unittest("specified_mission_list_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", - "${ability_runtime_path}/services/common/src/permission_verification.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/common/src/permission_verification.cpp", "specified_mission_list_test.cpp", # add mock file ] @@ -39,14 +39,12 @@ ohos_unittest("specified_mission_list_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", "//utils/native/base:utils", @@ -56,6 +54,7 @@ ohos_unittest("specified_mission_list_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/start_option_display_id_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/start_option_display_id_test/BUILD.gn index 672adc1034..3a891bc148 100644 --- a/services/abilitymgr/test/unittest/phone/start_option_display_id_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/start_option_display_id_test/BUILD.gn @@ -23,15 +23,13 @@ ohos_unittest("start_option_display_id_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", - "${ability_runtime_path}/services/common/src/permission_verification.cpp", - "//foundation/distributedhardware/device_manager/test/unittest/mock/parameter.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "start_option_display_id_test.cpp", ] @@ -41,15 +39,13 @@ ohos_unittest("start_option_display_id_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -62,6 +58,7 @@ ohos_unittest("start_option_display_id_test") { "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn index 021f95b5c6..4871702e05 100644 --- a/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("want_receiver_proxy_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "want_receiver_proxy_test.cpp", ] @@ -38,15 +38,13 @@ ohos_unittest("want_receiver_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -56,6 +54,7 @@ ohos_unittest("want_receiver_proxy_test") { external_deps = [ "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn index 9baaa32e50..c739f7eb00 100644 --- a/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("want_receiver_stub_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "want_receiver_stub_test.cpp", ] @@ -39,15 +39,13 @@ ohos_unittest("want_receiver_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -57,6 +55,7 @@ ohos_unittest("want_receiver_stub_test") { external_deps = [ "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn index efe59b66df..75906c57aa 100644 --- a/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("want_sender_info_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "want_sender_info_test.cpp", ] @@ -36,15 +36,13 @@ ohos_unittest("want_sender_info_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -55,6 +53,7 @@ ohos_unittest("want_sender_info_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn index a50e9a00e1..d7a9024354 100644 --- a/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn @@ -25,7 +25,7 @@ ohos_unittest("want_sender_proxy_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "want_sender_proxy_test.cpp", ] @@ -38,15 +38,13 @@ ohos_unittest("want_sender_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -56,6 +54,7 @@ ohos_unittest("want_sender_proxy_test") { external_deps = [ "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn index a45772df58..b37a1ca990 100644 --- a/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn @@ -26,7 +26,7 @@ ohos_unittest("want_sender_stub_test") { ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "want_sender_stub_test.cpp", ] @@ -39,15 +39,13 @@ ohos_unittest("want_sender_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -57,6 +55,7 @@ ohos_unittest("want_sender_stub_test") { external_deps = [ "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn index 0f509db2c6..384a5b9520 100644 --- a/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn @@ -23,11 +23,10 @@ ohos_unittest("wants_info_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "wants_info_test.cpp", ] @@ -37,15 +36,13 @@ ohos_unittest("wants_info_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -56,6 +53,7 @@ ohos_unittest("wants_info_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/appmgr/BUILD.gn b/services/appmgr/BUILD.gn index ae72c74b1f..ad08776730 100644 --- a/services/appmgr/BUILD.gn +++ b/services/appmgr/BUILD.gn @@ -19,7 +19,7 @@ config("appmgr_config") { "include", "${ability_base_innerapi_path}/configuration/include", "${ability_runtime_services_path}/common/include", - "//base/startup/appspawn/interfaces/innerkits/include", + "${appspawn_path}/interfaces/innerkits/include", "${ability_runtime_path}/tools/aa/include", ] } @@ -76,7 +76,6 @@ ohos_shared_library("libappms") { "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", - "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hicollie_native:libhicollie", diff --git a/services/appmgr/include/ams_mgr_scheduler.h b/services/appmgr/include/ams_mgr_scheduler.h index 156d55358f..5d306fb82b 100644 --- a/services/appmgr/include/ams_mgr_scheduler.h +++ b/services/appmgr/include/ams_mgr_scheduler.h @@ -57,7 +57,7 @@ public: * TerminateAbility, call TerminateAbility() through the proxy object, terminate the token ability. * * @param token, token, he unique identification to terminate the ability. - * @param clearMissionFlag, indicates whether terminate the ability when clearMision. + * @param clearMissionFlag, indicates whether terminate the ability when clearMission. * @return */ virtual void TerminateAbility(const sptr &token, bool clearMissionFlag) override; diff --git a/services/appmgr/include/app_mgr_service_inner.h b/services/appmgr/include/app_mgr_service_inner.h index b6368d7c53..1d9b3bb650 100644 --- a/services/appmgr/include/app_mgr_service_inner.h +++ b/services/appmgr/include/app_mgr_service_inner.h @@ -78,7 +78,7 @@ public: * TerminateAbility, terminate the token ability. * * @param token, he unique identification to terminate the ability. - * @param clearMissionFlag, indicates whether terminate the ability when clearMision. + * @param clearMissionFlag, indicates whether terminate the ability when clearMission. * @return */ virtual void TerminateAbility(const sptr &token, bool clearMissionFlag); @@ -271,30 +271,30 @@ public: void OnStop(); /** - * OpenAppSpawnConnection, Open connection with appspwan. + * OpenAppSpawnConnection, Open connection with appspawn. * * @return ERR_OK ,return back success,others fail. */ virtual ErrCode OpenAppSpawnConnection(); /** - * CloseAppSpawnConnection, Close connection with appspwan. + * CloseAppSpawnConnection, Close connection with appspawn. * * @return */ virtual void CloseAppSpawnConnection() const; /** - * QueryAppSpawnConnectionState, Query the connection status with appspwan. + * QueryAppSpawnConnectionState, Query the connection status with appspawn. * - * @return Returns the connection status with appspwan. + * @return Returns the connection status with appspawn. */ virtual SpawnConnectionState QueryAppSpawnConnectionState() const; /** - * SetAppSpawnClient, Setting the client to connect with appspwan. + * SetAppSpawnClient, Setting the client to connect with appspawn. * - * @param spawnClient, the client to connect with appspwan. + * @param spawnClient, the client to connect with appspawn. * * @return */ @@ -538,7 +538,7 @@ private: bool CheckLoadabilityConditions(const sptr &token, const std::shared_ptr &abilityInfo, const std::shared_ptr &appInfo); - bool GetBundleInfo(const std::string &bundelName, BundleInfo &bundleInfo); + bool GetBundleInfo(const std::string &bundleName, BundleInfo &bundleInfo); void MakeProcessName(std::string &processName, const std::shared_ptr &abilityInfo, const std::shared_ptr &appInfo, HapModuleInfo &hapModuleInfo); @@ -682,7 +682,7 @@ private: void HandleAddAbilityStageTimeOut(const int64_t eventId); - void ClipStringContent(const std::regex &re, const std::string &sorce, std::string &afferCutStr); + void ClipStringContent(const std::regex &re, const std::string &source, std::string &afterCutStr); bool GetBundleAndHapInfo(const AbilityInfo &abilityInfo, const std::shared_ptr &appInfo, BundleInfo &bundleInfo, HapModuleInfo &hapModuleInfo); diff --git a/services/appmgr/include/app_running_manager.h b/services/appmgr/include/app_running_manager.h index c05d2082ab..61151b6c48 100644 --- a/services/appmgr/include/app_running_manager.h +++ b/services/appmgr/include/app_running_manager.h @@ -146,7 +146,7 @@ public: void GetRunningProcessInfoByToken(const sptr &token, AppExecFwk::RunningProcessInfo &info); - void ClipStringContent(const std::regex &re, const std::string &sorce, std::string &afferCutStr); + void ClipStringContent(const std::regex &re, const std::string &source, std::string &afterCutStr); void HandleAddAbilityStageTimeOut(const int64_t eventId); void HandleStartSpecifiedAbilityTimeOut(const int64_t eventId); std::shared_ptr GetAppRunningRecordByRenderPid(const pid_t pid); diff --git a/services/appmgr/include/app_running_record.h b/services/appmgr/include/app_running_record.h index a33b301f11..19b9006525 100644 --- a/services/appmgr/include/app_running_record.h +++ b/services/appmgr/include/app_running_record.h @@ -494,17 +494,6 @@ public: void SetKilling(); bool IsKilling() const; - /** - * Set whether the application is a native application. Determine whether the application is a native application - * by whether the first ability is a native ability. Apps that are packaged with native ability and - * non-native ability are not supported. - * - * @param isNativeApplication Indicates whether it is a native application. - */ - inline void SetNativeApplicatonTag(bool isNativeApplication) - { - isNativeApplication_ = isNativeApplication; - } private: /** * SearchTheModuleInfoNeedToUpdated, Get an uninitialized abilitystage data. @@ -585,7 +574,6 @@ private: std::shared_ptr userTestRecord_ = nullptr; bool isKilling_ = false; - bool isNativeApplication_ = false; // render record std::shared_ptr renderRecord_ = nullptr; diff --git a/services/appmgr/src/app_mgr_service.cpp b/services/appmgr/src/app_mgr_service.cpp index cc50b991a1..75000ae6e2 100644 --- a/services/appmgr/src/app_mgr_service.cpp +++ b/services/appmgr/src/app_mgr_service.cpp @@ -498,7 +498,7 @@ int AppMgrService::BlockAppService() } auto task = [=]() { while (1) { - HILOG_DEBUG("%{public}s begain block app service", __func__); + HILOG_DEBUG("%{public}s begin block app service", __func__); std::this_thread::sleep_for(APP_MS_BLOCK*1s); } }; diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index a12c6527e8..f64a1021e5 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -161,7 +161,6 @@ void AppMgrServiceInner::LoadAbility(const sptr &token, const spt HILOG_ERROR("CreateAppRunningRecord failed, appRecord is nullptr"); return; } - appRecord->SetNativeApplicatonTag(abilityInfo->isNativeAbility); uint32_t startFlags = (want == nullptr) ? 0 : BuildStartFlags(*want, *abilityInfo); StartProcess(abilityInfo->applicationName, processName, startFlags, appRecord, appInfo->uid, appInfo->bundleName); @@ -2176,8 +2175,8 @@ void AppMgrServiceInner::SendHiSysEvent(const int32_t innerEventId, const int64_ } std::string eventName = EVENT_NAME_LIFECYCLE_TIMEOUT; - std::string pidStr = std::to_string(appRecord->GetPriorityObject()->GetPid()); - std::string uidStr = std::to_string(appRecord->GetUid()); + int32_t pid = appRecord->GetPriorityObject()->GetPid(); + int32_t uid = appRecord->GetUid(); std::string packageName = appRecord->GetBundleName(); std::string processName = appRecord->GetProcessName(); std::string msg; @@ -2202,11 +2201,11 @@ void AppMgrServiceInner::SendHiSysEvent(const int32_t innerEventId, const int64_ break; } - HILOG_DEBUG("SendHiSysEvent, eventName = %{public}s, uidStr = %{public}s, pidStr = %{public}s, \ + HILOG_DEBUG("SendHiSysEvent, eventName = %{public}s, uid = %{public}d, pid = %{public}d, \ packageName = %{public}s, processName = %{public}s, msg = %{public}s", eventName.c_str(), - uidStr.c_str(), - pidStr.c_str(), + uid, + pid, packageName.c_str(), processName.c_str(), msg.c_str()); @@ -2215,8 +2214,8 @@ void AppMgrServiceInner::SendHiSysEvent(const int32_t innerEventId, const int64_ OHOS::HiviewDFX::HiSysEvent::Domain::AAFWK, eventName, OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, - EVENT_KEY_PID, pidStr, - EVENT_KEY_UID, uidStr, + EVENT_KEY_PID, pid, + EVENT_KEY_UID, uid, EVENT_KEY_PACKAGE_NAME, packageName, EVENT_KEY_PROCESS_NAME, processName, EVENT_KEY_MESSAGE, msg); diff --git a/services/appmgr/src/app_running_manager.cpp b/services/appmgr/src/app_running_manager.cpp index ee989a4217..f4f3afe245 100644 --- a/services/appmgr/src/app_running_manager.cpp +++ b/services/appmgr/src/app_running_manager.cpp @@ -380,6 +380,7 @@ void AppRunningManager::TerminateAbility(const sptr &token, bool HILOG_ERROR("appRecord is nullptr."); return; } + appRecord->TerminateAbility(token, false); if (appRecord->IsLastAbilityRecord(token) && !appRecord->IsKeepAliveApp()) { HILOG_INFO("The ability is the last in the app:%{public}s.", appRecord->GetName().c_str()); @@ -391,8 +392,6 @@ void AppRunningManager::TerminateAbility(const sptr &token, bool EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_RESTARTED); } } - - appRecord->TerminateAbility(token, false); } void AppRunningManager::GetRunningProcessInfoByToken( @@ -411,11 +410,11 @@ void AppRunningManager::GetRunningProcessInfoByToken( info.bundleNames.emplace_back(appRecord->GetBundleName()); } -void AppRunningManager::ClipStringContent(const std::regex &re, const std::string &sorce, std::string &afferCutStr) +void AppRunningManager::ClipStringContent(const std::regex &re, const std::string &source, std::string &afterCutStr) { std::smatch basket; - if (std::regex_search(sorce, basket, re)) { - afferCutStr = basket.prefix().str() + basket.suffix().str(); + if (std::regex_search(source, basket, re)) { + afterCutStr = basket.prefix().str() + basket.suffix().str(); } } diff --git a/services/appmgr/src/app_running_record.cpp b/services/appmgr/src/app_running_record.cpp index 11ace694b8..c8c4e1990f 100644 --- a/services/appmgr/src/app_running_record.cpp +++ b/services/appmgr/src/app_running_record.cpp @@ -328,7 +328,6 @@ void AppRunningRecord::LaunchApplication(const Configuration &config) launchData.SetRecordId(appRecordId_); launchData.SetUId(mainUid_); launchData.SetUserTestInfo(userTestRecord_); - launchData.SetNativeApplicatonTag(isNativeApplication_); HILOG_INFO("Schedule launch application, app is %{public}s.", GetName().c_str()); appLifeCycleDeal_->LaunchApplication(launchData, config); } diff --git a/services/appmgr/test/BUILD.gn b/services/appmgr/test/BUILD.gn index 3816d043a4..449401fca9 100644 --- a/services/appmgr/test/BUILD.gn +++ b/services/appmgr/test/BUILD.gn @@ -17,10 +17,8 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") config("appmgr_test_config") { configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", - "${ability_runtime_path}/services/test:services_mock_ams_config", - "${bundlefwk_inner_api_path}/appexecfwk_core:bundlemgr_sdk_config", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", + "${ability_runtime_services_path}/test:services_mock_ams_config", ] defines = [ @@ -30,9 +28,7 @@ config("appmgr_test_config") { include_dirs = [ "${ability_runtime_services_path}/appmgr/test/mock/include", - "//base/account/os_account/interfaces/innerkits/osaccount/native/include", "${global_path}/i18n/frameworks/intl/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include", ] } @@ -40,21 +36,21 @@ ohos_source_set("appmgr_test_source") { testonly = true sources = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_launch_data.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_mgr_proxy.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_mgr_stub.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_process_data.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_record_id.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_scheduler_host.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_scheduler_proxy.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_state_callback_host.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_state_callback_proxy.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/app_task_info.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/process_info.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/profile.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/render_scheduler_host.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/render_scheduler_proxy.cpp", - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/running_process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_launch_data.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_mgr_proxy.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_mgr_stub.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_process_data.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_record_id.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_scheduler_host.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_scheduler_proxy.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_state_callback_host.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_state_callback_proxy.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_task_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/process_info.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/profile.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/render_scheduler_host.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/render_scheduler_proxy.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/running_process_info.cpp", ] include_dirs = [ "//third_party/json/include" ] @@ -74,10 +70,7 @@ ohos_source_set("appmgr_test_source") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_services_path}/common:event_report", - "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", ] diff --git a/services/appmgr/test/unittest/ams_ability_running_record_test/BUILD.gn b/services/appmgr/test/unittest/ams_ability_running_record_test/BUILD.gn index ab28a61fae..0fc26237c4 100644 --- a/services/appmgr/test/unittest/ams_ability_running_record_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_ability_running_record_test/BUILD.gn @@ -21,13 +21,10 @@ ohos_unittest("AmsAbilityRunningRecordTest") { cflags_cc = [] include_dirs = [ "${ability_base_innerapi_path}/want/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/inclide", + "${ability_runtime_innerkits_path}/app_manager/inclide", "${ability_base_innerapi_path}/uri/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -50,19 +47,14 @@ ohos_unittest("AmsAbilityRunningRecordTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", diff --git a/services/appmgr/test/unittest/ams_app_death_recipient_test/BUILD.gn b/services/appmgr/test/unittest/ams_app_death_recipient_test/BUILD.gn index a5e40d5fb4..a06b33b163 100644 --- a/services/appmgr/test/unittest/ams_app_death_recipient_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_death_recipient_test/BUILD.gn @@ -37,10 +37,7 @@ ohos_unittest("AppDeathRecipientTest") { "${ability_runtime_services_path}/appmgr/test/mock/src/mock_bundle_manager.cpp", ] - include_dirs = [ - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - ] + include_dirs = [] sources += [ "ams_app_death_recipient_test.cpp" ] @@ -51,22 +48,15 @@ ohos_unittest("AppDeathRecipientTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:configuration", "ability_base:want", @@ -74,6 +64,7 @@ ohos_unittest("AppDeathRecipientTest") { "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", diff --git a/services/appmgr/test/unittest/ams_app_life_cycle_test/BUILD.gn b/services/appmgr/test/unittest/ams_app_life_cycle_test/BUILD.gn index 17650c772b..3600a4f892 100644 --- a/services/appmgr/test/unittest/ams_app_life_cycle_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_life_cycle_test/BUILD.gn @@ -22,8 +22,6 @@ ohos_unittest("AmsAppLifeCycleTest") { include_dirs = [ "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -51,26 +49,20 @@ ohos_unittest("AmsAppLifeCycleTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", diff --git a/services/appmgr/test/unittest/ams_app_mgr_client_test/BUILD.gn b/services/appmgr/test/unittest/ams_app_mgr_client_test/BUILD.gn index e514573372..eaf07b2a59 100644 --- a/services/appmgr/test/unittest/ams_app_mgr_client_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_mgr_client_test/BUILD.gn @@ -20,8 +20,8 @@ ohos_unittest("AmsAppMgrClientTest") { module_out_path = module_output_path cflags_cc = [] sources = [ - "${ability_runtime_path}/interfaces/inner_api//app_manager/src/appmgr/app_mgr_client.cpp", - "${ability_runtime_path}/interfaces/inner_api//app_manager/src/appmgr/app_service_manager.cpp", + "${ability_runtime_innerkits_path}//app_manager/src/appmgr/app_mgr_client.cpp", + "${ability_runtime_innerkits_path}//app_manager/src/appmgr/app_service_manager.cpp", ] sources += [ "ams_app_mgr_client_test.cpp" ] @@ -32,34 +32,27 @@ ohos_unittest("AmsAppMgrClientTest") { "${ability_base_innerapi_path}/uri/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//base/notification/eventhandler/interfaces/inner_api", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config" ] + configs = + [ "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//utils/native/base:utils", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/appmgr/test/unittest/ams_app_running_record_test/BUILD.gn b/services/appmgr/test/unittest/ams_app_running_record_test/BUILD.gn index 456c08e7f5..7046b66094 100644 --- a/services/appmgr/test/unittest/ams_app_running_record_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_running_record_test/BUILD.gn @@ -22,12 +22,9 @@ ohos_unittest("AmsAppRunningRecordTest") { include_dirs = [ "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", "${ability_base_innerapi_path}/want/include", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -49,19 +46,14 @@ ohos_unittest("AmsAppRunningRecordTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", diff --git a/services/appmgr/test/unittest/ams_app_state_callback_test/BUILD.gn b/services/appmgr/test/unittest/ams_app_state_callback_test/BUILD.gn index a384938567..d8753520c6 100644 --- a/services/appmgr/test/unittest/ams_app_state_callback_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_state_callback_test/BUILD.gn @@ -19,14 +19,11 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AmsAppStateCallbackTest") { module_out_path = module_output_path cflags_cc = [] - include_dirs = [ - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - ] + include_dirs = [ "//third_party/json/include" ] sources = [ - "${ability_runtime_path}/interfaces/inner_api//app_manager/src/appmgr/app_process_data.cpp", - "${ability_runtime_path}/interfaces/inner_api//app_manager/src/appmgr/app_state_callback_host.cpp", + "${ability_runtime_innerkits_path}//app_manager/src/appmgr/app_process_data.cpp", + "${ability_runtime_innerkits_path}//app_manager/src/appmgr/app_state_callback_host.cpp", ] sources += [ "ams_app_state_callback_test.cpp" ] @@ -40,16 +37,11 @@ ohos_unittest("AmsAppStateCallbackTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "//third_party/googletest:gmock_main", "//utils/native/base:utils", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "bundle_framework:appexecfwk_core", "hitrace_native:hitrace_meter", diff --git a/services/appmgr/test/unittest/ams_app_workflow_test/BUILD.gn b/services/appmgr/test/unittest/ams_app_workflow_test/BUILD.gn index 68f155c8cf..21ab73284e 100644 --- a/services/appmgr/test/unittest/ams_app_workflow_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_workflow_test/BUILD.gn @@ -23,8 +23,6 @@ ohos_unittest("AmsWorkFlowTest") { "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -47,20 +45,13 @@ ohos_unittest("AmsWorkFlowTest") { sources += [ "ams_workflow_test.cpp" ] deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:configuration", "ability_base:want", @@ -68,6 +59,7 @@ ohos_unittest("AmsWorkFlowTest") { "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", diff --git a/services/appmgr/test/unittest/ams_ipc_interface_test/BUILD.gn b/services/appmgr/test/unittest/ams_ipc_interface_test/BUILD.gn index 12eb2ebbfa..cb640f6794 100644 --- a/services/appmgr/test/unittest/ams_ipc_interface_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_ipc_interface_test/BUILD.gn @@ -19,11 +19,7 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AmsIpcAppSchedulerInterfaceTest") { module_out_path = module_output_path - include_dirs = [ - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - "${ability_base_innerapi_path}/want/include", - ] + include_dirs = [ "${ability_base_innerapi_path}/want/include" ] configs = [ "${ability_base_path}:want_public_config" ] @@ -50,15 +46,10 @@ ohos_unittest("AmsIpcAppMgrInterfaceTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_core", diff --git a/services/appmgr/test/unittest/ams_mgr_kill_process_test/BUILD.gn b/services/appmgr/test/unittest/ams_mgr_kill_process_test/BUILD.gn index 96a3576b67..34fb64b6c4 100644 --- a/services/appmgr/test/unittest/ams_mgr_kill_process_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_mgr_kill_process_test/BUILD.gn @@ -16,19 +16,19 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") module_output_path = "ability_runtime/appmgrservice" -mock_sources = [ "${ability_runtime_path}/services/appmgr/test/mock/src/mock_bundle_manager.cpp" ] +mock_sources = [ "${ability_runtime_services_path}/appmgr/test/mock/src/mock_bundle_manager.cpp" ] ohos_unittest("AmsMgrKillProcessTest") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/appmgr/test/mock/include" ] + include_dirs = [ "${ability_runtime_services_path}/appmgr/test/mock/include" ] sources = [ "ams_mgr_kill_process_test.cpp" ] sources += mock_sources configs = [ - "${ability_runtime_path}/frameworks/kits/ability/native:ability_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_kits_path}/ability/native:ability_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] @@ -37,9 +37,9 @@ ohos_unittest("AmsMgrKillProcessTest") { } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/appmgr:libappms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] diff --git a/services/appmgr/test/unittest/ams_mgr_proxy_test/BUILD.gn b/services/appmgr/test/unittest/ams_mgr_proxy_test/BUILD.gn index 2ebdb61300..103ea2cfdc 100644 --- a/services/appmgr/test/unittest/ams_mgr_proxy_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_mgr_proxy_test/BUILD.gn @@ -20,15 +20,15 @@ ohos_unittest("AmsMgrProxyTest") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/services/appmgr/include", - "${ability_runtime_path}/services/appmgr/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_services_path}/appmgr/include", + "${ability_runtime_services_path}/appmgr/test/mock/include", ] sources = [ "ams_mgr_proxy_test.cpp" ] deps = [ - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] diff --git a/services/appmgr/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn b/services/appmgr/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn index be180f391f..439af46696 100644 --- a/services/appmgr/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_mgr_scheduler_dump_test/BUILD.gn @@ -21,10 +21,10 @@ ohos_unittest("ams_mgr_scheduler_dump_test") { sources = [ "ams_mgr_scheduler_dump_test.cpp" ] - configs = [ "${ability_runtime_path}/services/appmgr:appmgr_config" ] + configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] deps = [ - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] diff --git a/services/appmgr/test/unittest/ams_mgr_scheduler_test/BUILD.gn b/services/appmgr/test/unittest/ams_mgr_scheduler_test/BUILD.gn index 4e53fc8c50..83788fc8e9 100644 --- a/services/appmgr/test/unittest/ams_mgr_scheduler_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_mgr_scheduler_test/BUILD.gn @@ -22,11 +22,8 @@ ohos_unittest("AmsMgrSchedulerTest") { include_dirs = [ "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/services/appmgr/include", + "${ability_runtime_services_path}/appmgr/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", "${ability_base_innerapi_path}/want/include", ] @@ -42,16 +39,11 @@ ohos_unittest("AmsMgrSchedulerTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "bundle_framework:appexecfwk_core", "hiviewdfx_hilog_native:libhilog", diff --git a/services/appmgr/test/unittest/ams_mgr_stub_test/BUILD.gn b/services/appmgr/test/unittest/ams_mgr_stub_test/BUILD.gn index 5ceb34d136..c44bfac69b 100644 --- a/services/appmgr/test/unittest/ams_mgr_stub_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_mgr_stub_test/BUILD.gn @@ -20,14 +20,14 @@ ohos_unittest("AmsMgrStubTest") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/services/appmgr/include", - "${ability_runtime_path}/services/appmgr/test/mock/include", + "${ability_runtime_services_path}/appmgr/include", + "${ability_runtime_services_path}/appmgr/test/mock/include", ] sources = [ "ams_mgr_stub_test.cpp" ] deps = [ - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] diff --git a/services/appmgr/test/unittest/ams_recent_app_list_test/BUILD.gn b/services/appmgr/test/unittest/ams_recent_app_list_test/BUILD.gn index 3e2ff22c69..0537524962 100644 --- a/services/appmgr/test/unittest/ams_recent_app_list_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_recent_app_list_test/BUILD.gn @@ -21,8 +21,6 @@ ohos_unittest("AmsRecentAppListTest") { include_dirs = [ "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -49,20 +47,13 @@ ohos_unittest("AmsRecentAppListTest") { } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", diff --git a/services/appmgr/test/unittest/ams_service_app_spawn_client_test/BUILD.gn b/services/appmgr/test/unittest/ams_service_app_spawn_client_test/BUILD.gn index 7eefc901ff..57126bb926 100644 --- a/services/appmgr/test/unittest/ams_service_app_spawn_client_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_app_spawn_client_test/BUILD.gn @@ -20,12 +20,10 @@ ohos_unittest("AmsServiceAppSpawnClientTest") { module_out_path = module_output_path cflags_cc = [] include_dirs = [ - "${ability_runtime_path}/services/appmgr/test/mock/include", + "${ability_runtime_services_path}/appmgr/test/mock/include", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] defines = [ "usleep(time) = MockSleep(time)" ] @@ -50,19 +48,14 @@ ohos_unittest("AmsServiceAppSpawnClientTest") { } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", diff --git a/services/appmgr/test/unittest/ams_service_app_spawn_msg_wrapper_test/BUILD.gn b/services/appmgr/test/unittest/ams_service_app_spawn_msg_wrapper_test/BUILD.gn index 4ce972febe..34928dd124 100644 --- a/services/appmgr/test/unittest/ams_service_app_spawn_msg_wrapper_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_app_spawn_msg_wrapper_test/BUILD.gn @@ -19,10 +19,7 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AmsServiceAppSpawnMsgWrapperTest") { module_out_path = module_output_path cflags_cc = [] - include_dirs = [ - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - ] + include_dirs = [] defines = [ "usleep(time) = MockSleep(time)" ] @@ -40,11 +37,6 @@ ohos_unittest("AmsServiceAppSpawnMsgWrapperTest") { deps = [ "${ability_runtime_services_path}/appmgr/test:appmgr_test_source" ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/appmgr/test/unittest/ams_service_app_spawn_socket_test/BUILD.gn b/services/appmgr/test/unittest/ams_service_app_spawn_socket_test/BUILD.gn index 59303144a5..d123ee5947 100644 --- a/services/appmgr/test/unittest/ams_service_app_spawn_socket_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_app_spawn_socket_test/BUILD.gn @@ -19,11 +19,7 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AmsServiceAppSpawnSocketTest") { module_out_path = module_output_path cflags_cc = [] - include_dirs = [ - "//base/startup/appspawn/test/mock/include", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - ] + include_dirs = [ "//base/startup/appspawn/test/mock/include" ] defines = [ "usleep(time) = MockSleep(time)" ] @@ -38,11 +34,6 @@ ohos_unittest("AmsServiceAppSpawnSocketTest") { } deps = [ "${ability_runtime_services_path}/appmgr/test:appmgr_test_source" ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "appspawn:appspawn_socket_client", "hiviewdfx_hilog_native:libhilog", diff --git a/services/appmgr/test/unittest/ams_service_event_drive_test/BUILD.gn b/services/appmgr/test/unittest/ams_service_event_drive_test/BUILD.gn index 48b16e158e..a77ae3a1d7 100644 --- a/services/appmgr/test/unittest/ams_service_event_drive_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_event_drive_test/BUILD.gn @@ -20,19 +20,15 @@ ohos_unittest("AmsServiceEventDriveTest") { module_out_path = module_output_path cflags_cc = [] include_dirs = [ - "${ability_runtime_path}/services/appmgr/test/mock/include", + "${ability_runtime_services_path}/appmgr/test/mock/include", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk", - "//utils/native/base/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${ability_runtime_path}/services/appmgr/src", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", + "${ability_runtime_services_path}/appmgr/src", ] sources = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager/src/appmgr/system_memory_attr.cpp", + "${ability_runtime_innerkits_path}/app_manager/src/appmgr/system_memory_attr.cpp", "${ability_runtime_services_path}/appmgr/src/ability_running_record.cpp", "${ability_runtime_services_path}/appmgr/src/app_death_recipient.cpp", "${ability_runtime_services_path}/appmgr/src/app_mgr_service.cpp", @@ -52,23 +48,19 @@ ohos_unittest("AmsServiceEventDriveTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", diff --git a/services/appmgr/test/unittest/ams_service_load_ability_process_test/BUILD.gn b/services/appmgr/test/unittest/ams_service_load_ability_process_test/BUILD.gn index ac90420525..b2426fc763 100644 --- a/services/appmgr/test/unittest/ams_service_load_ability_process_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_load_ability_process_test/BUILD.gn @@ -19,11 +19,8 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AmsServiceLoadAbilityProcessTest") { module_out_path = module_output_path cflags_cc = [] - include_dirs = [ - "${ability_runtime_services_path}/appmgr/test/unittest/mocks", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - ] + include_dirs = + [ "${ability_runtime_services_path}/appmgr/test/unittest/mocks" ] sources = [ "${ability_runtime_services_path}/appmgr/src/ability_running_record.cpp", @@ -51,27 +48,21 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", diff --git a/services/appmgr/test/unittest/ams_service_startup_test/BUILD.gn b/services/appmgr/test/unittest/ams_service_startup_test/BUILD.gn index 2d49d8f848..fb4e807223 100644 --- a/services/appmgr/test/unittest/ams_service_startup_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_startup_test/BUILD.gn @@ -20,12 +20,10 @@ ohos_unittest("AmsServiceStartupTest") { module_out_path = module_output_path cflags_cc = [] include_dirs = [ - "${ability_runtime_path}/services/appmgr/test/mock/include", + "${ability_runtime_services_path}/appmgr/test/mock/include", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include/", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -43,33 +41,28 @@ ohos_unittest("AmsServiceStartupTest") { sources += [ "ams_service_startup_test.cpp" ] - configs = [ "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler_config" ] + configs = [] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//utils/native/base:utils", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", diff --git a/services/appmgr/test/unittest/app_mgr_proxy_test/BUILD.gn b/services/appmgr/test/unittest/app_mgr_proxy_test/BUILD.gn index 3de2a6327e..74b81e5182 100644 --- a/services/appmgr/test/unittest/app_mgr_proxy_test/BUILD.gn +++ b/services/appmgr/test/unittest/app_mgr_proxy_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AppMgrProxyTest") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/appmgr/test/mock/include" ] + include_dirs = [ "${ability_runtime_services_path}/appmgr/test/mock/include" ] sources = [ "app_mgr_proxy_test.cpp" ] diff --git a/services/appmgr/test/unittest/app_mgr_service_dump_test/BUILD.gn b/services/appmgr/test/unittest/app_mgr_service_dump_test/BUILD.gn index 7062360ef6..9b1d3a6d2c 100644 --- a/services/appmgr/test/unittest/app_mgr_service_dump_test/BUILD.gn +++ b/services/appmgr/test/unittest/app_mgr_service_dump_test/BUILD.gn @@ -21,10 +21,10 @@ ohos_unittest("app_mgr_service_dump_test") { sources = [ "app_mgr_service_dump_test.cpp" ] - configs = [ "${ability_runtime_path}/services/appmgr:appmgr_config" ] + configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] deps = [ - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "//third_party/googletest:gtest_main", ] diff --git a/services/appmgr/test/unittest/app_mgr_service_event_handler_test/BUILD.gn b/services/appmgr/test/unittest/app_mgr_service_event_handler_test/BUILD.gn index e87a1c61a1..6467755d9d 100644 --- a/services/appmgr/test/unittest/app_mgr_service_event_handler_test/BUILD.gn +++ b/services/appmgr/test/unittest/app_mgr_service_event_handler_test/BUILD.gn @@ -19,10 +19,7 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AMSEventHandlerTest") { module_out_path = module_output_path cflags_cc = [] - include_dirs = [ - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", - ] + include_dirs = [] sources = [ "${ability_runtime_services_path}/appmgr/src/ability_running_record.cpp", @@ -50,28 +47,23 @@ ohos_unittest("AMSEventHandlerTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", diff --git a/services/appmgr/test/unittest/app_mgr_stub_test/BUILD.gn b/services/appmgr/test/unittest/app_mgr_stub_test/BUILD.gn index 8db3083cf0..a86652bc60 100644 --- a/services/appmgr/test/unittest/app_mgr_stub_test/BUILD.gn +++ b/services/appmgr/test/unittest/app_mgr_stub_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AppMgrStubTest") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/appmgr/test/mock/include" ] + include_dirs = [ "${ability_runtime_services_path}/appmgr/test/mock/include" ] sources = [ "app_mgr_stub_test.cpp" ] @@ -32,6 +32,7 @@ ohos_unittest("AppMgrStubTest") { "ability_base:configuration", "ability_base:want", "ability_runtime:app_manager", + "bundle_framework:appexecfwk_base", "ipc:ipc_core", "utils_base:utils", ] diff --git a/services/appmgr/test/unittest/app_running_processes_info_test/BUILD.gn b/services/appmgr/test/unittest/app_running_processes_info_test/BUILD.gn index 514d184740..ea9b1b067c 100644 --- a/services/appmgr/test/unittest/app_running_processes_info_test/BUILD.gn +++ b/services/appmgr/test/unittest/app_running_processes_info_test/BUILD.gn @@ -21,12 +21,9 @@ ohos_unittest("AppRunningProcessesInfoTest") { cflags_cc = [] include_dirs = [ "${ability_base_innerapi_path}/want/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", "${ability_base_innerapi_path}/want/include", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] sources = [ @@ -47,22 +44,17 @@ ohos_unittest("AppRunningProcessesInfoTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/appmgr:libappms", + "${ability_runtime_services_path}/appmgr:libappms", "${ability_runtime_services_path}/appmgr/test:appmgr_test_source", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", + "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", diff --git a/services/dataobsmgr/test/unittest/phone/data_ability_observer_proxy_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/data_ability_observer_proxy_test/BUILD.gn index 934034b15b..ead247c258 100644 --- a/services/dataobsmgr/test/unittest/phone/data_ability_observer_proxy_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/data_ability_observer_proxy_test/BUILD.gn @@ -29,10 +29,8 @@ ohos_unittest("data_ability_observer_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -41,6 +39,7 @@ ohos_unittest("data_ability_observer_proxy_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dataobsmgr/test/unittest/phone/data_ability_observer_stub_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/data_ability_observer_stub_test/BUILD.gn index e04d05d29b..96d03c3783 100644 --- a/services/dataobsmgr/test/unittest/phone/data_ability_observer_stub_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/data_ability_observer_stub_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ability_runtime/dataobsmgr" ohos_unittest("data_ability_observer_stub_test") { module_out_path = module_output_path - include_dirs = [ "//utils/native/base/include" ] + include_dirs = [] sources = [ "data_ability_observer_stub_test.cpp" ] @@ -29,10 +29,8 @@ ohos_unittest("data_ability_observer_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -41,6 +39,7 @@ ohos_unittest("data_ability_observer_stub_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_client_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_client_test/BUILD.gn index a1ac15f32c..b53b37e440 100644 --- a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_client_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_client_test/BUILD.gn @@ -20,8 +20,7 @@ ohos_unittest("dataobs_mgr_client_test") { module_out_path = module_output_path include_dirs = [ - "//utils/native/base/include", - "${ability_runtime_path}/services/dataobsmgr/include", + "${ability_runtime_services_path}/dataobsmgr/include", "${distributedschedule_path}/safwk/services/safwk/include", ] @@ -33,10 +32,8 @@ ohos_unittest("dataobs_mgr_client_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -45,6 +42,7 @@ ohos_unittest("dataobs_mgr_client_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_inner_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_inner_test/BUILD.gn index 522ab84521..a693820d60 100644 --- a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_inner_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_inner_test/BUILD.gn @@ -19,7 +19,7 @@ module_output_path = "ability_runtime/dataobsmgr" ohos_unittest("dataobs_mgr_inner_test") { module_out_path = module_output_path - include_dirs = [ "//utils/native/base/include" ] + include_dirs = [] sources = [ "dataobs_mgr_inner_test.cpp" ] @@ -29,10 +29,8 @@ ohos_unittest("dataobs_mgr_inner_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -41,6 +39,7 @@ ohos_unittest("dataobs_mgr_inner_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_proxy_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_proxy_test/BUILD.gn index 9184c5cd1f..af0dbacf24 100644 --- a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_proxy_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_proxy_test/BUILD.gn @@ -29,10 +29,8 @@ ohos_unittest("dataobs_mgr_proxy_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -41,6 +39,7 @@ ohos_unittest("dataobs_mgr_proxy_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_service_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_service_test/BUILD.gn index 2a9f1f5943..8827103f51 100644 --- a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_service_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_service_test/BUILD.gn @@ -29,10 +29,8 @@ ohos_unittest("dataobs_mgr_service_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -41,6 +39,7 @@ ohos_unittest("dataobs_mgr_service_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_stub_test/BUILD.gn b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_stub_test/BUILD.gn index 503dc9fc60..edd9214be8 100644 --- a/services/dataobsmgr/test/unittest/phone/dataobs_mgr_stub_test/BUILD.gn +++ b/services/dataobsmgr/test/unittest/phone/dataobs_mgr_stub_test/BUILD.gn @@ -29,10 +29,8 @@ ohos_unittest("dataobs_mgr_stub_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager:dataobs_manager", - "${ability_runtime_path}/services/dataobsmgr:dataobsms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", + "${ability_runtime_services_path}/dataobsmgr:dataobsms", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -41,6 +39,7 @@ ohos_unittest("dataobs_mgr_stub_test") { external_deps = [ "ability_base:want", "ability_base:zuri", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/dialog_ui/dialog_anr/js/pages/index/index.css b/services/dialog_ui/dialog_anr/js/pages/index/index.css index 03112cdf1e..a9caae0241 100644 --- a/services/dialog_ui/dialog_anr/js/pages/index/index.css +++ b/services/dialog_ui/dialog_anr/js/pages/index/index.css @@ -19,6 +19,8 @@ align-items: center; border-radius: 16vp; background-color: #FFFFFF; + border-width: 1vp; + border-color: #e9e9e9; } .div-title { diff --git a/services/test/mock/include/mock_ability_mgr_service.h b/services/test/mock/include/mock_ability_mgr_service.h index 9fdb452e9c..642d02d71c 100644 --- a/services/test/mock/include/mock_ability_mgr_service.h +++ b/services/test/mock/include/mock_ability_mgr_service.h @@ -153,7 +153,8 @@ public: { return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/services/test/moduletest/ability_manager_client_test/BUILD.gn b/services/test/moduletest/ability_manager_client_test/BUILD.gn index dadd66bf9d..091e95fdc5 100644 --- a/services/test/moduletest/ability_manager_client_test/BUILD.gn +++ b/services/test/moduletest/ability_manager_client_test/BUILD.gn @@ -21,10 +21,10 @@ ohos_moduletest("ability_manager_client_test") { sources = [ "ability_manager_client_test.cpp" ] - configs = [ "${ability_runtime_path}/services/abilitymgr:abilityms_config" ] + configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] deps = [ - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gtest_main", ] diff --git a/services/test/moduletest/ability_manager_service_dump_test/BUILD.gn b/services/test/moduletest/ability_manager_service_dump_test/BUILD.gn index 45d7701b7a..e98d1f5b7a 100644 --- a/services/test/moduletest/ability_manager_service_dump_test/BUILD.gn +++ b/services/test/moduletest/ability_manager_service_dump_test/BUILD.gn @@ -20,16 +20,16 @@ ohos_moduletest("ability_manager_service_dump_test") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/services/test/mock/include", + "${ability_runtime_services_path}/test/mock/include", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ - "${ability_runtime_path}/services/test/mock/src/mock_app_mgr_client.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_app_mgr_client.cpp", "ability_manager_service_dump_test.cpp", ] @@ -41,16 +41,14 @@ ohos_moduletest("ability_manager_service_dump_test") { } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -62,6 +60,7 @@ ohos_moduletest("ability_manager_service_dump_test") { "ability_base:zuri", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/ability_record_test/BUILD.gn b/services/test/moduletest/ability_record_test/BUILD.gn index 2776ac83c1..ec6c7f30f3 100644 --- a/services/test/moduletest/ability_record_test/BUILD.gn +++ b/services/test/moduletest/ability_record_test/BUILD.gn @@ -21,14 +21,11 @@ ohos_moduletest("AbilityRecordModuleTest") { cflags_cc = [] include_dirs = [ "//third_party/jsoncpp/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/distributed_ability_runtime", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include", + "${ability_runtime_kits_path}/ability/native/include/distributed_ability_runtime", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] sources = [ - "${ability_runtime_path}/services/test/mock/src/mock_app_mgr_client.cpp", "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", "${ability_runtime_services_path}/abilitymgr/src/ability_connect_manager.cpp", "${ability_runtime_services_path}/abilitymgr/src/ability_event_handler.cpp", @@ -59,32 +56,28 @@ ohos_moduletest("AbilityRecordModuleTest") { "${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp", "${ability_runtime_services_path}/abilitymgr/src/want_sender_stub.cpp", "${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_app_mgr_client.cpp", ] sources += [ "ability_record_module_test.cpp" ] configs = [ "${ability_runtime_services_path}/test:aafwk_module_test_config", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core_config", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_config", "${ability_base_path}:want_public_config", - "//base/notification/eventhandler/frameworks/eventhandler:public_libeventhandler_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", @@ -112,11 +105,13 @@ ohos_moduletest("AbilityRecordModuleTest") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", @@ -124,6 +119,7 @@ ohos_moduletest("AbilityRecordModuleTest") { "ipc:ipc_core", "relational_store:native_appdatafwk", "relational_store:native_rdb", + "startup_l2:syspara", ] if (background_task_mgr_continuous_task_enable) { diff --git a/services/test/moduletest/ability_timeout_module_test/BUILD.gn b/services/test/moduletest/ability_timeout_module_test/BUILD.gn index 9511cda853..b59cad98c6 100644 --- a/services/test/moduletest/ability_timeout_module_test/BUILD.gn +++ b/services/test/moduletest/ability_timeout_module_test/BUILD.gn @@ -22,70 +22,63 @@ ohos_moduletest("ability_timeout_module_test") { include_dirs = [ "${ability_runtime_services_path}/test/mock/include", "//third_party/jsoncpp/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/distributed_ability_runtime", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include", + "${ability_runtime_kits_path}/ability/native/include/distributed_ability_runtime", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] sources = [ "ability_timeout_module_test.cpp" ] sources += [ - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_callback_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_manager.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_event_handler.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_service.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_token_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/call_container.cpp", - "${ability_runtime_path}/services/abilitymgr/src/call_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/caller_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/connection_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/data_ability_manager.cpp", - "${ability_runtime_path}/services/abilitymgr/src/data_ability_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/launch_param.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_deal.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_state_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_snapshot.cpp", - "${ability_runtime_path}/services/abilitymgr/src/pending_want_key.cpp", - "${ability_runtime_path}/services/abilitymgr/src/pending_want_manager.cpp", - "${ability_runtime_path}/services/abilitymgr/src/pending_want_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_receiver_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_sender_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/wants_info.cpp", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_app_mgr_client.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_bundle_mgr.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_event_handler.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_token_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/call_container.cpp", + "${ability_runtime_services_path}/abilitymgr/src/call_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/connection_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/data_ability_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/data_ability_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_deal.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_snapshot.cpp", + "${ability_runtime_services_path}/abilitymgr/src/pending_want_key.cpp", + "${ability_runtime_services_path}/abilitymgr/src/pending_want_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/pending_want_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_receiver_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_sender_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_app_mgr_client.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_bundle_mgr.cpp", ] configs = [ "${ability_runtime_services_path}/test:aafwk_module_test_config", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", @@ -112,11 +105,13 @@ ohos_moduletest("ability_timeout_module_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", @@ -124,6 +119,7 @@ ohos_moduletest("ability_timeout_module_test") { "ipc:ipc_core", "relational_store:native_appdatafwk", "relational_store:native_rdb", + "startup_l2:syspara", ] if (background_task_mgr_continuous_task_enable) { diff --git a/services/test/moduletest/ability_timeout_module_test/ability_timeout_module_test.cpp b/services/test/moduletest/ability_timeout_module_test/ability_timeout_module_test.cpp index 8eb86679d0..1ac56f5f6a 100644 --- a/services/test/moduletest/ability_timeout_module_test/ability_timeout_module_test.cpp +++ b/services/test/moduletest/ability_timeout_module_test/ability_timeout_module_test.cpp @@ -348,7 +348,7 @@ HWTEST_F(AbilityTimeoutModuleTest, OnAbilityDied_001, TestSize.Level1) EXPECT_TRUE(lauList->GetAbilityRecordByToken(rootLauncher->GetToken()) != nullptr); EXPECT_TRUE(rootLauncher->IsRestarting()); - EXPECT_TRUE(rootLauncher->restartCount_ < rootLauncher->restratMax_); + EXPECT_TRUE(rootLauncher->restartCount_ < rootLauncher->restartMax_); GTEST_LOG_(INFO) << "restart count:" << rootLauncher->restartCount_; } @@ -395,7 +395,7 @@ HWTEST_F(AbilityTimeoutModuleTest, OnAbilityDied_002, TestSize.Level1) EXPECT_EQ(topAbility, rootLauncher); EXPECT_TRUE(lauList->GetAbilityRecordByToken(rootLauncher->GetToken()) != nullptr); EXPECT_TRUE(rootLauncher->IsRestarting()); - EXPECT_TRUE(rootLauncher->restartCount_ < rootLauncher->restratMax_); + EXPECT_TRUE(rootLauncher->restartCount_ < rootLauncher->restartMax_); GTEST_LOG_(INFO) << "restart count:" << rootLauncher->restartCount_; } @@ -429,7 +429,7 @@ HWTEST_F(AbilityTimeoutModuleTest, OnAbilityDied_003, TestSize.Level1) rootLauncher->SetAbilityState(AbilityState::FOREGROUND); rootLauncher->SetOwnerMissionUserId(MOCK_MAIN_USER_ID); int i = 0; - while (i < rootLauncher->restratMax_) { + while (i < rootLauncher->restartMax_) { abilityMs_->OnAbilityDied(rootLauncher); usleep(100); i++; diff --git a/services/test/moduletest/app_mgr_client_test/BUILD.gn b/services/test/moduletest/app_mgr_client_test/BUILD.gn index 66831b1cfb..98335da138 100644 --- a/services/test/moduletest/app_mgr_client_test/BUILD.gn +++ b/services/test/moduletest/app_mgr_client_test/BUILD.gn @@ -19,14 +19,14 @@ module_output_path = "ability_runtime/mstabilitymgrservice" ohos_moduletest("app_mgr_client_test") { module_out_path = module_output_path - include_dirs = [ "${ability_runtime_path}/services/test/mock/include" ] + include_dirs = [ "${ability_runtime_services_path}/test/mock/include" ] sources = [ "app_mgr_client_test.cpp" ] - configs = [ "${ability_runtime_path}/services/abilitymgr:abilityms_config" ] + configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] deps = [ - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/googletest:gtest_main", ] diff --git a/services/test/moduletest/call_module_test/BUILD.gn b/services/test/moduletest/call_module_test/BUILD.gn index 75ff6fcdaf..bd66e20ba1 100644 --- a/services/test/moduletest/call_module_test/BUILD.gn +++ b/services/test/moduletest/call_module_test/BUILD.gn @@ -19,16 +19,16 @@ ohos_moduletest("call_ability_service_module_test") { module_out_path = module_output_path include_dirs = [ - "${ability_runtime_path}/services/test/mock/include", + "${ability_runtime_services_path}/test/mock/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ # add mock file - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", "call_ability_service_module_test.cpp", ] @@ -38,16 +38,14 @@ ohos_moduletest("call_ability_service_module_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -60,6 +58,7 @@ ohos_moduletest("call_ability_service_module_test") { "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/BUILD.gn b/services/test/moduletest/common/ams/BUILD.gn index f0673ce7c1..4ac5c507f3 100644 --- a/services/test/moduletest/common/ams/BUILD.gn +++ b/services/test/moduletest/common/ams/BUILD.gn @@ -14,14 +14,6 @@ import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") -config("appmgr_test_config") { - include_dirs = [ - "//base/account/os_account/interfaces/innerkits/osaccount/native/include", - "${global_path}/i18n/frameworks/intl/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include", - ] -} - ohos_source_set("appmgr_mst_source") { testonly = true cflags_cc = [] @@ -51,23 +43,14 @@ ohos_source_set("appmgr_mst_source") { include_dirs = [ "//third_party/json/include", "${ability_runtime_services_path}/appmgr/test/mock/include", - "//base/account/os_account/frameworks/common/database/include", - "//base/account/os_account/frameworks/common/account_error/include", ] public_configs = [ - ":appmgr_test_config", "${ability_runtime_services_path}/test:services_module_test_config", "${ability_runtime_services_path}/appmgr:appmgr_config", "${ability_runtime_services_path}/test:services_mock_ams_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", - "${bundlefwk_inner_api_path}/appexecfwk_core:bundlemgr_sdk_config", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core_config", - "${ability_base_path}:want_public_config", - "${ability_base_path}:base_public_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy_config", - "//base/notification/eventhandler/frameworks/eventhandler:public_libeventhandler_config", "//utils/native/base:utils_config", "//third_party/googletest:gtest_config", "//third_party/googletest:gmock_config", @@ -77,12 +60,12 @@ ohos_source_set("appmgr_mst_source") { cflags += [ "-DBINDER_IPC_32BIT" ] } public_deps = [ - "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_services_path}/common:perm_verification", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${appspawn_path}/interfaces/innerkits:appspawn_socket_client", "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", @@ -90,16 +73,11 @@ ohos_source_set("appmgr_mst_source") { "//utils/native/base:utils", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - public_deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:configuration", "ability_base:want", "access_token:libaccesstoken_sdk", - "appspawn:appspawn_socket_client", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", diff --git a/services/test/moduletest/common/ams/ability_running_record_test/BUILD.gn b/services/test/moduletest/common/ams/ability_running_record_test/BUILD.gn index 8e191d769d..e418397706 100644 --- a/services/test/moduletest/common/ams/ability_running_record_test/BUILD.gn +++ b/services/test/moduletest/common/ams/ability_running_record_test/BUILD.gn @@ -18,10 +18,7 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsAbilityRunningRecordModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ "ams_ability_running_record_module_test.cpp" ] deps = [ @@ -30,7 +27,9 @@ ohos_moduletest("AmsAbilityRunningRecordModuleTest") { ] external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/app_life_cycle_test/BUILD.gn b/services/test/moduletest/common/ams/app_life_cycle_test/BUILD.gn index f1e12e58fb..e2ca6c2c74 100644 --- a/services/test/moduletest/common/ams/app_life_cycle_test/BUILD.gn +++ b/services/test/moduletest/common/ams/app_life_cycle_test/BUILD.gn @@ -19,20 +19,19 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsAppLifeCycleModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/kits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ "ams_app_life_cycle_module_test.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/test/moduletest/common/ams:appmgr_mst_source", ] external_deps = [ "ability_base:configuration", + "bundle_framework:appexecfwk_base", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr_standard:samgr_proxy", ] diff --git a/services/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn b/services/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn index 15343dab0a..aefa2238cb 100644 --- a/services/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn +++ b/services/test/moduletest/common/ams/app_mgr_service_test/BUILD.gn @@ -18,12 +18,9 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsAppMgrServiceModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ - "${ability_runtime_path}/services/appmgr/src/system_environment_information.cpp", + "${ability_runtime_services_path}/appmgr/src/system_environment_information.cpp", "ams_app_mgr_service_module_test.cpp", ] @@ -37,7 +34,9 @@ ohos_moduletest("AmsAppMgrServiceModuleTest") { } external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/app_recent_list_test/BUILD.gn b/services/test/moduletest/common/ams/app_recent_list_test/BUILD.gn index d7ab64c9d8..216322785e 100644 --- a/services/test/moduletest/common/ams/app_recent_list_test/BUILD.gn +++ b/services/test/moduletest/common/ams/app_recent_list_test/BUILD.gn @@ -18,20 +18,19 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsAppRecentListModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ "ams_app_recent_list_module_test.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/test/moduletest/common/ams:appmgr_mst_source", ] external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/app_running_processes_info_module_test/BUILD.gn b/services/test/moduletest/common/ams/app_running_processes_info_module_test/BUILD.gn index 4d8a1a58c2..1a5ba9afd0 100644 --- a/services/test/moduletest/common/ams/app_running_processes_info_module_test/BUILD.gn +++ b/services/test/moduletest/common/ams/app_running_processes_info_module_test/BUILD.gn @@ -19,15 +19,16 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AppRunningProcessesInfoModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ "app_running_processes_info_module_test.cpp" ] deps = [ "${ability_runtime_services_path}/test/moduletest/common/ams:appmgr_mst_source" ] - external_deps = [ "ipc:ipc_core" ] + external_deps = [ + "bundle_framework:appexecfwk_base", + "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_core", + ] if (background_task_mgr_continuous_task_enable) { external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] diff --git a/services/test/moduletest/common/ams/app_running_record_test/BUILD.gn b/services/test/moduletest/common/ams/app_running_record_test/BUILD.gn index 297c18c379..3c12e1f4ce 100644 --- a/services/test/moduletest/common/ams/app_running_record_test/BUILD.gn +++ b/services/test/moduletest/common/ams/app_running_record_test/BUILD.gn @@ -19,10 +19,7 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsAppRunningRecordModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ "ams_app_running_record_module_test.cpp" ] deps = [ @@ -32,6 +29,7 @@ ohos_moduletest("AmsAppRunningRecordModuleTest") { external_deps = [ "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/app_service_flow_test/BUILD.gn b/services/test/moduletest/common/ams/app_service_flow_test/BUILD.gn index b3f8619ed7..6596b0382a 100644 --- a/services/test/moduletest/common/ams/app_service_flow_test/BUILD.gn +++ b/services/test/moduletest/common/ams/app_service_flow_test/BUILD.gn @@ -19,18 +19,19 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsAppServiceFlowModuleTest") { module_out_path = module_output_path - include_dirs = - [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/" ] + include_dirs = [] sources = [ "ams_app_service_flow_module_test.cpp" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/common:perm_verification", "${ability_runtime_services_path}/test/moduletest/common/ams:appmgr_mst_source", ] external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn b/services/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn index f5f1042a38..b3f1bd776e 100644 --- a/services/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn +++ b/services/test/moduletest/common/ams/ipc_ams_mgr_test/BUILD.gn @@ -22,10 +22,8 @@ ohos_moduletest("AmsIpcAmsmgrModuleTest") { include_dirs = [ "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/services/appmgr/include", + "${ability_runtime_services_path}/appmgr/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", ] sources = [ "ams_ipc_ams_mgr_module_test.cpp" ] @@ -36,8 +34,10 @@ ohos_moduletest("AmsIpcAmsmgrModuleTest") { ] external_deps = [ + "bundle_framework:appexecfwk_base", "eventhandler:libeventhandler", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn b/services/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn index 67b720739a..0dac9b224f 100644 --- a/services/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn +++ b/services/test/moduletest/common/ams/ipc_app_mgr_test/BUILD.gn @@ -29,6 +29,7 @@ ohos_moduletest("AmsIpcAppmgrModuleTest") { ] external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn b/services/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn index 796beb21f1..918d4f2b4f 100644 --- a/services/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn +++ b/services/test/moduletest/common/ams/ipc_app_scheduler_test/BUILD.gn @@ -29,6 +29,7 @@ ohos_moduletest("AmsIpcAppSchedulerModuleTest") { external_deps = [ "ability_base:configuration", + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/service_app_spawn_client_test/BUILD.gn b/services/test/moduletest/common/ams/service_app_spawn_client_test/BUILD.gn index 55301f56bc..70541c280b 100644 --- a/services/test/moduletest/common/ams/service_app_spawn_client_test/BUILD.gn +++ b/services/test/moduletest/common/ams/service_app_spawn_client_test/BUILD.gn @@ -19,12 +19,11 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsServiceAppSpawnClientModuleTest") { module_out_path = module_output_path - include_dirs = - [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include" ] + include_dirs = [] defines = [ "usleep(time) = MockSleep(time)" ] sources = [ - "${ability_runtime_path}/services/appmgr/src/system_environment_information.cpp", + "${ability_runtime_services_path}/appmgr/src/system_environment_information.cpp", "ams_service_app_spawn_client_module_test.cpp", ] @@ -38,7 +37,9 @@ ohos_moduletest("AmsServiceAppSpawnClientModuleTest") { } external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/service_event_drive_test/BUILD.gn b/services/test/moduletest/common/ams/service_event_drive_test/BUILD.gn index e99d3e419f..7e2738fbae 100644 --- a/services/test/moduletest/common/ams/service_event_drive_test/BUILD.gn +++ b/services/test/moduletest/common/ams/service_event_drive_test/BUILD.gn @@ -19,10 +19,7 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsServiceEventDriveModuleTest") { module_out_path = module_output_path - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog/", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] + include_dirs = [] sources = [ "${ability_runtime_services_path}/appmgr/src/system_environment_information.cpp", @@ -39,7 +36,9 @@ ohos_moduletest("AmsServiceEventDriveModuleTest") { } external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/service_start_process_test/BUILD.gn b/services/test/moduletest/common/ams/service_start_process_test/BUILD.gn index 1492f77c5c..31fea5a738 100644 --- a/services/test/moduletest/common/ams/service_start_process_test/BUILD.gn +++ b/services/test/moduletest/common/ams/service_start_process_test/BUILD.gn @@ -19,8 +19,7 @@ module_output_path = "ability_runtime/mstappmgrservice" ohos_moduletest("AmsServiceStartModuleTest") { module_out_path = module_output_path - include_dirs = - [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include" ] + include_dirs = [] sources = [ "${ability_runtime_services_path}/appmgr/src/system_environment_information.cpp", "ams_service_start_process_module_test.cpp", @@ -36,7 +35,9 @@ ohos_moduletest("AmsServiceStartModuleTest") { } external_deps = [ + "bundle_framework:appexecfwk_base", "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/common/ams/specified_ability_service_test/BUILD.gn b/services/test/moduletest/common/ams/specified_ability_service_test/BUILD.gn index 1d19275e3f..a6910a0299 100644 --- a/services/test/moduletest/common/ams/specified_ability_service_test/BUILD.gn +++ b/services/test/moduletest/common/ams/specified_ability_service_test/BUILD.gn @@ -22,44 +22,39 @@ ohos_moduletest("specified_ability_service_test") { include_dirs = [ "${ability_runtime_services_path}/test/mock/include", "//third_party/jsoncpp/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/distributed_ability_runtime", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", + "${ability_runtime_kits_path}/ability/native/include/distributed_ability_runtime", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] sources = [ "specified_ability_service_test.cpp" ] sources += [ - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_service.cpp", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", - "${ability_runtime_path}/services/common/src/event_report.cpp", - "${ability_runtime_path}/services/common/src/permission_verification.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_app_mgr_client.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_bundle_mgr.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", + "${ability_runtime_services_path}/common/src/event_report.cpp", + "${ability_runtime_services_path}/common/src/permission_verification.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_app_mgr_client.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_bundle_mgr.cpp", "//foundation/distributedhardware/device_manager/test/unittest/mock/parameter.cpp", ] configs = [ "${ability_runtime_services_path}/test:aafwk_module_test_config", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/icu/icu4c:shared_icuuc", @@ -85,10 +80,13 @@ ohos_moduletest("specified_ability_service_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", diff --git a/services/test/moduletest/common/ams/specified_ability_service_test/specified_ability_service_test.cpp b/services/test/moduletest/common/ams/specified_ability_service_test/specified_ability_service_test.cpp index 7c121d2b1b..7685dd4a17 100644 --- a/services/test/moduletest/common/ams/specified_ability_service_test/specified_ability_service_test.cpp +++ b/services/test/moduletest/common/ams/specified_ability_service_test/specified_ability_service_test.cpp @@ -65,7 +65,7 @@ public: Want CreateWant(const std::string &entity); AbilityInfo CreateAbilityInfo(const std::string &name, const std::string &appName, const std::string &bundleName); ApplicationInfo CreateAppInfo(const std::string &appName, const std::string &name); - bool MockAppClent(); + bool MockAppClient(); void WaitAMS(); inline static std::shared_ptr mockAppMgrClient_ {nullptr}; @@ -109,15 +109,15 @@ ApplicationInfo SpecifiedAbilityServiceTest::CreateAppInfo(const std::string &ap return appInfo; } -bool SpecifiedAbilityServiceTest::MockAppClent() +bool SpecifiedAbilityServiceTest::MockAppClient() { if (!mockAppMgrClient_) { - GTEST_LOG_(INFO) << "MockAppClent::1"; + GTEST_LOG_(INFO) << "MockAppClient::1"; return false; } if (!abilityMgrServ_->appScheduler_) { - GTEST_LOG_(INFO) << "MockAppClent::2"; + GTEST_LOG_(INFO) << "MockAppClient::2"; return false; } @@ -169,7 +169,7 @@ void SpecifiedAbilityServiceTest::SetUp(void) scheduler_ = new MockAbilityScheduler(); if (!doOnce_) { doOnce_ = true; - MockAppClent(); + MockAppClient(); } WaitAMS(); } @@ -201,7 +201,7 @@ HWTEST_F(SpecifiedAbilityServiceTest, OnAcceptWantResponse_001, TestSize.Level1) Want want; want.SetElementName("DemoDeviceId", "DemoBundleName", "DemoAbilityName"); EXPECT_TRUE(abilityMgrServ_->currentMissionListManager_); - abilityMgrServ_->currentMissionListManager_->EnqueueWaittingAbility(abilityRequest); + abilityMgrServ_->currentMissionListManager_->EnqueueWaitingAbility(abilityRequest); abilityMgrServ_->OnAcceptWantResponse(want, "flag"); EXPECT_EQ(false, abilityRecord->IsNewWant()); diff --git a/services/test/moduletest/ipc_ability_connect_test/BUILD.gn b/services/test/moduletest/ipc_ability_connect_test/BUILD.gn index 804e462132..8bd854c173 100644 --- a/services/test/moduletest/ipc_ability_connect_test/BUILD.gn +++ b/services/test/moduletest/ipc_ability_connect_test/BUILD.gn @@ -30,7 +30,6 @@ ohos_moduletest("IpcAbilityConnectModuleTest") { } deps = [ "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utilsbase", diff --git a/services/test/moduletest/ipc_ability_mgr_test/BUILD.gn b/services/test/moduletest/ipc_ability_mgr_test/BUILD.gn index 8a46050e50..132ee2861b 100644 --- a/services/test/moduletest/ipc_ability_mgr_test/BUILD.gn +++ b/services/test/moduletest/ipc_ability_mgr_test/BUILD.gn @@ -23,17 +23,16 @@ ohos_moduletest("IpcAbilityMgrServiceModuleTest") { configs = [ "${ability_runtime_services_path}/test:aafwk_module_test_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", @@ -47,6 +46,7 @@ ohos_moduletest("IpcAbilityMgrServiceModuleTest") { external_deps = [ "ability_base:want", "ability_base:zuri", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/test/moduletest/ipc_ability_scheduler_test/BUILD.gn b/services/test/moduletest/ipc_ability_scheduler_test/BUILD.gn index fbcffef50b..b1c06717a3 100644 --- a/services/test/moduletest/ipc_ability_scheduler_test/BUILD.gn +++ b/services/test/moduletest/ipc_ability_scheduler_test/BUILD.gn @@ -21,7 +21,7 @@ ohos_moduletest("IpcAbilitySchedulerModuleTest") { include_dirs = [ "//third_party/jsoncpp/include", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] sources = [ @@ -42,10 +42,9 @@ ohos_moduletest("IpcAbilitySchedulerModuleTest") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", diff --git a/services/test/moduletest/mission_dump_test/BUILD.gn b/services/test/moduletest/mission_dump_test/BUILD.gn index 9ed0c50af8..00a1be8b6e 100644 --- a/services/test/moduletest/mission_dump_test/BUILD.gn +++ b/services/test/moduletest/mission_dump_test/BUILD.gn @@ -23,15 +23,14 @@ ohos_moduletest("mission_dump_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ "mission_dump_test.cpp" ] sources += [ - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", - "${ability_runtime_path}/services/common/src/permission_verification.cpp", - "//foundation/distributedhardware/device_manager/test/unittest/mock/parameter.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core/src/appmgr/mock_app_scheduler.cpp", + "${ability_runtime_services_path}/common/src/permission_verification.cpp", ] configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ] @@ -40,16 +39,14 @@ ohos_moduletest("mission_dump_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -62,6 +59,7 @@ ohos_moduletest("mission_dump_test") { "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/module_test_dump_util/BUILD.gn b/services/test/moduletest/module_test_dump_util/BUILD.gn index 41dcb1467e..3d8fe0ce87 100644 --- a/services/test/moduletest/module_test_dump_util/BUILD.gn +++ b/services/test/moduletest/module_test_dump_util/BUILD.gn @@ -22,12 +22,12 @@ group("module_test_dump_util") { config("module_test_dump_util_config") { include_dirs = [ - "${ability_runtime_path}/services/test/moduletest/module_test_dump_util/", + "${ability_runtime_services_path}/test/moduletest/module_test_dump_util/", ] } ohos_shared_library("module_test_dump_util_lib") { - sources = [ "${ability_runtime_path}/services/test/moduletest/module_test_dump_util/module_test_dump_util.cpp" ] + sources = [ "${ability_runtime_services_path}/test/moduletest/module_test_dump_util/module_test_dump_util.cpp" ] configs = [ ":module_test_dump_util_config" ] diff --git a/services/test/moduletest/on_new_want_module_test/BUILD.gn b/services/test/moduletest/on_new_want_module_test/BUILD.gn index f77871a50a..48a3de5ae8 100644 --- a/services/test/moduletest/on_new_want_module_test/BUILD.gn +++ b/services/test/moduletest/on_new_want_module_test/BUILD.gn @@ -22,42 +22,37 @@ ohos_moduletest("on_new_want_module_test") { include_dirs = [ "${ability_runtime_services_path}/test/mock/include", "//third_party/jsoncpp/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/distributed_ability_runtime", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", + "${ability_runtime_kits_path}/ability/native/include/distributed_ability_runtime", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] sources = [ "on_new_want_module_test.cpp" ] sources += [ - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_service.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_list.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_list_manager.cpp", - "${ability_runtime_path}/services/common/src/event_report.cpp", - "${ability_runtime_path}/services/common/src/permission_verification.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_list.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_list_manager.cpp", + "${ability_runtime_services_path}/common/src/event_report.cpp", + "${ability_runtime_services_path}/common/src/permission_verification.cpp", "//foundation/distributedhardware/device_manager/test/unittest/mock/parameter.cpp", ] configs = [ "${ability_runtime_services_path}/test:aafwk_module_test_config", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/icu/icu4c:shared_icuuc", @@ -83,10 +78,13 @@ ohos_moduletest("on_new_want_module_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", diff --git a/services/test/moduletest/panding_want_manager_test/BUILD.gn b/services/test/moduletest/panding_want_manager_test/BUILD.gn index d0217bc077..c76a13ef40 100644 --- a/services/test/moduletest/panding_want_manager_test/BUILD.gn +++ b/services/test/moduletest/panding_want_manager_test/BUILD.gn @@ -22,21 +22,19 @@ ohos_moduletest("PandingWantMgrTest") { module_out_path = module_output_path cflags_cc = [] include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime", - "${ability_runtime_path}/services/test/mock/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/appmg", - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", + "${ability_runtime_kits_path}/appkit/native/ability_runtime", + "${ability_runtime_services_path}/test/mock/include", + "${ability_runtime_kits_path}/appkit/native/app/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", "//third_party/jsoncpp/include", - "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", ] sources = [ - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_client.cpp", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_app_mgr_client.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_bundle_mgr.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_client.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_app_mgr_client.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_bundle_mgr.cpp", "panding_want_manager_test.cpp", ] @@ -47,28 +45,20 @@ ohos_moduletest("PandingWantMgrTest") { } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/hiviewdfx/hiview/adapter/utility:hiview_adapter_utility", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", ] - if (os_account_part_enabled) { - cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] - deps += [ "//base/account/os_account/frameworks/osaccount/native:os_account_innerkits" ] - } - external_deps = [ "ability_base:base", "ability_base:want", @@ -79,6 +69,7 @@ ohos_moduletest("PandingWantMgrTest") { "common_event_service:cesfwk_innerkits", "dataability:native_dataability", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", diff --git a/services/test/moduletest/running_infos_module_test/BUILD.gn b/services/test/moduletest/running_infos_module_test/BUILD.gn index 5810db2517..0bb560c095 100644 --- a/services/test/moduletest/running_infos_module_test/BUILD.gn +++ b/services/test/moduletest/running_infos_module_test/BUILD.gn @@ -22,65 +22,61 @@ ohos_moduletest("running_infos_module_test") { include_dirs = [ "${ability_runtime_services_path}/test/mock/include", "//third_party/jsoncpp/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/distributed_ability_runtime", - "${ability_runtime_path}/interfaces/inner_api/dataobs_manager/include", + "${ability_runtime_kits_path}/ability/native/include/distributed_ability_runtime", + "${ability_runtime_innerkits_path}/dataobs_manager/include", ] sources = [ "running_infos_module_test.cpp" ] sources += [ - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_callback_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_connect_manager.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_event_handler.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_service.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_manager_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_proxy.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_scheduler_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/ability_token_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/caller_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/connection_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/data_ability_manager.cpp", - "${ability_runtime_path}/services/abilitymgr/src/data_ability_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/launch_param.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_deal.cpp", - "${ability_runtime_path}/services/abilitymgr/src/lifecycle_state_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/mission_snapshot.cpp", - "${ability_runtime_path}/services/abilitymgr/src/pending_want_key.cpp", - "${ability_runtime_path}/services/abilitymgr/src/pending_want_manager.cpp", - "${ability_runtime_path}/services/abilitymgr/src/pending_want_record.cpp", - "${ability_runtime_path}/services/abilitymgr/src/sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_receiver_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_sender_info.cpp", - "${ability_runtime_path}/services/abilitymgr/src/want_sender_stub.cpp", - "${ability_runtime_path}/services/abilitymgr/src/wants_info.cpp", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_app_mgr_client.cpp", - "${ability_runtime_path}/services/test/mock/src/mock_bundle_mgr.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_callback_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_connect_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_event_handler.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_service.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_manager_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_proxy.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/ability_token_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/connection_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/data_ability_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/data_ability_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_deal.cpp", + "${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/mission_snapshot.cpp", + "${ability_runtime_services_path}/abilitymgr/src/pending_want_key.cpp", + "${ability_runtime_services_path}/abilitymgr/src/pending_want_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/pending_want_record.cpp", + "${ability_runtime_services_path}/abilitymgr/src/sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_receiver_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp", + "${ability_runtime_services_path}/abilitymgr/src/want_sender_stub.cpp", + "${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr/src/sa_mgr_client_mock.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_app_mgr_client.cpp", + "${ability_runtime_services_path}/test/mock/src/mock_bundle_mgr.cpp", ] configs = [ "${ability_runtime_services_path}/test:aafwk_module_test_config", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config", - "${ability_runtime_path}/services/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", - "${ability_runtime_path}/interfaces/inner_api/app_manager:appmgr_sdk_config", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr/test/mock/libs/sa_mgr:sa_mgr_mock_config", + "${ability_runtime_innerkits_path}/app_manager:appmgr_sdk_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_inner_api_path}/appexecfwk_core:appexecfwk_core", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/icu/icu4c:shared_icuuc", @@ -108,6 +104,8 @@ ohos_moduletest("running_infos_module_test") { "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", @@ -119,6 +117,7 @@ ohos_moduletest("running_infos_module_test") { "ipc:ipc_core", "relational_store:native_appdatafwk", "relational_store:native_rdb", + "startup_l2:syspara", ] if (background_task_mgr_continuous_task_enable) { diff --git a/services/test/moduletest/start_option_display_id_test/BUILD.gn b/services/test/moduletest/start_option_display_id_test/BUILD.gn index 8d93ee2e65..d21958f5e1 100644 --- a/services/test/moduletest/start_option_display_id_test/BUILD.gn +++ b/services/test/moduletest/start_option_display_id_test/BUILD.gn @@ -23,8 +23,8 @@ ohos_moduletest("start_option_module_test") { "${ability_runtime_services_path}/abilitymgr/test/mock/libs/system_ability_mock", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${distributedschedule_path}/samgr/adapter/interfaces/innerkits/include/", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/test/mock/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/test/mock/include", ] sources = [ "start_option_display_id_test.cpp" ] @@ -35,16 +35,14 @@ ohos_moduletest("start_option_module_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/abilitymgr/test:abilityms_test_source", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/aakit:aakit_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_appmgr_mock", "${ability_runtime_services_path}/abilitymgr/test/mock/libs/appexecfwk_core:appexecfwk_bundlemgr_mock", "${ability_runtime_services_path}/common:perm_verification", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//third_party/libpng:libpng", @@ -57,6 +55,7 @@ ohos_moduletest("start_option_module_test") { "access_token:libaccesstoken_sdk", "common_event_service:cesfwk_innerkits", "dsoftbus:softbus_client", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/benchmarktest/ability_context_test/BUILD.gn b/test/benchmarktest/ability_context_test/BUILD.gn index d355a4f1a5..ef64a4da34 100644 --- a/test/benchmarktest/ability_context_test/BUILD.gn +++ b/test/benchmarktest/ability_context_test/BUILD.gn @@ -26,14 +26,15 @@ ohos_benchmarktest("BenchmarkTestForAbilityContext") { } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "//third_party/benchmark:benchmark", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", + "bundle_framework:appexecfwk_base", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "utils_base:utils", diff --git a/test/benchmarktest/ability_manager_test/BUILD.gn b/test/benchmarktest/ability_manager_test/BUILD.gn index 45c46c4e0e..51bf3acadd 100644 --- a/test/benchmarktest/ability_manager_test/BUILD.gn +++ b/test/benchmarktest/ability_manager_test/BUILD.gn @@ -26,8 +26,8 @@ ohos_benchmarktest("BenchmarkTestForAbilityManager") { } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "//third_party/benchmark:benchmark", "//third_party/googletest:gtest_main", ] diff --git a/test/benchmarktest/mission_manager_test/BUILD.gn b/test/benchmarktest/mission_manager_test/BUILD.gn index 3dfe051d5c..62e8896d71 100644 --- a/test/benchmarktest/mission_manager_test/BUILD.gn +++ b/test/benchmarktest/mission_manager_test/BUILD.gn @@ -26,8 +26,8 @@ ohos_benchmarktest("BenchmarkTestForMissionManager") { } deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "//third_party/benchmark:benchmark", "//third_party/googletest:gtest_main", ] @@ -38,6 +38,8 @@ ohos_benchmarktest("BenchmarkTestForMissionManager") { "ipc:ipc_core", "utils_base:utils", ] + resource_config_file = + "${form_fwk_path}/test/resource/benchmark/ohos_test.xml" } group("benchmarktest") { diff --git a/test/benchmarktest/mission_manager_test/mission_manager_test.cpp b/test/benchmarktest/mission_manager_test/mission_manager_test.cpp index 1aa8ce8d43..ac53be4aec 100644 --- a/test/benchmarktest/mission_manager_test/mission_manager_test.cpp +++ b/test/benchmarktest/mission_manager_test/mission_manager_test.cpp @@ -140,7 +140,9 @@ public: AbilityManagerClient::GetInstance()->StartAbility(want); std::vector info {}; AbilityManagerClient::GetInstance()->GetMissionInfos("", upperLimit, info); - missionId = info.front().id; + if (!info.empty()) { + missionId = info.front().id; + } } void TearDown(const ::benchmark::State &state) override @@ -151,8 +153,8 @@ public: protected: const string deviceId; - const string bundleName = "com.example.distributedcalc"; - const string abilityName = "com.example.distributedcalc.default"; + const string bundleName = "ohos.samples.FormApplication"; + const string abilityName = "ohos.samples.FormApplication.MainAbility"; int32_t missionId = 0; }; diff --git a/test/fuzztest/abilitymanager_fuzzer/BUILD.gn b/test/fuzztest/abilitymanager_fuzzer/BUILD.gn index 1dc3a373b3..9165e6f807 100644 --- a/test/fuzztest/abilitymanager_fuzzer/BUILD.gn +++ b/test/fuzztest/abilitymanager_fuzzer/BUILD.gn @@ -24,8 +24,7 @@ ohos_fuzztest("AbilityManagerFuzzTest") { fuzz_config_file = "${ability_runtime_path}/test/fuzztest/abilitymanager_fuzzer" - include_dirs = - [ "${ability_runtime_path}/interfaces/inner_api/ability_manager/include" ] + include_dirs = [ "${ability_runtime_innerkits_path}/ability_manager/include" ] cflags = [ "-g", "-O0", @@ -34,12 +33,12 @@ ohos_fuzztest("AbilityManagerFuzzTest") { ] sources = [ "abilitymanager_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", ] external_deps = [ diff --git a/test/fuzztest/acquiredataability_fuzzer/BUILD.gn b/test/fuzztest/acquiredataability_fuzzer/BUILD.gn index 7034c82ce7..064d658d8f 100644 --- a/test/fuzztest/acquiredataability_fuzzer/BUILD.gn +++ b/test/fuzztest/acquiredataability_fuzzer/BUILD.gn @@ -26,8 +26,8 @@ ohos_fuzztest("AcquireDataAbilityFuzzTest") { "${ability_runtime_path}/test/fuzztest/acquiredataability_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -39,12 +39,12 @@ ohos_fuzztest("AcquireDataAbilityFuzzTest") { sources = [ "acquiredataability_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", ] external_deps = [ diff --git a/test/fuzztest/appmanager_fuzzer/BUILD.gn b/test/fuzztest/appmanager_fuzzer/BUILD.gn index 57d7f7a33e..ae8d7d4074 100644 --- a/test/fuzztest/appmanager_fuzzer/BUILD.gn +++ b/test/fuzztest/appmanager_fuzzer/BUILD.gn @@ -25,8 +25,8 @@ ohos_fuzztest("AppManagerFuzzTest") { fuzz_config_file = "${ability_runtime_path}/test/fuzztest/appmanager_fuzzer" include_dirs = [ - "${ability_runtime_path}/services/appmgr/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include", + "${ability_runtime_services_path}/appmgr/include", + "${ability_runtime_innerkits_path}/app_manager/include", ] cflags = [ "-g", @@ -36,10 +36,10 @@ ohos_fuzztest("AppManagerFuzzTest") { ] sources = [ "appmanager_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_services_path}/appmgr:libappms", ] @@ -49,6 +49,7 @@ ohos_fuzztest("AppManagerFuzzTest") { "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", diff --git a/test/fuzztest/finishusertest_fuzzer/BUILD.gn b/test/fuzztest/finishusertest_fuzzer/BUILD.gn index 52a622b13f..d1a5d1965c 100644 --- a/test/fuzztest/finishusertest_fuzzer/BUILD.gn +++ b/test/fuzztest/finishusertest_fuzzer/BUILD.gn @@ -26,8 +26,8 @@ ohos_fuzztest("FinishUserTestFuzzTest") { "${ability_runtime_path}/test/fuzztest/finishusertest_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -39,12 +39,12 @@ ohos_fuzztest("FinishUserTestFuzzTest") { sources = [ "finishusertest_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_delegator", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_delegator", ] external_deps = [ "ability_base:want" ] diff --git a/test/fuzztest/getwantsender_fuzzer/BUILD.gn b/test/fuzztest/getwantsender_fuzzer/BUILD.gn index beb91b7f69..3a8e7b7785 100644 --- a/test/fuzztest/getwantsender_fuzzer/BUILD.gn +++ b/test/fuzztest/getwantsender_fuzzer/BUILD.gn @@ -26,8 +26,8 @@ ohos_fuzztest("GetWantSenderFuzzTest") { "${ability_runtime_path}/test/fuzztest/getwantsender_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -39,12 +39,12 @@ ohos_fuzztest("GetWantSenderFuzzTest") { sources = [ "getwantsender_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", ] external_deps = [ diff --git a/test/fuzztest/setmissionlabel_fuzzer/BUILD.gn b/test/fuzztest/setmissionlabel_fuzzer/BUILD.gn index d0137eab37..82dd1663d8 100644 --- a/test/fuzztest/setmissionlabel_fuzzer/BUILD.gn +++ b/test/fuzztest/setmissionlabel_fuzzer/BUILD.gn @@ -26,8 +26,8 @@ ohos_fuzztest("SetMissionLabelFuzzTest") { "${ability_runtime_path}/test/fuzztest/setmissionlabel_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -39,12 +39,12 @@ ohos_fuzztest("SetMissionLabelFuzzTest") { sources = [ "setmissionlabel_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", ] external_deps = [ diff --git a/test/fuzztest/startability_fuzzer/BUILD.gn b/test/fuzztest/startability_fuzzer/BUILD.gn index 047eb4426f..1dc59ea1f9 100644 --- a/test/fuzztest/startability_fuzzer/BUILD.gn +++ b/test/fuzztest/startability_fuzzer/BUILD.gn @@ -25,8 +25,8 @@ ohos_fuzztest("StartAbilityFuzzTest") { fuzz_config_file = "${ability_runtime_path}/test/fuzztest/startability_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -38,12 +38,12 @@ ohos_fuzztest("StartAbilityFuzzTest") { sources = [ "startability_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", ] external_deps = [ diff --git a/test/fuzztest/startcontinuation_fuzzer/BUILD.gn b/test/fuzztest/startcontinuation_fuzzer/BUILD.gn index 8a90d7911e..ea316c27c3 100644 --- a/test/fuzztest/startcontinuation_fuzzer/BUILD.gn +++ b/test/fuzztest/startcontinuation_fuzzer/BUILD.gn @@ -26,8 +26,8 @@ ohos_fuzztest("StartContinuationFuzzTest") { "${ability_runtime_path}/test/fuzztest/startcontinuation_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -39,12 +39,12 @@ ohos_fuzztest("StartContinuationFuzzTest") { sources = [ "startcontinuation_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", ] external_deps = [ diff --git a/test/fuzztest/stopserviceability_fuzzer/BUILD.gn b/test/fuzztest/stopserviceability_fuzzer/BUILD.gn index 336e5c8e2e..4a8f7f8979 100644 --- a/test/fuzztest/stopserviceability_fuzzer/BUILD.gn +++ b/test/fuzztest/stopserviceability_fuzzer/BUILD.gn @@ -26,8 +26,8 @@ ohos_fuzztest("StopServiceAbilityFuzzTest") { "${ability_runtime_path}/test/fuzztest/stopserviceability_fuzzer" include_dirs = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", - "${ability_runtime_path}/frameworks/kits/ability/native/include/", + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_kits_path}/ability/native/include/", ] cflags = [ @@ -39,11 +39,11 @@ ohos_fuzztest("StopServiceAbilityFuzzTest") { sources = [ "stopserviceability_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", ] external_deps = [ "ability_base:want" ] diff --git a/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn b/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn index 05c38a5ca9..0455af3b9d 100644 --- a/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn +++ b/test/fuzztest/updateconfiguration_fuzzer/BUILD.gn @@ -25,8 +25,7 @@ ohos_fuzztest("UpdateConfigurationFuzzTest") { fuzz_config_file = "${ability_runtime_path}/test/fuzztest/updateconfiguration_fuzzer" - include_dirs = - [ "${ability_runtime_path}/interfaces/inner_api/ability_manager/include" ] + include_dirs = [ "${ability_runtime_innerkits_path}/ability_manager/include" ] cflags = [ "-g", @@ -37,11 +36,11 @@ ohos_fuzztest("UpdateConfigurationFuzzTest") { sources = [ "updateconfiguration_fuzzer.cpp" ] - configs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager_public_config" ] + configs = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config" ] deps = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", ] external_deps = [ diff --git a/test/fuzztest/uripermissionmanager_fuzzer/BUILD.gn b/test/fuzztest/uripermissionmanager_fuzzer/BUILD.gn index 1cab2408e6..0b94ce7113 100644 --- a/test/fuzztest/uripermissionmanager_fuzzer/BUILD.gn +++ b/test/fuzztest/uripermissionmanager_fuzzer/BUILD.gn @@ -24,7 +24,7 @@ ohos_fuzztest("UriPermissionManagerFuzzTest") { fuzz_config_file = "${ability_runtime_path}/test/fuzztest/uripermissionmanager_fuzzer" - include_dirs = [ "${ability_runtime_path}/services/uripermmgr/include" ] + include_dirs = [ "${ability_runtime_services_path}/uripermmgr/include" ] cflags = [ "-g", "-O0", @@ -37,7 +37,7 @@ ohos_fuzztest("UriPermissionManagerFuzzTest") { deps = [ "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", "${ability_runtime_services_path}/uripermmgr:libupms", ] diff --git a/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn b/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn index 38e59e048d..32d849d44b 100644 --- a/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn +++ b/test/fuzztest/wantagenthelperstring_fuzzer/BUILD.gn @@ -36,9 +36,7 @@ ohos_fuzztest("WantAgentHelperStringFuzzTest") { sources = [ "wantagenthelperstring_fuzzer.cpp" ] - deps = [ - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - ] + deps = [ "${ability_runtime_kits_path}/wantagent:wantagent_innerkits" ] external_deps = [ "ability_base:base", diff --git a/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn b/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn index 2fa3aebc5a..b225b3abb6 100644 --- a/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn +++ b/test/fuzztest/wantagenthelpertrigger_fuzzer/BUILD.gn @@ -36,9 +36,7 @@ ohos_fuzztest("WantAgentHelperTriggerFuzzTest") { sources = [ "wantagenthelpertrigger_fuzzer.cpp" ] - deps = [ - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - ] + deps = [ "${ability_runtime_kits_path}/wantagent:wantagent_innerkits" ] external_deps = [ "ability_base:base", diff --git a/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestA/BUILD.gn index 657a990f43..b78692d0f1 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestA/BUILD.gn @@ -18,15 +18,14 @@ config("amsAbilityAppendTestAConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_kits_path}/appkit/native/app", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/want/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -46,9 +45,9 @@ ohos_shared_library("amsAbilityAppendTestA") { ] configs = [ ":amsAbilityAppendTestAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", @@ -61,6 +60,7 @@ ohos_shared_library("amsAbilityAppendTestA") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestB/BUILD.gn index b096b5e359..44208273fe 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestB/BUILD.gn @@ -18,15 +18,14 @@ config("amsAbilityAppendTestBConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_kits_path}/appkit/native/app", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -45,9 +44,9 @@ ohos_shared_library("amsAbilityAppendTestB") { ] configs = [ ":amsAbilityAppendTestBConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", @@ -60,6 +59,7 @@ ohos_shared_library("amsAbilityAppendTestB") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestPageA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestPageA/BUILD.gn index 790b3aacd8..63713c013b 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestPageA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestPageA/BUILD.gn @@ -17,17 +17,14 @@ SUBST_TOOLS_DIR = "test/resource/amssystemtestability/abilitySrc/tools" config("amsAbilityVisibleTestPageAConfig") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "${SUBDEMOSYSTEM_DIR}/include", - "${bundlefwk_path}/kits/appkit/native/app", - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/ability_runtime", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", ] defines = [ @@ -45,14 +42,12 @@ ohos_shared_library("amsAbilityVisibleTestPageA") { ] configs = [ ":amsAbilityVisibleTestPageAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", "//utils/native/base:utilsbase", @@ -64,6 +59,7 @@ ohos_shared_library("amsAbilityVisibleTestPageA") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_rdb", diff --git a/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestServiceB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestServiceB/BUILD.gn index a695613947..0f038a150b 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestServiceB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsAbilityVisibleTestServiceB/BUILD.gn @@ -16,17 +16,15 @@ SUBST_TOOLS_DIR = "test/resource/amssystemtestability/abilitySrc/tools" config("amsAbilityVisibleTestServiceBConfig") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "${SUBDEMOSYSTEM_DIR}/include", "${notification_path}/ans_standard/interfaces/innerkits/wantagent/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/ability_runtime", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_kits_path}/appkit/native/ability_runtime", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", ] defines = [ @@ -45,14 +43,12 @@ ohos_shared_library("amsAbilityVisibleTestServiceB") { ] configs = [ ":amsAbilityVisibleTestServiceBConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:app_context", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/frameworks/kits/wantagent:wantagent_innerkits", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:app_context", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_kits_path}/wantagent:wantagent_innerkits", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", "//utils/native/base:utilsbase", @@ -64,6 +60,7 @@ ohos_shared_library("amsAbilityVisibleTestServiceB") { "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedSingletonTest/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedSingletonTest/BUILD.gn index c8de08172e..123e175691 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedSingletonTest/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedSingletonTest/BUILD.gn @@ -16,14 +16,13 @@ SUBST_TOOLS_DIR = "test/resource/amssystemtestability/abilitySrc/tools" config("amsConfigurationUpdatedSingletonTestConfig") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", ] @@ -43,10 +42,10 @@ ohos_shared_library("amsConfigurationUpdatedSingletonTest") { ] configs = [ ":amsConfigurationUpdatedSingletonTestConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/bundlemgr:libbms", "${inner_api_path}/appexecfwk_base:appexecfwk_base", "//utils/native/base:utilsbase", @@ -56,6 +55,7 @@ ohos_shared_library("amsConfigurationUpdatedSingletonTest") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedTest/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedTest/BUILD.gn index a010e1ed2b..9becd71630 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedTest/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsConfigurationUpdatedTest/BUILD.gn @@ -17,14 +17,13 @@ SUBST_TOOLS_DIR = "test/resource/amssystemtestability/abilitySrc/tools" config("amsConfigurationUpdatedTestConfig") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", ] @@ -45,10 +44,10 @@ ohos_shared_library("amsConfigurationUpdatedTest") { ] configs = [ ":amsConfigurationUpdatedTestConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${ability_runtime_services_path}/bundlemgr:libbms", "${inner_api_path}/appexecfwk_base:appexecfwk_base", "//utils/native/base:utilsbase", @@ -58,6 +57,7 @@ ohos_shared_library("amsConfigurationUpdatedTest") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestA/BUILD.gn index f0cdfbc0ab..0c235c5579 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestA/BUILD.gn @@ -19,15 +19,14 @@ config("amsDataSystemTestAConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -48,9 +47,9 @@ ohos_shared_library("amsDataSystemTestA") { ] configs = [ ":amsDataSystemTestAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", @@ -64,6 +63,7 @@ ohos_shared_library("amsDataSystemTestA") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestB/BUILD.gn index e59cc6c265..0843063af4 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestB/BUILD.gn @@ -19,15 +19,13 @@ config("amsDataSystemTestBConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -48,11 +46,9 @@ ohos_shared_library("amsDataSystemTestB") { ] configs = [ ":amsDataSystemTestBConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", "//third_party/jsoncpp:jsoncpp", @@ -64,6 +60,7 @@ ohos_shared_library("amsDataSystemTestB") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestC/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestC/BUILD.gn index 1b67826595..08205a73d7 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestC/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestC/BUILD.gn @@ -19,15 +19,13 @@ config("amsDataSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -48,11 +46,9 @@ ohos_shared_library("amsDataSystemTestC") { ] configs = [ ":amsDataSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", "//third_party/jsoncpp:jsoncpp", @@ -64,6 +60,7 @@ ohos_shared_library("amsDataSystemTestC") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestA/BUILD.gn index 41b7118fc3..5bd60c3c56 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestA/BUILD.gn @@ -18,15 +18,14 @@ config("amsKitSystemTestAConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -46,9 +45,9 @@ ohos_shared_library("amsKitSystemTestA") { ] configs = [ ":amsKitSystemTestAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${inner_api_path}/appexecfwk_base:appexecfwk_base", "//third_party/jsoncpp:jsoncpp", @@ -59,6 +58,7 @@ ohos_shared_library("amsKitSystemTestA") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestB/BUILD.gn index e3df732621..d0505fcccc 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestB/BUILD.gn @@ -18,15 +18,14 @@ config("amsKitSystemTestBConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -45,9 +44,9 @@ ohos_shared_library("amsKitSystemTestB") { ] configs = [ ":amsKitSystemTestBConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${inner_api_path}/appexecfwk_base:appexecfwk_base", "//third_party/jsoncpp:jsoncpp", @@ -58,6 +57,7 @@ ohos_shared_library("amsKitSystemTestB") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataA/BUILD.gn index 54fa7bb008..a3076a4f55 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataA/BUILD.gn @@ -19,15 +19,14 @@ config("amsKitSystemTestDataAConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -51,9 +50,9 @@ ohos_shared_library("amsKitSystemTestDataA") { ] configs = [ ":amsKitSystemTestDataAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", @@ -67,6 +66,7 @@ ohos_shared_library("amsKitSystemTestDataA") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataB/BUILD.gn index f579cce9c3..462237c94f 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestDataB/BUILD.gn @@ -19,15 +19,14 @@ config("amsKitSystemTestDataBConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_runtime_services_path}/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", + "${ability_runtime_services_path}/abilitymgr/include", "${common_path}/log/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -49,9 +48,9 @@ ohos_shared_library("amsKitSystemTestDataB") { ] configs = [ ":amsKitSystemTestDataBConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "${ability_runtime_services_path}/bundlemgr:libbms", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability", "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb", @@ -65,6 +64,7 @@ ohos_shared_library("amsKitSystemTestDataB") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestPageA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestPageA/BUILD.gn index aaea6957f9..709ffdfa85 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestPageA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestPageA/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -46,21 +44,19 @@ ohos_shared_library("amsKitSystemTestPageA") { ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] external_deps = [ - "ability_base:want", + "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestService/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestService/BUILD.gn index 442f15e8b8..274f86ba8a 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestService/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSystemTestService/BUILD.gn @@ -19,14 +19,12 @@ config("amsKitSystemTestServiceconfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", - "${bundlefwk_path}/services/bundlemgr/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", + "${ability_runtime_kits_path}/appkit/native/app", "//third_party/jsoncpp/include", ] defines = [ @@ -51,13 +49,10 @@ ohos_shared_library("amsKitSystemTestService") { } configs = [ ":amsKitSystemTestServiceconfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -66,6 +61,7 @@ ohos_shared_library("amsKitSystemTestService") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsStDataAbility/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsStDataAbility/BUILD.gn index e824d4fa3b..1f1352a61e 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsStDataAbility/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsStDataAbility/BUILD.gn @@ -19,15 +19,13 @@ SUBDEMOSYSTEM_DIR = config("verify_act_ability_config") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", ] defines = [ "AMS_LOG_TAG = \"amsStDataAbility\"", @@ -47,12 +45,10 @@ ohos_shared_library("amsStDataAbility") { configs = [ ":verify_act_ability_config" ] public_configs = [ ":verify_act_ability_public_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//utils/native/base:utilsbase", ] external_deps = [ @@ -61,6 +57,7 @@ ohos_shared_library("amsStDataAbility") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "dataability:native_dataability", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "relational_store:native_appdatafwk", diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestA/BUILD.gn index 4b66eb41f4..40bb824bf2 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestA/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestAConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -46,11 +44,9 @@ ohos_shared_library("amsSystemTestA") { ] configs = [ ":amsSystemTestAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -59,6 +55,7 @@ ohos_shared_library("amsSystemTestA") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestB/BUILD.gn index c6093081f3..ca1a0aa3da 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestB/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestBConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -41,11 +39,9 @@ ohos_shared_library("amsSystemTestB") { ] configs = [ ":amsSystemTestBConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -54,6 +50,7 @@ ohos_shared_library("amsSystemTestB") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestC/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestC/BUILD.gn index b10f4ea7c1..64ee32106a 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestC/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestC/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -43,11 +41,9 @@ ohos_shared_library("amsSystemTestC") { ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -56,6 +52,7 @@ ohos_shared_library("amsSystemTestC") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestD/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestD/BUILD.gn index 3faab41b1d..e42d44ee2e 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestD/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestD/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestDConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -42,11 +40,9 @@ ohos_shared_library("amsSystemTestD") { ] configs = [ ":amsSystemTestDConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -55,6 +51,7 @@ ohos_shared_library("amsSystemTestD") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestDFX/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestDFX/BUILD.gn index 9b80443e8b..b840f525b9 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestDFX/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestDFX/BUILD.gn @@ -19,15 +19,13 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -43,12 +41,10 @@ ohos_shared_library("amsSystemTestDFX") { ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -57,6 +53,7 @@ ohos_shared_library("amsSystemTestDFX") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestE/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestE/BUILD.gn index f17e69dd26..6999c2debe 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestE/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestE/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestEConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -41,11 +39,9 @@ ohos_shared_library("amsSystemTestE") { ] configs = [ ":amsSystemTestEConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -54,6 +50,7 @@ ohos_shared_library("amsSystemTestE") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorK/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorK/BUILD.gn index 184cdcc8d9..4971f9173c 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorK/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorK/BUILD.gn @@ -17,14 +17,12 @@ config("amsSystemTestErrorKConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -36,17 +34,16 @@ ohos_shared_library("amsSystemTestErrorK") { sources = [ "${SUBDEMOSYSTEM_DIR}/src/amsstabilityerrork1.cpp" ] configs = [ ":amsSystemTestErrorKConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorL/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorL/BUILD.gn index e109014ccc..148b26c977 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorL/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestErrorL/BUILD.gn @@ -17,14 +17,12 @@ config("amsSystemTestErrorLConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -36,17 +34,16 @@ ohos_shared_library("amsSystemTestErrorL") { sources = [ "${SUBDEMOSYSTEM_DIR}/src/amsstabilityerrorl1.cpp" ] configs = [ ":amsSystemTestErrorLConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_core", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestF/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestF/BUILD.gn index d6cd598e5b..1cf2a44318 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestF/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestF/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestFConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -43,11 +41,9 @@ ohos_shared_library("amsSystemTestF") { ] configs = [ ":amsSystemTestFConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -56,6 +52,7 @@ ohos_shared_library("amsSystemTestF") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestG/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestG/BUILD.gn index 727a05d591..3be2779558 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestG/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestG/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestGConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -42,11 +40,9 @@ ohos_shared_library("amsSystemTestG") { ] configs = [ ":amsSystemTestGConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -55,6 +51,7 @@ ohos_shared_library("amsSystemTestG") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestH/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestH/BUILD.gn index 7c27138227..b670404953 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestH/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestH/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestHConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -41,11 +39,9 @@ ohos_shared_library("amsSystemTestH") { ] configs = [ ":amsSystemTestHConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -54,6 +50,7 @@ ohos_shared_library("amsSystemTestH") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestI/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestI/BUILD.gn index 584d67c862..6c4ef2f483 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestI/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestI/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestIConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -44,11 +42,9 @@ ohos_shared_library("amsSystemTestI") { ] configs = [ ":amsSystemTestIConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -57,6 +53,7 @@ ohos_shared_library("amsSystemTestI") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestM/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestM/BUILD.gn index a267009f17..cf35929430 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestM/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestM/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestMConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -41,11 +39,9 @@ ohos_shared_library("amsSystemTestM") { ] configs = [ ":amsSystemTestMConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -54,6 +50,7 @@ ohos_shared_library("amsSystemTestM") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestN/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestN/BUILD.gn index 0fe9a2355e..a993629c05 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestN/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestN/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestNConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -44,11 +42,9 @@ ohos_shared_library("amsSystemTestN") { ] configs = [ ":amsSystemTestNConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -57,6 +53,7 @@ ohos_shared_library("amsSystemTestN") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestO/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestO/BUILD.gn index 7dea78d8d7..c9109f87ef 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestO/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestO/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestOConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -41,11 +39,9 @@ ohos_shared_library("amsSystemTestO") { ] configs = [ ":amsSystemTestOConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -54,6 +50,7 @@ ohos_shared_library("amsSystemTestO") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestP/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestP/BUILD.gn index 3232aea781..62a3e26871 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestP/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestP/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestPConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -41,11 +39,9 @@ ohos_shared_library("amsSystemTestP") { ] configs = [ ":amsSystemTestPConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -54,6 +50,7 @@ ohos_shared_library("amsSystemTestP") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestQ/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestQ/BUILD.gn index 0225b10d7d..8fb0be76ff 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestQ/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestQ/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestQConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -44,11 +42,9 @@ ohos_shared_library("amsSystemTestQ") { ] configs = [ ":amsSystemTestQConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -57,6 +53,7 @@ ohos_shared_library("amsSystemTestQ") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestR/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestR/BUILD.gn index e5ce1c81c6..4e0c0d47c0 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestR/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestR/BUILD.gn @@ -18,15 +18,13 @@ config("amsSystemTestRConfig") { visibility = [ ":*" ] include_dirs = [ "${SUBDEMOSYSTEM_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${SUBST_TOOLS_DIR}/include", - "//base/notification/eventhandler/interfaces/inner_api", "//third_party/jsoncpp/include", ] defines = [ @@ -44,11 +42,9 @@ ohos_shared_library("amsSystemTestR") { ] configs = [ ":amsSystemTestRConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -57,6 +53,7 @@ ohos_shared_library("amsSystemTestR") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceA/BUILD.gn index d677f0b115..eb4fc2dc42 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceA/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,12 +36,10 @@ ohos_shared_library("amsSystemTestServiceA") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_a1.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//utils/native/base:utilsbase", ] external_deps = [ @@ -51,6 +47,7 @@ ohos_shared_library("amsSystemTestServiceA") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceB/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceB/BUILD.gn index 1c1a354a44..b2e6431d2c 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceB/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceB/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -41,12 +39,10 @@ ohos_shared_library("amsSystemTestServiceB") { ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -55,6 +51,7 @@ ohos_shared_library("amsSystemTestServiceB") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceC/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceC/BUILD.gn index e8b92beeb4..695e62288c 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceC/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceC/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,11 +36,9 @@ ohos_shared_library("amsSystemTestServiceC") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_c4.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -51,6 +47,7 @@ ohos_shared_library("amsSystemTestServiceC") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceD/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceD/BUILD.gn index f55db343fc..a120f817da 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceD/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceD/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,12 +36,10 @@ ohos_shared_library("amsSystemTestServiceD") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_d1.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -53,6 +49,7 @@ ohos_shared_library("amsSystemTestServiceD") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceE/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceE/BUILD.gn index 1145a2de23..b417a03636 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceE/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceE/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,12 +36,10 @@ ohos_shared_library("amsSystemTestServiceE") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_e2.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -53,6 +49,7 @@ ohos_shared_library("amsSystemTestServiceE") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceF/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceF/BUILD.gn index 7cfe7481c7..fed20e4941 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceF/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceF/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,11 +36,9 @@ ohos_shared_library("amsSystemTestServiceF") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_f3.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -52,6 +48,7 @@ ohos_shared_library("amsSystemTestServiceF") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceG/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceG/BUILD.gn index 2246b0e069..9ca4c2db8a 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceG/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceG/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,12 +36,10 @@ ohos_shared_library("amsSystemTestServiceG") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_g1.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -53,6 +49,7 @@ ohos_shared_library("amsSystemTestServiceG") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceH/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceH/BUILD.gn index 6a885409db..13d3f7d4d7 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceH/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/amsSystemTestServiceH/BUILD.gn @@ -19,14 +19,12 @@ config("amsSystemTestCConfig") { visibility = [ ":*" ] include_dirs = [ "${subdemosystem_path}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", - "//base/notification/eventhandler/interfaces/inner_api", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "//third_party/jsoncpp/include", ] defines = [ @@ -38,12 +36,10 @@ ohos_shared_library("amsSystemTestServiceH") { sources = [ "${subdemosystem_path}/src/ams_st_service_ability_h1.cpp" ] configs = [ ":amsSystemTestCConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utilsbase", ] @@ -53,6 +49,7 @@ ohos_shared_library("amsSystemTestServiceH") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/fwkAbilityState/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/fwkAbilityState/BUILD.gn index def210bc9e..297ed32fb2 100644 --- a/test/resource/amssystemtestability/abilitySrc/fwkAbilityState/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/fwkAbilityState/BUILD.gn @@ -16,15 +16,13 @@ TOOLS_DIR = "test/resource/amssystemtestability/abilitySrc/tools" config("amsSystemTestAConfig") { visibility = [ ":*" ] include_dirs = [ - "//base/notification/eventhandler/interfaces/inner_api", "${APP_DIR}/include", - "${ability_runtime_path}/frameworks/kits/appkit/native/app", + "${ability_runtime_kits_path}/appkit/native/app", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", + "${ability_runtime_innerkits_path}/ability_manager/include", "${ability_base_innerapi_path}/uri/include", - "${bundlefwk_path}/services/bundlemgr/include", - "${ability_runtime_path}/services/abilitymgr/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/abilitymgr/include", + "${ability_runtime_services_path}/common/include", "${TOOLS_DIR}/include", ] defines = [ @@ -45,11 +43,9 @@ ohos_shared_library("fwkAbilityState") { ] configs = [ ":amsSystemTestAConfig" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", - "${bundlefwk_path}/services/bundlemgr:libbms", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", "//utils/native/base:utilsbase", ] external_deps = [ @@ -57,6 +53,7 @@ ohos_shared_library("fwkAbilityState") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/resource/amssystemtestability/abilitySrc/serviceAbilityA/BUILD.gn b/test/resource/amssystemtestability/abilitySrc/serviceAbilityA/BUILD.gn index dc09990c6d..ed5fe4f236 100644 --- a/test/resource/amssystemtestability/abilitySrc/serviceAbilityA/BUILD.gn +++ b/test/resource/amssystemtestability/abilitySrc/serviceAbilityA/BUILD.gn @@ -36,8 +36,8 @@ ohos_shared_library("serviceAbilityA") { } configs = [ ":service_ability_a_config" ] deps = [ - "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native", - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", + "${ability_runtime_kits_path}/ability/native:abilitykit_native", + "${ability_runtime_kits_path}/appkit:appkit_native", ] external_deps = [ "ability_base:want", diff --git a/test/systemtest/common/ams/BUILD.gn b/test/systemtest/common/ams/BUILD.gn index 5af8d48bad..f3dd27cef4 100644 --- a/test/systemtest/common/ams/BUILD.gn +++ b/test/systemtest/common/ams/BUILD.gn @@ -13,18 +13,6 @@ import("//build/ohos.gni") -config("ams_system_test_config") { - defines = [ - # "AMS_LOG_TAG = \"AmsSystemTest\"", - # "AMS_LOG_DOMAIN = 0xD00111F", - ] - - configs = [ - # "${bundlefwk_inner_api_path}/appexecfwk_core:bundlemgr_sdk_config", - # "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base_sdk_config", - ] -} - group("systemtest") { testonly = true diff --git a/test/systemtest/common/ams/ams_aa_command_test/BUILD.gn b/test/systemtest/common/ams/ams_aa_command_test/BUILD.gn index 8962ba25bd..043e6b29c0 100644 --- a/test/systemtest/common/ams/ams_aa_command_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_aa_command_test/BUILD.gn @@ -34,19 +34,17 @@ ohos_systemtest("ams_aa_command_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -57,6 +55,7 @@ ohos_systemtest("ams_aa_command_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_ability_append_test/BUILD.gn b/test/systemtest/common/ams/ams_ability_append_test/BUILD.gn index c918686350..ca7f7d8f43 100644 --- a/test/systemtest/common/ams/ams_ability_append_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_ability_append_test/BUILD.gn @@ -32,19 +32,17 @@ ohos_systemtest("ams_ability_append_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -55,6 +53,7 @@ ohos_systemtest("ams_ability_append_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_ability_state_age_manual_test/BUILD.gn b/test/systemtest/common/ams/ams_ability_state_age_manual_test/BUILD.gn index 6b286f1e04..3c3091cec7 100644 --- a/test/systemtest/common/ams/ams_ability_state_age_manual_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_ability_state_age_manual_test/BUILD.gn @@ -17,14 +17,12 @@ module_output_path = "appexecfwk_standard/ams/" config("system_test_ams_ability_state_age_manual_test_config") { include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", + "${ability_runtime_kits_path}/appkit/native/app/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/include", "${ability_base_innerapi_path}/want/include", "//third_party/json/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", ] cflags = [] if (target_cpu == "arm") { @@ -49,11 +47,8 @@ ohos_systemtest("ams_ability_state_age_manual_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", - - # "${ability_runtime_path}/frameworks/kits/appkit:appkit_config", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ":system_test_ams_ability_state_age_manual_test_config", "test/systemtest/common/ams/tool/:system_test_ability_util_config", ] @@ -62,12 +57,10 @@ ohos_systemtest("ams_ability_state_age_manual_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -77,6 +70,7 @@ ohos_systemtest("ams_ability_state_age_manual_test") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_ability_state_test/BUILD.gn b/test/systemtest/common/ams/ams_ability_state_test/BUILD.gn index f285b415a0..d253a24c1c 100644 --- a/test/systemtest/common/ams/ams_ability_state_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_ability_state_test/BUILD.gn @@ -17,14 +17,12 @@ module_output_path = "appexecfwk_standard/ams/" config("system_test_ams_ability_state_test_config") { include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", + "${ability_runtime_kits_path}/appkit/native/app/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/include", "${ability_base_innerapi_path}/want/include", "//third_party/json/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", ] cflags = [] if (target_cpu == "arm") { @@ -49,11 +47,8 @@ ohos_systemtest("ams_ability_state_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", - - # "${ability_runtime_path}/frameworks/kits/appkit:appkit_config", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ":system_test_ams_ability_state_test_config", "test/systemtest/common/ams/tool/:system_test_ability_util_config", ] @@ -62,12 +57,10 @@ ohos_systemtest("ams_ability_state_test") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -77,6 +70,7 @@ ohos_systemtest("ams_ability_state_test") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_ability_visible_test/BUILD.gn b/test/systemtest/common/ams/ams_ability_visible_test/BUILD.gn index 98f7d94041..d97e374b22 100644 --- a/test/systemtest/common/ams/ams_ability_visible_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_ability_visible_test/BUILD.gn @@ -31,19 +31,17 @@ ohos_systemtest("ams_ability_visible_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -54,6 +52,7 @@ ohos_systemtest("ams_ability_visible_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_app_process_manage_test/BUILD.gn b/test/systemtest/common/ams/ams_app_process_manage_test/BUILD.gn index 9935a8453e..15b7903384 100644 --- a/test/systemtest/common/ams/ams_app_process_manage_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_app_process_manage_test/BUILD.gn @@ -31,19 +31,17 @@ ohos_systemtest("ams_app_process_manage_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -54,6 +52,7 @@ ohos_systemtest("ams_app_process_manage_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_check_service/BUILD.gn b/test/systemtest/common/ams/ams_check_service/BUILD.gn index dd12228c75..006938f322 100644 --- a/test/systemtest/common/ams/ams_check_service/BUILD.gn +++ b/test/systemtest/common/ams/ams_check_service/BUILD.gn @@ -17,14 +17,12 @@ module_output_path = "appexecfwk_standard/ams/" config("ams_check_service_config") { include_dirs = [ - "${ability_runtime_path}/frameworks/kits/appkit/native/app/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", + "${ability_runtime_kits_path}/appkit/native/app/include", "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/interfaces/inner_api/app_manager/include/appmgr", - "${ability_runtime_path}/frameworks/kits/ability/native/include", + "${ability_runtime_innerkits_path}/app_manager/include/appmgr", + "${ability_runtime_kits_path}/ability/native/include", "${ability_base_innerapi_path}/want/include", "//third_party/json/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", ] cflags = [] if (target_cpu == "arm") { @@ -49,11 +47,8 @@ ohos_systemtest("ams_check_service") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", - - # "${ability_runtime_path}/frameworks/kits/appkit:appkit_config", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ":ams_check_service_config", "test/systemtest/common/ams/tool/:system_test_ability_util_config", ] @@ -62,12 +57,10 @@ ohos_systemtest("ams_check_service") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/frameworks/kits/appkit:appkit_native", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_kits_path}/appkit:appkit_native", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -77,6 +70,7 @@ ohos_systemtest("ams_check_service") { "ability_base:zuri", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_configuration_updated_test/BUILD.gn b/test/systemtest/common/ams/ams_configuration_updated_test/BUILD.gn index 824c6015e9..2e99cf3629 100644 --- a/test/systemtest/common/ams/ams_configuration_updated_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_configuration_updated_test/BUILD.gn @@ -31,19 +31,17 @@ ohos_systemtest("ams_configuration_updated_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -54,6 +52,7 @@ ohos_systemtest("ams_configuration_updated_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_data_ability_test/BUILD.gn b/test/systemtest/common/ams/ams_data_ability_test/BUILD.gn index 86b83ebe22..cf30d80f31 100644 --- a/test/systemtest/common/ams/ams_data_ability_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_data_ability_test/BUILD.gn @@ -33,19 +33,17 @@ ohos_systemtest("ams_data_ability_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -57,6 +55,7 @@ ohos_systemtest("ams_data_ability_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_dfx_test/BUILD.gn b/test/systemtest/common/ams/ams_dfx_test/BUILD.gn index 2e986f6f7c..8e195a80bb 100644 --- a/test/systemtest/common/ams/ams_dfx_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_dfx_test/BUILD.gn @@ -31,19 +31,17 @@ ohos_systemtest("ams_dfx_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -54,6 +52,7 @@ ohos_systemtest("ams_dfx_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/ams_service_ability_test/BUILD.gn b/test/systemtest/common/ams/ams_service_ability_test/BUILD.gn index c0c91593ad..a92ed30678 100644 --- a/test/systemtest/common/ams/ams_service_ability_test/BUILD.gn +++ b/test/systemtest/common/ams/ams_service_ability_test/BUILD.gn @@ -33,20 +33,18 @@ ohos_systemtest("ams_service_ability_test") { ] configs = [ - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", "${distributedschedule_path}/safwk/interfaces/innerkits/safwk:system_ability_fwk", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/googletest:gtest_main", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", @@ -57,6 +55,7 @@ ohos_systemtest("ams_service_ability_test") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/test/systemtest/common/ams/tool/BUILD.gn b/test/systemtest/common/ams/tool/BUILD.gn index 2e431ef2d8..24941d49bd 100644 --- a/test/systemtest/common/ams/tool/BUILD.gn +++ b/test/systemtest/common/ams/tool/BUILD.gn @@ -35,18 +35,16 @@ ohos_shared_library("system_test_ability_util_lib") { configs = [ ":system_test_ability_util_config", - "${ability_runtime_path}/services/abilitymgr:abilityms_config", - "${ability_runtime_path}/services/test/moduletest/module_test_dump_util:module_test_dump_util_config", - "${ability_runtime_path}/services/appmgr:appmgr_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + "${ability_runtime_services_path}/test/moduletest/module_test_dump_util:module_test_dump_util_config", + "${ability_runtime_services_path}/appmgr:appmgr_config", ] deps = [ - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", - "${ability_runtime_path}/services/abilitymgr:abilityms", - "${ability_runtime_path}/services/test/moduletest/module_test_dump_util:module_test_dump_util_lib", - "${bundlefwk_inner_api_path}/appexecfwk_base:appexecfwk_base", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/test/moduletest/module_test_dump_util:module_test_dump_util_lib", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", - "//base/notification/eventhandler/frameworks/eventhandler:libeventhandler", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", ] @@ -56,6 +54,7 @@ ohos_shared_library("system_test_ability_util_lib") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", + "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/tools/aa/BUILD.gn b/tools/aa/BUILD.gn index bba47b3226..f36302f6fe 100644 --- a/tools/aa/BUILD.gn +++ b/tools/aa/BUILD.gn @@ -51,8 +51,8 @@ ohos_source_set("tools_aa_source_set") { } deps = [ - "${ability_runtime_path}/interfaces/inner_api/ability_manager:ability_manager", - "${ability_runtime_path}/interfaces/inner_api/app_manager:app_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/app_manager:app_manager", "${ability_runtime_services_path}/abilitymgr:abilityms", ] diff --git a/tools/aa/include/ability_command.h b/tools/aa/include/ability_command.h index 6f41abdeee..ffd8c9626c 100644 --- a/tools/aa/include/ability_command.h +++ b/tools/aa/include/ability_command.h @@ -32,7 +32,7 @@ const std::string HELP_MSG = "usage: aa \n" " dump dump the ability info\n" " force-stop force stop the process with bundle name\n" " test start the test framework with options\n" - " ApplicationNotRespondin Pass in pid with options\n" + " ApplicationNotResponding Pass in pid with options\n" " block-ability block ability with ability record id\n" " block-ams-service block ams service\n" " block-app-service block app service\n"; @@ -43,8 +43,8 @@ const std::string HELP_MSG_SCREEN = " -h, --help list available commands\n" " -p, --power power on or off with a state name\n"; -const std::string HELP_ApplicationNotRespondin = - "usage: aa ApplicationNotRespondin \n" +const std::string HELP_ApplicationNotResponding = + "usage: aa ApplicationNotResponding \n" "options list:\n" " -h, --help list available commands\n" " -p, --pid Pass in pid with option\n"; @@ -166,7 +166,7 @@ private: ErrCode RunAsForceStop(); #ifdef ABILITY_COMMAND_FOR_TEST ErrCode RunForceTimeoutForTest(); - ErrCode RunAsSendAppNotRespondinProcessID(); + ErrCode RunAsSendAppNotRespondingProcessID(); ErrCode RunAsBlockAbilityCommand(); ErrCode RunAsBlockAmsServiceCommand(); ErrCode RunAsBlockAppServiceCommand(); diff --git a/tools/aa/src/ability_command.cpp b/tools/aa/src/ability_command.cpp index a746a864ce..d8e327f032 100644 --- a/tools/aa/src/ability_command.cpp +++ b/tools/aa/src/ability_command.cpp @@ -45,9 +45,9 @@ constexpr struct option LONG_OPTIONS[] = { {"debug", no_argument, nullptr, 'D'}, {nullptr, 0, nullptr, 0}, }; -const std::string SHORT_OPTIONS_ApplicationNotRespondin = "hp:"; +const std::string SHORT_OPTIONS_ApplicationNotResponding = "hp:"; #ifdef ABILITY_COMMAND_FOR_TEST -constexpr struct option LONG_OPTIONS_ApplicationNotRespondin[] = { +constexpr struct option LONG_OPTIONS_ApplicationNotResponding[] = { {"help", no_argument, nullptr, 'h'}, {"pid", required_argument, nullptr, 'p'}, {nullptr, 0, nullptr, 0}, @@ -88,7 +88,7 @@ ErrCode AbilityManagerShellCommand::CreateCommandMap() {"test", std::bind(&AbilityManagerShellCommand::RunAsTestCommand, this)}, #ifdef ABILITY_COMMAND_FOR_TEST {"force-timeout", std::bind(&AbilityManagerShellCommand::RunForceTimeoutForTest, this)}, - {"ApplicationNotRespondin", std::bind(&AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID, this)}, + {"ApplicationNotResponding", std::bind(&AbilityManagerShellCommand::RunAsSendAppNotRespondingProcessID, this)}, {"block-ability", std::bind(&AbilityManagerShellCommand::RunAsBlockAbilityCommand, this)}, {"block-ams-service", std::bind(&AbilityManagerShellCommand::RunAsBlockAmsServiceCommand, this)}, {"block-app-service", std::bind(&AbilityManagerShellCommand::RunAsBlockAppServiceCommand, this)}, @@ -183,8 +183,8 @@ ErrCode AbilityManagerShellCommand::CreateMessageMap() "error: terminate service is connected.", }, { - START_SERVICE_ABILITY_ACTIVING, - "error: start service ability activing.", + START_SERVICE_ABILITY_ACTIVATING, + "error: start service ability activating.", }, { KILL_PROCESS_FAILED, @@ -1065,21 +1065,21 @@ sptr AbilityManagerShellCommand::GetAbilityManagerService() } #ifdef ABILITY_COMMAND_FOR_TEST -ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID() +ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondingProcessID() { static sptr abilityMs_; std::string pid = ""; int option = -1; ErrCode result = OHOS::ERR_OK; - option = getopt_long(argc_, argv_, SHORT_OPTIONS_ApplicationNotRespondin.c_str(), - LONG_OPTIONS_ApplicationNotRespondin, nullptr); + option = getopt_long(argc_, argv_, SHORT_OPTIONS_ApplicationNotResponding.c_str(), + LONG_OPTIONS_ApplicationNotResponding, nullptr); HILOG_INFO("option: %{public}d, optopt: %{public}d, optind: %{public}d", option, optopt, optind); if (optind < 0 || optind > argc_) { return OHOS::ERR_INVALID_VALUE; } if (option == -1) { if (strcmp(argv_[optind], cmd_.c_str()) == 0) { - HILOG_INFO("'aa %{public}s' %{public}s", HELP_ApplicationNotRespondin.c_str(), cmd_.c_str()); + HILOG_INFO("'aa %{public}s' %{public}s", HELP_ApplicationNotResponding.c_str(), cmd_.c_str()); result = OHOS::ERR_INVALID_VALUE; } } else if (option == '?') { @@ -1089,7 +1089,7 @@ ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID() break; } case 'p': { - HILOG_INFO("'aa ApplicationNotRespondin -p' with no argument."); + HILOG_INFO("'aa ApplicationNotResponding -p' with no argument."); resultReceiver_.append("error: option -p "); resultReceiver_.append("' requires a value.\n"); result = OHOS::ERR_INVALID_VALUE; @@ -1099,7 +1099,7 @@ ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID() std::string unknownOption = ""; std::string unknownOptionMsg = GetUnknownOptionMsg(unknownOption); - HILOG_INFO("'aa ApplicationNotRespondin' with an unknown option."); + HILOG_INFO("'aa ApplicationNotResponding' with an unknown option."); resultReceiver_.append(unknownOptionMsg); result = OHOS::ERR_INVALID_VALUE; @@ -1109,7 +1109,7 @@ ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID() std::string unknownOption = ""; std::string unknownOptionMsg = GetUnknownOptionMsg(unknownOption); - HILOG_INFO("'aa ApplicationNotRespondin' with an unknown option."); + HILOG_INFO("'aa ApplicationNotResponding' with an unknown option."); resultReceiver_.append(unknownOptionMsg); result = OHOS::ERR_INVALID_VALUE; @@ -1123,10 +1123,10 @@ ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID() break; } case 'p': { - HILOG_INFO("aa ApplicationNotRespondin 'aa %{public}s' -p process.", cmd_.c_str()); - HILOG_INFO("aa ApplicationNotRespondin 'aa optarg = %{public}s'.", optarg); + HILOG_INFO("aa ApplicationNotResponding 'aa %{public}s' -p process.", cmd_.c_str()); + HILOG_INFO("aa ApplicationNotResponding 'aa optarg = %{public}s'.", optarg); pid = optarg; - HILOG_INFO("aa ApplicationNotRespondinr 'aa pid = %{public}s'.", pid.c_str()); + HILOG_INFO("aa ApplicationNotResponding 'aa pid = %{public}s'.", pid.c_str()); break; } case 0: { @@ -1151,7 +1151,7 @@ ErrCode AbilityManagerShellCommand::RunAsSendAppNotRespondinProcessID() abilityMs_->SendANRProcessID(atoi(pid.c_str())); } } else { - resultReceiver_.append(HELP_ApplicationNotRespondin+ "\n"); + resultReceiver_.append(HELP_ApplicationNotResponding+ "\n"); result = OHOS::ERR_INVALID_VALUE; } return result; diff --git a/tools/aa/src/ability_tool_command.cpp b/tools/aa/src/ability_tool_command.cpp index 4801775814..5648711fd4 100644 --- a/tools/aa/src/ability_tool_command.cpp +++ b/tools/aa/src/ability_tool_command.cpp @@ -279,7 +279,7 @@ ErrCode AbilityToolCommand::ParseStartAbilityArgsFromCmd(Want& want, StartOption bundleName = optarg; break; case 'o': - if (optind + 1 >= argc_) { + if (optind + 1 >= argc_ || optind + 1 < 0) { HILOG_DEBUG("'ability_tool %{public}s' %{public}s", cmd_.c_str(), ABILITY_TOOL_HELP_MSG_LACK_VALUE.c_str()); resultReceiver_.append(ABILITY_TOOL_HELP_MSG_LACK_VALUE + "\n"); @@ -428,7 +428,7 @@ ErrCode AbilityToolCommand::ParseTestArgsFromCmd(std::map= argc_) { + if (optind + 1 >= argc_ || optind + 1 < 0) { HILOG_DEBUG("'ability_tool %{public}s' %{public}s", cmd_.c_str(), ABILITY_TOOL_HELP_MSG_LACK_VALUE.c_str()); resultReceiver_.append(ABILITY_TOOL_HELP_MSG_LACK_VALUE + "\n"); diff --git a/tools/fm/BUILD.gn b/tools/fm/BUILD.gn index a834c7a2d6..1caec5a564 100644 --- a/tools/fm/BUILD.gn +++ b/tools/fm/BUILD.gn @@ -17,12 +17,10 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") config("tools_fm_config") { include_dirs = [ "${ability_base_innerapi_path}/want/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/common/include", "${ability_runtime_path}/tools/aa/include", - "${ability_runtime_path}/services/common/include", + "${ability_runtime_services_path}/common/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", - "//base/notification/eventhandler/interfaces/inner_api", - "//utils/native/base/include", "include", ] } diff --git a/tools/test/mock/mock_ability_manager_stub.h b/tools/test/mock/mock_ability_manager_stub.h index 43ef397085..a9cdb7d594 100644 --- a/tools/test/mock/mock_ability_manager_stub.h +++ b/tools/test/mock/mock_ability_manager_stub.h @@ -158,7 +158,8 @@ public: return 0; } - virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, MissionSnapshot& snapshot) + virtual int GetMissionSnapshot(const std::string& deviceId, int32_t missionId, + MissionSnapshot& snapshot, bool isLowResolution) { return 0; } diff --git a/tools/test/systemtest/aa/BUILD.gn b/tools/test/systemtest/aa/BUILD.gn index a276d078f9..e0ef3aedd4 100644 --- a/tools/test/systemtest/aa/BUILD.gn +++ b/tools/test/systemtest/aa/BUILD.gn @@ -17,11 +17,7 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni") module_output_path = "ability_tools/tools" config("tools_aa_test_config") { - include_dirs = [ - "${bundlefwk_inner_api_path}/appexecfwk_base/include", - "${bundlefwk_inner_api_path}/appexecfwk_core/include/bundlemgr", - "//base/security/appverify/interfaces/innerkits/appverify/include", - ] + include_dirs = [] } ohos_systemtest("aa_command_start_system_test") { @@ -54,6 +50,9 @@ ohos_systemtest("aa_command_start_system_test") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] + + resource_config_file = + "${ability_runtime_path}/tools/test/resource/ohos_test.xml" } ohos_systemtest("aa_command_stop_service_system_test") { @@ -84,6 +83,9 @@ ohos_systemtest("aa_command_stop_service_system_test") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] + + resource_config_file = + "${ability_runtime_path}/tools/test/resource/ohos_test.xml" } ohos_systemtest("aa_command_dump_system_test") { @@ -116,6 +118,9 @@ ohos_systemtest("aa_command_dump_system_test") { "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] + + resource_config_file = + "${ability_runtime_path}/tools/test/resource/ohos_test.xml" } group("systemtest") {