Signed-off-by: mingxihua <mingxihua@huawei.com>
This commit is contained in:
mingxihua 2022-06-08 13:28:19 +08:00
parent 12449663bb
commit 52c1c99ff3
4 changed files with 9 additions and 4 deletions

View File

@ -107,6 +107,10 @@ void AmsMgrProxy::TerminateAbility(const sptr<IRemoteObject> &token)
HILOG_ERROR("Failed to write token");
return;
}
if (!data.WriteBool(clearMissionFlag)) {
HILOG_ERROR("Failed to write clearMissionFlag");
return;
}
sptr<IRemoteObject> remote = Remote();
if (remote == nullptr) {
HILOG_ERROR("Remote() is NULL");

View File

@ -125,7 +125,8 @@ ErrCode AmsMgrStub::HandleTerminateAbility(MessageParcel &data, MessageParcel &r
{
HITRACE_METER(HITRACE_TAG_APP);
sptr<IRemoteObject> token = data.ReadRemoteObject();
TerminateAbility(token);
bool clearMissionFlag = data.ReadBool();
TerminateAbility(token, clearMissionFlag);
return NO_ERROR;
}

View File

@ -145,7 +145,7 @@ AppMgrResultCode AppMgrClient::TerminateAbility(const sptr<IRemoteObject> &token
if (service != nullptr) {
sptr<IAmsMgr> amsService = service->GetAmsMgr();
if (amsService != nullptr) {
amsService->TerminateAbility(token);
amsService->TerminateAbility(token, clearMissionFlag);
return AppMgrResultCode::RESULT_OK;
}
}

View File

@ -75,11 +75,11 @@ ohos_source_set("abilityms_test_source") {
"//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",
"//foundation/resourceschedule/background_task_mgr/interfaces/innerkits/include",
"//foundation/resourceschedule/background_task_mgr/frameworks/include",
"//foundation/ability/ability_runtime/interfaces/innerkits/wantagent/include",
"//foundation/ability/ability_runtime/frameworks/kits/appkit/native/ability_runtime",
"//foundation/resourceschedule/background_task_mgr/interfaces/innerkits/include",
"//foundation/resourceschedule/background_task_mgr/frameworks/common/include",
"//foundation/resourceschedule/background_task_mgr/frameworks/include",
]
external_dependent_files = [