Signed-off-by: m00512953 <mingxihua@huawei.com>
This commit is contained in:
m00512953 2022-08-15 17:21:44 +08:00
parent 96cae4f8f5
commit 0207ad194e

View File

@ -379,7 +379,8 @@ void AppRunningManager::TerminateAbility(const sptr<IRemoteObject> &token, bool
if (isLastAbilityRecord && !appRecord->IsKeepAliveApp()) {
HILOG_DEBUG("The ability is the last in the app:%{public}s.", appRecord->GetName().c_str());
appRecord->SetTerminating();
if (isClearMission) {
auto appInfo = appRecord->GetApplicationInfo();
if (isClearMission && !appInfo->isLauncherApp) {
HILOG_DEBUG("The ability is the last, kill application");
auto pid = appRecord->GetPriorityObject()->GetPid();
auto result = appMgrServiceInner->KillProcessByPid(pid);