mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-27 01:10:52 +00:00
!11485 在窗口销毁时调用terminateAbilityWithResult,清理ability
Merge pull request !11485 from savior-xzh/terminate
This commit is contained in:
commit
a51fbf199f
@ -313,12 +313,12 @@ ErrCode AbilityContextImpl::StopServiceExtensionAbility(const AAFwk::Want& want,
|
||||
ErrCode AbilityContextImpl::TerminateAbilityWithResult(const AAFwk::Want& want, int resultCode)
|
||||
{
|
||||
isTerminating_.store(true);
|
||||
auto sessionToken = GetSessionToken();
|
||||
if (sessionToken == nullptr) {
|
||||
TAG_LOGW(AAFwkTag::CONTEXT, "withResult null sessionToken");
|
||||
}
|
||||
#ifdef SUPPORT_SCREEN
|
||||
if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) {
|
||||
auto sessionToken = GetSessionToken();
|
||||
if (sessionToken == nullptr) {
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled() && sessionToken) {
|
||||
sptr<AAFwk::SessionInfo> info = sptr<AAFwk::SessionInfo>::MakeSptr();
|
||||
info->want = want;
|
||||
info->resultCode = resultCode;
|
||||
|
Loading…
Reference in New Issue
Block a user