diff --git a/services/abilitymgr/src/ability_record.cpp b/services/abilitymgr/src/ability_record.cpp index 3e69c97ae1..73f3f380f9 100644 --- a/services/abilitymgr/src/ability_record.cpp +++ b/services/abilitymgr/src/ability_record.cpp @@ -556,7 +556,6 @@ void AbilityRecord::ProcessForegroundAbility(const std::shared_ptr::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::GetInstance()->MoveToForeground(token_); } } else { diff --git a/services/abilitymgr/src/mission_list_manager.cpp b/services/abilitymgr/src/mission_list_manager.cpp index baa66f67c3..52b3c76132 100644 --- a/services/abilitymgr/src/mission_list_manager.cpp +++ b/services/abilitymgr/src/mission_list_manager.cpp @@ -1026,7 +1026,6 @@ int MissionListManager::AttachAbilityThread(const sptr &sched if (abilityRecord->GetWant().GetBoolParam(Want::PARAM_RESV_CALL_TO_FOREGROUND, false)) { abilityRecord->SetStartToForeground(true); abilityRecord->PostForegroundTimeoutTask(); - abilityRecord->SetAbilityState(AbilityState::FOREGROUNDING); DelayedSingleton::GetInstance()->MoveToForeground(token); } else { abilityRecord->SetStartToBackground(true); @@ -1047,7 +1046,6 @@ int MissionListManager::AttachAbilityThread(const sptr &sched abilityRecord->PostCancelStartingWindowHotTask(); #endif abilityRecord->PostForegroundTimeoutTask(); - abilityRecord->SetAbilityState(AbilityState::FOREGROUNDING); DelayedSingleton::GetInstance()->MoveToForeground(token); return ERR_OK; @@ -1418,7 +1416,6 @@ void MissionListManager::CompleteBackground(const std::shared_ptr DelayedSingleton::GetInstance()->MoveToBackground(abilityRecord->GetToken()); if (abilityRecord->GetPendingState() == AbilityState::FOREGROUND) { abilityRecord->PostForegroundTimeoutTask(); - abilityRecord->SetAbilityState(AbilityState::FOREGROUNDING); DelayedSingleton::GetInstance()->MoveToForeground(abilityRecord->GetToken()); } else if (abilityRecord->GetPendingState() == AbilityState::BACKGROUND) { TAG_LOGD(AAFwkTag::ABILITYMGR, "not continuous startup.");