diff --git a/frameworks/native/ability/native/ui_ability_impl.cpp b/frameworks/native/ability/native/ui_ability_impl.cpp index cc6c528ea3..4e57d39015 100644 --- a/frameworks/native/ability/native/ui_ability_impl.cpp +++ b/frameworks/native/ability/native/ui_ability_impl.cpp @@ -366,7 +366,8 @@ void UIAbilityImpl::UpdateSilentForeground(const AAFwk::LifeCycleStateInfo &targ } if (lifecycleState_ == AAFwk::ABILITY_STATE_INITIAL && sessionInfo && sessionInfo->processOptions && - AAFwk::ProcessOptions::IsValidProcessMode(sessionInfo->processOptions->processMode) && + (sessionInfo->processOptions->isRestartKeepAlive + || AAFwk::ProcessOptions::IsValidProcessMode(sessionInfo->processOptions->processMode)) && sessionInfo->processOptions->startupVisibility == AAFwk::StartupVisibility::STARTUP_HIDE) { TAG_LOGI(AAFwkTag::UIABILITY, "set IsSilentForeground to true"); ability_->SetIsSilentForeground(true);