mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
!10322 回退提前设置foregrounding相关代码
Merge pull request !10322 from 夏良伟/cherry-pick-1725421423
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user