diff --git a/frameworks/native/ability/native/insight_intent_executor/ets_insight_intent_entry.cpp b/frameworks/native/ability/native/insight_intent_executor/ets_insight_intent_entry.cpp index 0d3bedd2ff..7691df5d51 100644 --- a/frameworks/native/ability/native/insight_intent_executor/ets_insight_intent_entry.cpp +++ b/frameworks/native/ability/native/insight_intent_executor/ets_insight_intent_entry.cpp @@ -272,8 +272,11 @@ bool EtsInsightIntentEntry::PrepareExecuteEnvironment(ani_env *env, InsightInten return false; } - if (pageLoader == nullptr) { + if (mode == InsightIntentExecuteMode::UIABILITY_BACKGROUND || + mode == InsightIntentExecuteMode::SERVICE_EXTENSION_ABILITY) { return true; + } else if (pageLoader == nullptr) { + return false; } const char *propertyName = mode == InsightIntentExecuteMode::UIEXTENSION_ABILITY ?