mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2025-01-02 05:09:34 +00:00
Signed-off-by: m00512953 <mingxihua@huawei.com>
This commit is contained in:
parent
0207ad194e
commit
4b2d6e22ca
@ -376,11 +376,13 @@ void AppRunningManager::TerminateAbility(const sptr<IRemoteObject> &token, bool
|
||||
}
|
||||
appRecord->TerminateAbility(token, false);
|
||||
|
||||
if (isLastAbilityRecord && !appRecord->IsKeepAliveApp()) {
|
||||
auto isKeepAliveApp = appRecord->IsKeepAliveApp();
|
||||
auto isLauncherApp = appRecord->GetApplicationInfo()->isLauncherApp;
|
||||
|
||||
if (isLastAbilityRecord && !isKeepAliveApp && !isLauncherApp) {
|
||||
HILOG_DEBUG("The ability is the last in the app:%{public}s.", appRecord->GetName().c_str());
|
||||
appRecord->SetTerminating();
|
||||
auto appInfo = appRecord->GetApplicationInfo();
|
||||
if (isClearMission && !appInfo->isLauncherApp) {
|
||||
if (isClearMission) {
|
||||
HILOG_DEBUG("The ability is the last, kill application");
|
||||
auto pid = appRecord->GetPriorityObject()->GetPid();
|
||||
auto result = appMgrServiceInner->KillProcessByPid(pid);
|
||||
|
Loading…
Reference in New Issue
Block a user