From ec97bc35e9096a1f5a006406dfeb8aadd1d1ad7e Mon Sep 17 00:00:00 2001 From: xia Date: Wed, 4 Sep 2024 10:59:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=9E=E9=80=80=E6=8F=90=E5=89=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AEforegrounding=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20Signed-off-by:=20xia=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/abilitymgr/src/ability_record.cpp | 1 - services/abilitymgr/src/mission_list_manager.cpp | 3 --- 2 files changed, 4 deletions(-) diff --git a/services/abilitymgr/src/ability_record.cpp b/services/abilitymgr/src/ability_record.cpp index 892c3ad6f0..a6baf15687 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_); } } 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."); From c9a050a986b9180338500eedb563de372527502e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E8=89=AF=E4=BC=9F?= Date: Wed, 4 Sep 2024 09:32:17 +0000 Subject: [PATCH 2/2] update services/abilitymgr/src/ability_record.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 夏良伟 --- services/abilitymgr/src/ability_record.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/services/abilitymgr/src/ability_record.cpp b/services/abilitymgr/src/ability_record.cpp index a6baf15687..cc318d09b7 100644 --- a/services/abilitymgr/src/ability_record.cpp +++ b/services/abilitymgr/src/ability_record.cpp @@ -707,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 {