diff --git a/services/abilitymgr/include/mission_list_manager.h b/services/abilitymgr/include/mission_list_manager.h index 00e9b20baee520c69f2f99caf1dac5a410a5bf39..9c224d7a8eb8246bca4a6632be21c6de1e8ac758 100644 --- a/services/abilitymgr/include/mission_list_manager.h +++ b/services/abilitymgr/include/mission_list_manager.h @@ -99,6 +99,13 @@ public: */ void EnqueueWaittingAbility(const AbilityRequest &abilityRequest); + /** + * push front waitting ability to queue. + * + * @param abilityRequest, the request of ability. + */ + void EnqueueWaittingAbilityToFront(const AbilityRequest &abilityRequest); + /** * start waitting ability. */ @@ -293,6 +300,7 @@ public: void OnAcceptWantResponse(const AAFwk::Want &want, const std::string &flag); + void OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want); /** * resolve the call ipc of ability for schudeling oncall. * diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index 742d682aef5dd555e9a736030a02c467a2291bba..97162560ef09194f830d02bdf95864d85f249817 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -3662,7 +3662,11 @@ void AbilityManagerService::OnAcceptWantResponse( void AbilityManagerService::OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want) { - return; + HILOG_DEBUG("%{public}s called.", __func__); + if (!currentMissionListManager_) { + return; + } + currentMissionListManager_->OnStartSpecifiedAbilityTimeoutResponse(want); } int AbilityManagerService::GetAbilityRunningInfos(std::vector &info) diff --git a/services/abilitymgr/src/mission_list_manager.cpp b/services/abilitymgr/src/mission_list_manager.cpp index 0883b31759826259a0578004c204e751afc89b91..3cc10f0bd156fa4e912b1de7b3f3974a137268ba 100644 --- a/services/abilitymgr/src/mission_list_manager.cpp +++ b/services/abilitymgr/src/mission_list_manager.cpp @@ -91,7 +91,7 @@ int MissionListManager::StartAbility(const std::shared_ptr &curre { auto isSpecified = (abilityRequest.abilityInfo.launchMode == AppExecFwk::LaunchMode::SPECIFIED); if (isSpecified) { - EnqueueWaittingAbility(abilityRequest); + EnqueueWaittingAbilityToFront(abilityRequest); DelayedSingleton::GetInstance()->StartSpecifiedAbility( abilityRequest.want, abilityRequest.abilityInfo); return 0; @@ -202,6 +202,19 @@ void MissionListManager::EnqueueWaittingAbility(const AbilityRequest &abilityReq return; } +void MissionListManager::EnqueueWaittingAbilityToFront(const AbilityRequest &abilityRequest) +{ + std::lock_guard guard(managerLock_); + std::queue abilityQueue; + abilityQueue.push(abilityRequest); + waittingAbilityQueue_.swap(abilityQueue); + while (!abilityQueue.empty()) { + AbilityRequest tempAbilityRequest = abilityQueue.front(); + abilityQueue.pop(); + waittingAbilityQueue_.push(tempAbilityRequest); + } +} + void MissionListManager::StartWaittingAbility() { std::lock_guard guard(managerLock_); @@ -2072,24 +2085,46 @@ void MissionListManager::OnAcceptWantResponse(const AAFwk::Want &want, const std auto currentTopAbility = GetCurrentTopAbilityLocked(); auto callerAbility = GetAbilityRecordByToken(abilityRequest.callerToken); - auto mission = GetMissionBySpecifiedFlag(flag); - if (mission) { - auto ability = mission->GetAbilityRecord(); - if (!ability) { + if (!flag.empty()) { + auto mission = GetMissionBySpecifiedFlag(flag); + if (mission) { + auto ability = mission->GetAbilityRecord(); + if (!ability) { + return; + } + ability->SetWant(abilityRequest.want); + ability->SetIsNewWant(true); + + auto isCallerFromLauncher = (callerAbility && callerAbility->IsLauncherAbility()); + MoveMissionToFront(mission->GetMissionId(), isCallerFromLauncher); return; } - ability->SetWant(abilityRequest.want); - ability->SetIsNewWant(true); - - auto isCallerFromLauncher = (callerAbility && callerAbility->IsLauncherAbility()); - MoveMissionToFront(mission->GetMissionId(), isCallerFromLauncher); - return; } abilityRequest.specifiedFlag = flag; StartAbilityLocked(currentTopAbility, callerAbility, abilityRequest); } +void MissionListManager::OnStartSpecifiedAbilityTimeoutResponse(const AAFwk::Want &want) +{ + HILOG_DEBUG("%{public}s called.", __func__); + std::lock_guard guard(managerLock_); + if (waittingAbilityQueue_.empty()) { + return; + } + waittingAbilityQueue_.pop(); + + if (waittingAbilityQueue_.empty()) { + return; + } + AbilityRequest abilityRequest = waittingAbilityQueue_.front(); + waittingAbilityQueue_.pop(); + + auto currentTopAbility = GetCurrentTopAbilityLocked(); + auto callerAbility = GetAbilityRecordByToken(abilityRequest.callerToken); + StartAbility(currentTopAbility, callerAbility, abilityRequest); +} + std::shared_ptr MissionListManager::GetMissionBySpecifiedFlag(const std::string &flag) const { std::shared_ptr mission = nullptr; diff --git a/services/appmgr/BUILD.gn b/services/appmgr/BUILD.gn index 0ef3e87b2399d3f2a93bd44c6825d02acd50c02b..724f220ced80a65392ef80000031cd63b6932731 100644 --- a/services/appmgr/BUILD.gn +++ b/services/appmgr/BUILD.gn @@ -133,6 +133,7 @@ ohos_shared_library("libams") { "ces_standard:cesfwk_core", "ces_standard:cesfwk_innerkits", "hicollie_native:libhicollie", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/appmgr/include/app_mgr_service_event_handler.h b/services/appmgr/include/app_mgr_service_event_handler.h index 4ae9f1a416fc925340ad8bfffc40c67ae8d287c5..aa56fe625d544c46982ad1eb95331e93c38c38c4 100644 --- a/services/appmgr/include/app_mgr_service_event_handler.h +++ b/services/appmgr/include/app_mgr_service_event_handler.h @@ -32,11 +32,13 @@ public: static constexpr uint32_t TERMINATE_ABILITY_TIMEOUT_MSG = 0; static constexpr uint32_t TERMINATE_APPLICATION_TIMEOUT_MSG = 1; static constexpr uint32_t ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG = 2; - static constexpr uint32_t START_MULTI_INSTANCES_ABILITY_MSG = 3; + static constexpr uint32_t START_SPECIFIED_ABILITY_TIMEOUT_MSG = 3; + static constexpr uint32_t START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG = 4; static constexpr uint32_t TERMINATE_ABILITY_TIMEOUT = 500; static constexpr uint32_t TERMINATE_APPLICATION_TIMEOUT = 500; static constexpr uint32_t ADD_ABILITY_STAGE_INFO_TIMEOUT = 3000; // ms - static constexpr uint32_t START_MULTI_INSTANCES_ABILITY_TIMEOUT = 3000; // ms + static constexpr uint32_t START_SPECIFIED_ABILITY_TIMEOUT = 3000; // ms + static constexpr uint32_t START_PROCESS_SPECIFIED_ABILITY_TIMEOUT = 5000; // ms private: std::weak_ptr appMgr_; }; diff --git a/services/appmgr/include/app_mgr_service_inner.h b/services/appmgr/include/app_mgr_service_inner.h index d498c3b1a2345a89a1869060089221e9c22487ea..9f5233a8bfe76d178a37be7388d483453ba48192 100644 --- a/services/appmgr/include/app_mgr_service_inner.h +++ b/services/appmgr/include/app_mgr_service_inner.h @@ -50,7 +50,6 @@ namespace OHOS { namespace AppExecFwk { using OHOS::AAFwk::Want; - class AppMgrServiceInner : public std::enable_shared_from_this { public: AppMgrServiceInner(); @@ -794,7 +793,8 @@ private: * @return */ void NotifyAppStatus(const std::string &bundleName, const std::string &eventData); - + void KillApplicationByRecord(const std::shared_ptr &appRecord); + void SendHiSysEvent(const int32_t innerEventId, const int64_t eventId); const std::string TASK_ON_CALLBACK_DIED = "OnCallbackDiedTask"; std::vector> appStateObservers_; std::map, sptr> recipientMap_; diff --git a/services/appmgr/include/app_running_record.h b/services/appmgr/include/app_running_record.h index 759010ff9bfaf8e808acac8a8f7799cc856b61dc..7d0ebcf9597da22d8974a3db0fbd02cf4cabecb2 100644 --- a/services/appmgr/include/app_running_record.h +++ b/services/appmgr/include/app_running_record.h @@ -491,6 +491,7 @@ public: void SetStartMsg(const AppSpawnStartMsg &msg); AppSpawnStartMsg GetStartMsg(); + void SendEventForSpecifiedAbility(uint32_t msg, int64_t timeOut); private: /** * SearchTheModuleInfoNeedToUpdated, Get an uninitialized abilitystage data. diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index 61b4b47c902f4a072c19ea2aa75e9578ffc1baf0..7aa59ae650dfaefed7d409b5d76faa63cf3fe73f 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -31,6 +31,7 @@ #include "common_event.h" #include "common_event_manager.h" #include "common_event_support.h" +#include "hisysevent.h" #include "iremote_object.h" #include "iservice_registry.h" #include "ipc_skeleton.h" @@ -42,6 +43,7 @@ #include "locale_config.h" #include "uri_permission_manager_client.h" + namespace OHOS { namespace AppExecFwk { using namespace OHOS::Security; @@ -69,6 +71,21 @@ constexpr int32_t BASE_USER_RANGE = 200000; constexpr ErrCode APPMGR_ERR_OFFSET = ErrCodeOffset(SUBSYS_APPEXECFWK, 0x01); constexpr ErrCode ERR_ALREADY_EXIST_RENDER = APPMGR_ERR_OFFSET + 100; // error code for already exist render. +const std::string EVENT_NAME_LIFECYCLE_TIMEOUT = "LIFECYCLE_TIMEOUT"; +constexpr char EVENT_KEY_UID[] = "UID"; +constexpr char EVENT_KEY_PID[] = "PID"; +constexpr char EVENT_KEY_PACKAGE_NAME[] = "PACKAGE_NAME"; +constexpr char EVENT_KEY_PROCESS_NAME[] = "PROCESS_NAME"; +constexpr char EVENT_KEY_MESSAGE[] = "MSG"; + +// Msg length is less than 48 characters +const std::string EVENT_MESSAGE_TERMINATE_ABILITY_TIMEOUT = "Terminate Ability TimeOut!"; +const std::string EVENT_MESSAGE_TERMINATE_APPLICATION_TIMEOUT = "Terminate Application TimeOut!"; +const std::string EVENT_MESSAGE_ADD_ABILITY_STAGE_INFO_TIMEOUT = "Add Ability Stage TimeOut!"; +const std::string EVENT_MESSAGE_START_SPECIFIED_ABILITY_TIMEOUT = "Start Specified Ability TimeOut!"; +const std::string EVENT_MESSAGE_START_PROCESS_SPECIFIED_ABILITY_TIMEOUT = "Start Process Specified Ability TimeOut!"; +const std::string EVENT_MESSAGE_DEFAULT = "AppMgrServiceInner HandleTimeOut!"; + int32_t GetUserIdByUid(int32_t uid) { @@ -1597,6 +1614,7 @@ void AppMgrServiceInner::HandleTimeOut(const InnerEvent::Pointer &event) APP_LOGE("appRunningManager or event is nullptr"); return; } + SendHiSysEvent(event->GetInnerEventId(), event->GetParam()); switch (event->GetInnerEventId()) { case AMSEventHandler::TERMINATE_ABILITY_TIMEOUT_MSG: appRunningManager_->HandleTerminateTimeOut(event->GetParam()); @@ -1604,10 +1622,11 @@ void AppMgrServiceInner::HandleTimeOut(const InnerEvent::Pointer &event) case AMSEventHandler::TERMINATE_APPLICATION_TIMEOUT_MSG: HandleTerminateApplicationTimeOut(event->GetParam()); break; + case AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG: case AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG: HandleAddAbilityStageTimeOut(event->GetParam()); break; - case AMSEventHandler::START_MULTI_INSTANCES_ABILITY_MSG: + case AMSEventHandler::START_SPECIFIED_ABILITY_TIMEOUT_MSG: HandleStartSpecifiedAbilityTimeOut(event->GetParam()); break; default: @@ -1653,6 +1672,12 @@ void AppMgrServiceInner::HandleTerminateApplicationTimeOut(const int64_t eventId APP_LOGE("appRecord is nullptr"); return; } + + auto abilityRecord = appRecord->GetAbilityRunningRecord(eventId); + if (!abilityRecord) { + APP_LOGE("abilityRecord is nullptr"); + return; + } appRecord->SetState(ApplicationState::APP_STATE_TERMINATED); OptimizerAppStateChanged(appRecord, ApplicationState::APP_STATE_BACKGROUND); appRecord->RemoveAppDeathRecipient(); @@ -1683,15 +1708,11 @@ void AppMgrServiceInner::HandleAddAbilityStageTimeOut(const int64_t eventId) return; } - appRecord->SetState(ApplicationState::APP_STATE_TERMINATED); - appRecord->RemoveAppDeathRecipient(); - pid_t pid = appRecord->GetPriorityObject()->GetPid(); - KillProcessByPid(pid); - appRunningManager_->RemoveAppRunningRecordById(appRecord->GetRecordId()); + if (appRecord->IsStartSpecifiedAbility() && startSpecifiedAbilityResponse_) { + startSpecifiedAbilityResponse_->OnTimeoutResponse(appRecord->GetSpecifiedWant()); + } - OptimizerAppStateChanged(appRecord, ApplicationState::APP_STATE_TERMINATED); - RemoveAppFromRecentListById(appRecord->GetRecordId()); - OnProcessDied(appRecord); + KillApplicationByRecord(appRecord); } int AppMgrServiceInner::CompelVerifyPermission(const std::string &permission, int pid, int uid, std::string &message) @@ -2157,10 +2178,11 @@ void AppMgrServiceInner::StartSpecifiedAbility(const AAFwk::Want &want, const Ap APP_LOGE("start process [%{public}s] failed!", processName.c_str()); return; } - + appRecord->SetEventHandler(eventHandler_); + appRecord->SendEventForSpecifiedAbility(AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG, + AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT); StartProcess(appInfo->name, processName, appRecord, appInfo->uid, appInfo->bundleName); - appRecord->SetEventHandler(eventHandler_); appRecord->SetSpecifiedAbilityFlagAndWant(true, want, hapModuleInfo.moduleName); appRecord->AddModules(appInfo, hapModules); } else { @@ -2213,7 +2235,25 @@ void AppMgrServiceInner::ScheduleAcceptWantDone( } void AppMgrServiceInner::HandleStartSpecifiedAbilityTimeOut(const int64_t eventId) -{} +{ + APP_LOGD("called start specified ability time out!"); + if (!appRunningManager_) { + APP_LOGE("appRunningManager_ is nullptr"); + return; + } + + auto appRecord = appRunningManager_->GetAppRunningRecord(eventId); + if (!appRecord) { + APP_LOGE("appRecord is nullptr"); + return; + } + + if (appRecord->IsStartSpecifiedAbility() && startSpecifiedAbilityResponse_) { + startSpecifiedAbilityResponse_->OnTimeoutResponse(appRecord->GetSpecifiedWant()); + } + + KillApplicationByRecord(appRecord); +} void AppMgrServiceInner::UpdateConfiguration(const Configuration &config) { @@ -2264,6 +2304,93 @@ std::shared_ptr AppMgrServiceInner::GetConfiguration( return configuration_; } +void AppMgrServiceInner::KillApplicationByRecord(const std::shared_ptr &appRecord) +{ + APP_LOGD("Kill application by appRecord."); + + if (!appRecord) { + APP_LOGD("appRecord is nullptr."); + return; + } + + auto pid = appRecord->GetPriorityObject()->GetPid(); + appRecord->SetTerminating(); + appRecord->ScheduleProcessSecurityExit(); + + auto startTime = SystemTimeMillis(); + std::list pids = {pid}; + if (WaitForRemoteProcessExit(pids, startTime)) { + APP_LOGD("The remote process exited successfully"); + return; + } + + auto result = KillProcessByPid(pid); + if (result < 0) { + APP_LOGE("Kill application by app record, pid: %{public}d", pid); + } +} + +void AppMgrServiceInner::SendHiSysEvent(const int32_t innerEventId, const int64_t eventId) +{ + APP_LOGD("called AppMgrServiceInner SendHiSysEvent!"); + if (!appRunningManager_) { + APP_LOGE("appRunningManager_ is nullptr"); + return; + } + + auto appRecord = appRunningManager_->GetAppRunningRecord(eventId); + if (!appRecord) { + APP_LOGE("appRecord is nullptr"); + return; + } + + std::string eventName = EVENT_NAME_LIFECYCLE_TIMEOUT; + std::string pidStr = std::to_string(appRecord->GetPriorityObject()->GetPid()); + std::string uidStr = std::to_string(appRecord->GetUid()); + std::string packageName = appRecord->GetBundleName(); + std::string processName = appRecord->GetProcessName(); + std::string msg; + switch (innerEventId) { + case AMSEventHandler::TERMINATE_ABILITY_TIMEOUT_MSG: + msg = EVENT_MESSAGE_TERMINATE_ABILITY_TIMEOUT; + break; + case AMSEventHandler::TERMINATE_APPLICATION_TIMEOUT_MSG: + msg = EVENT_MESSAGE_TERMINATE_APPLICATION_TIMEOUT; + break; + case AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG: + msg = EVENT_MESSAGE_ADD_ABILITY_STAGE_INFO_TIMEOUT; + break; + case AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG: + msg = EVENT_MESSAGE_START_PROCESS_SPECIFIED_ABILITY_TIMEOUT; + break; + case AMSEventHandler::START_SPECIFIED_ABILITY_TIMEOUT_MSG: + msg = EVENT_MESSAGE_START_SPECIFIED_ABILITY_TIMEOUT; + break; + default: + msg = EVENT_MESSAGE_DEFAULT; + break; + } + + APP_LOGD("SendHiSysEvent, eventName=%{public}s, uidStr=%{public}s, pidStr=%{public}s, \ + packageName=%{public}s, processName=%{public}s, msg=%{public}s", + eventName.c_str(), + uidStr.c_str(), + pidStr.c_str(), + packageName.c_str(), + processName.c_str(), + msg.c_str()); + + OHOS::HiviewDFX::HiSysEvent::Write( + OHOS::HiviewDFX::HiSysEvent::Domain::AAFWK, + eventName, + OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, + EVENT_KEY_PID, pidStr, + EVENT_KEY_UID, uidStr, + EVENT_KEY_PACKAGE_NAME, packageName, + EVENT_KEY_PROCESS_NAME, processName, + EVENT_KEY_MESSAGE, msg); +} + int AppMgrServiceInner::GetAbilityRecordsByProcessID(const int pid, std::vector> &tokens) { auto appRecord = GetAppRunningRecordByPid(pid); diff --git a/services/appmgr/src/app_running_record.cpp b/services/appmgr/src/app_running_record.cpp index fceaaec9b47925c303199407a050c3c41721238e..9616dc2bebc03dac761e63f8824fcdea94e3bfd4 100644 --- a/services/appmgr/src/app_running_record.cpp +++ b/services/appmgr/src/app_running_record.cpp @@ -360,7 +360,12 @@ void AppRunningRecord::AddAbilityStageBySpecifiedAbility(const std::string &bund { HapModuleInfo hapModuleInfo; if (GetTheModuleInfoNeedToUpdated(bundleName, hapModuleInfo)) { - SendEvent(AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG, AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT); + if (!eventHandler_->HasInnerEvent(AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG)) { + SendEvent(AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG, + AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT); + } else { + APP_LOGI("%{public}s START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG is exist, don't set new event.", __func__); + } appLifeCycleDeal_->AddAbilityStage(hapModuleInfo); } } @@ -369,7 +374,13 @@ void AppRunningRecord::AddAbilityStageDone() { APP_LOGI("Add ability stage done. bundle %{public}s and eventId %{public}d", mainBundleName_.c_str(), static_cast(eventId_)); - eventHandler_->RemoveEvent(AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG, eventId_); + if (eventHandler_->HasInnerEvent(AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG)) { + eventHandler_->RemoveEvent(AMSEventHandler::START_PROCESS_SPECIFIED_ABILITY_TIMEOUT_MSG); + } + + if (eventHandler_->HasInnerEvent(AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG)) { + eventHandler_->RemoveEvent(AMSEventHandler::ADD_ABILITY_STAGE_INFO_TIMEOUT_MSG); + } // Should proceed to the next notification if (isSpecifiedAbility_) { @@ -834,6 +845,11 @@ std::shared_ptr AppRunningRecord::GetPriorityObject() return priorityObject_; } +void AppRunningRecord::SendEventForSpecifiedAbility(uint32_t msg, int64_t timeOut) +{ + SendEvent(msg, timeOut); +} + void AppRunningRecord::SendEvent(uint32_t msg, int64_t timeOut) { if (!eventHandler_) { @@ -971,13 +987,15 @@ bool AppRunningRecord::IsStartSpecifiedAbility() const void AppRunningRecord::ScheduleAcceptWant(const std::string &moduleName) { SendEvent( - AMSEventHandler::START_MULTI_INSTANCES_ABILITY_MSG, AMSEventHandler::START_MULTI_INSTANCES_ABILITY_TIMEOUT); + AMSEventHandler::START_SPECIFIED_ABILITY_TIMEOUT_MSG, AMSEventHandler::START_SPECIFIED_ABILITY_TIMEOUT); appLifeCycleDeal_->ScheduleAcceptWant(SpecifiedWant_, moduleName); } void AppRunningRecord::ScheduleAcceptWantDone() { - eventHandler_->RemoveEvent(AMSEventHandler::START_MULTI_INSTANCES_ABILITY_MSG, appRecordId_); + APP_LOGI("Schedule accept want done. bundle %{public}s and eventId %{public}d", mainBundleName_.c_str(), + static_cast(eventId_)); + eventHandler_->RemoveEvent(AMSEventHandler::START_SPECIFIED_ABILITY_TIMEOUT_MSG, eventId_); } const AAFwk::Want &AppRunningRecord::GetSpecifiedWant() const 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 da2dfe6863f4999cb2b18fb115d419fe35393b3f..2248c31b4c68052afdb6b8a952615f212c1476e2 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 @@ -66,6 +66,7 @@ ohos_unittest("AmsAbilityRunningRecordTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 dc221c935c34464b332b33a1bee46da3352e36a9..e951dbe7c68b11ba0e7abbe4223b56c33b7cde49 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 @@ -74,6 +74,7 @@ ohos_unittest("AppDeathRecipientTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 1554bc6a97398cab74e5dc4a89811f92a76c54d6..904b061dd96028498c79d379355023b5000db332 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 @@ -72,6 +72,7 @@ ohos_unittest("AmsAppLifeCycleTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "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 82442b11ca121637e784796250011340bca2960a..868a72d1c832d3db0d748e8f67602a5469826b44 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 @@ -63,6 +63,7 @@ ohos_unittest("AmsAppRunningRecordTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 254ac523d0364e280ed31f878690769596108989..5661ddcbfb7059fba0ab70455e02734e1a4236f5 100644 --- a/services/appmgr/test/unittest/ams_app_workflow_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_app_workflow_test/BUILD.gn @@ -69,6 +69,7 @@ ohos_unittest("AmsWorkFlowTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 49ef60e977f6d32fdadf351ccf2b0d1c72ad3c73..297d94e81e9f67d76c5ae0fa67f4e7f2c61b02bc 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 @@ -70,6 +70,7 @@ ohos_unittest("AmsRecentAppListTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 477e6e2c17c65ee1a29856e4d25409d8d40f8206..0013352c2a0716a99cd7a0145195e00ad99abc70 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 @@ -66,6 +66,7 @@ ohos_unittest("AmsServiceAppSpawnClientTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 4c7f3d6470d60c0fc085ac2e4699ab16280702a8..f0f315d9d92b6ee6d634f1934443ac2d474d2ea7 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 @@ -68,6 +68,7 @@ ohos_unittest("AmsServiceEventDriveTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 18c0cf797af5076366d4f98b81952ca2ca73f3a7..166feb363e3abd58ee035a04bd03c05139befe3e 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 @@ -74,6 +74,7 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 d34b41694905ca6e9568902282e88f0c25a6c587..181bd79b898d4195400dfa52a75187eed709ed7b 100644 --- a/services/appmgr/test/unittest/ams_service_startup_test/BUILD.gn +++ b/services/appmgr/test/unittest/ams_service_startup_test/BUILD.gn @@ -65,6 +65,7 @@ ohos_unittest("AmsServiceStartupTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] 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 635e47a975f49282a9a77e753ada1cc4da9e7897..7fc5e9e0c5f3b8a77f6011bee4661e991677aaa4 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 @@ -74,6 +74,7 @@ ohos_unittest("AMSEventHandlerTest") { external_deps = [ "appspawn:appspawn_socket_client", "bytrace_standard:bytrace_core", + "hisysevent_native:libhisysevent", "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 571d3de69b98bbb4616ef3ce4050b1a4f109507b..704ad3dcb3f1857605093939943cf11ba1d2fcc8 100755 --- a/services/test/moduletest/common/ams/BUILD.gn +++ b/services/test/moduletest/common/ams/BUILD.gn @@ -96,6 +96,7 @@ ohos_source_set("appmgr_mst_source") { "bytrace_standard:bytrace_core", "ces_standard:cesfwk_core", "ces_standard:cesfwk_innerkits", + "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ]