!10322 回退提前设置foregrounding相关代码

Merge pull request !10322 from 夏良伟/cherry-pick-1725421423
This commit is contained in:
openharmony_ci
2024-09-04 11:55:49 +00:00
committed by Gitee
2 changed files with 0 additions and 5 deletions
@@ -556,7 +556,6 @@ void AbilityRecord::ProcessForegroundAbility(const std::shared_ptr<AbilityRecord
// background to active state
TAG_LOGD(AAFwkTag::ABILITYMGR, "MoveToForeground, %{public}s", element.c_str());
lifeCycleStateInfo_.sceneFlagBak = sceneFlag;
SetAbilityStateInner(AbilityState::FOREGROUNDING);
DelayedSingleton<AppScheduler>::GetInstance()->MoveToForeground(token_);
}
}
@@ -708,7 +707,6 @@ void AbilityRecord::ProcessForegroundAbility(bool isRecent, const AbilityRequest
// background to active state
TAG_LOGD(AAFwkTag::ABILITYMGR, "MoveToForeground, %{public}s", element.c_str());
lifeCycleStateInfo_.sceneFlagBak = sceneFlag;
SetAbilityStateInner(AbilityState::FOREGROUNDING);
DelayedSingleton<AppScheduler>::GetInstance()->MoveToForeground(token_);
}
} else {
@@ -1026,7 +1026,6 @@ int MissionListManager::AttachAbilityThread(const sptr<IAbilityScheduler> &sched
if (abilityRecord->GetWant().GetBoolParam(Want::PARAM_RESV_CALL_TO_FOREGROUND, false)) {
abilityRecord->SetStartToForeground(true);
abilityRecord->PostForegroundTimeoutTask();
abilityRecord->SetAbilityState(AbilityState::FOREGROUNDING);
DelayedSingleton<AppScheduler>::GetInstance()->MoveToForeground(token);
} else {
abilityRecord->SetStartToBackground(true);
@@ -1047,7 +1046,6 @@ int MissionListManager::AttachAbilityThread(const sptr<IAbilityScheduler> &sched
abilityRecord->PostCancelStartingWindowHotTask();
#endif
abilityRecord->PostForegroundTimeoutTask();
abilityRecord->SetAbilityState(AbilityState::FOREGROUNDING);
DelayedSingleton<AppScheduler>::GetInstance()->MoveToForeground(token);
return ERR_OK;
@@ -1418,7 +1416,6 @@ void MissionListManager::CompleteBackground(const std::shared_ptr<AbilityRecord>
DelayedSingleton<AppScheduler>::GetInstance()->MoveToBackground(abilityRecord->GetToken());
if (abilityRecord->GetPendingState() == AbilityState::FOREGROUND) {
abilityRecord->PostForegroundTimeoutTask();
abilityRecord->SetAbilityState(AbilityState::FOREGROUNDING);
DelayedSingleton<AppScheduler>::GetInstance()->MoveToForeground(abilityRecord->GetToken());
} else if (abilityRecord->GetPendingState() == AbilityState::BACKGROUND) {
TAG_LOGD(AAFwkTag::ABILITYMGR, "not continuous startup.");