mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-23 07:10:19 +00:00
commit
de4ee4cb95
@ -494,6 +494,10 @@ void AbilityRecord::PostForegroundTimeoutTask()
|
||||
}
|
||||
int foregroundTimeout =
|
||||
AmsConfigurationParameter::GetInstance().GetAppStartTimeoutTime() * FOREGROUND_TIMEOUT_MULTIPLE;
|
||||
if (InsightIntentExecuteParam::IsInsightIntentExecute(GetWant())) {
|
||||
foregroundTimeout = AmsConfigurationParameter::GetInstance().GetAppStartTimeoutTime() *
|
||||
INSIGHT_INTENT_TIMEOUT_MULTIPLE;
|
||||
}
|
||||
SendEvent(AbilityManagerService::FOREGROUND_HALF_TIMEOUT_MSG, foregroundTimeout / HALF_TIMEOUT);
|
||||
SendEvent(AbilityManagerService::FOREGROUND_TIMEOUT_MSG, foregroundTimeout);
|
||||
std::string methodName = "ProcessForegroundAbility";
|
||||
@ -538,6 +542,10 @@ void AbilityRecord::PostUIExtensionAbilityTimeoutTask(uint32_t messageId)
|
||||
case AbilityManagerService::FOREGROUND_TIMEOUT_MSG: {
|
||||
uint32_t timeout = AmsConfigurationParameter::GetInstance().GetAppStartTimeoutTime() *
|
||||
static_cast<uint32_t>(FOREGROUND_TIMEOUT_MULTIPLE);
|
||||
if (InsightIntentExecuteParam::IsInsightIntentExecute(GetWant())) {
|
||||
timeout = AmsConfigurationParameter::GetInstance().GetAppStartTimeoutTime() *
|
||||
static_cast<uint32_t>(INSIGHT_INTENT_TIMEOUT_MULTIPLE);
|
||||
}
|
||||
SendEvent(AbilityManagerService::FOREGROUND_HALF_TIMEOUT_MSG, timeout / HALF_TIMEOUT, recordId_, true);
|
||||
SendEvent(AbilityManagerService::FOREGROUND_TIMEOUT_MSG, timeout, recordId_, true);
|
||||
ResSchedUtil::GetInstance().ReportLoadingEventToRss(LoadingStage::FOREGROUND_BEGIN, GetPid(), GetUid(),
|
||||
@ -1255,6 +1263,10 @@ void AbilityRecord::BackgroundAbility(const Closure &task)
|
||||
if (handler && task) {
|
||||
int backgroundTimeout =
|
||||
AmsConfigurationParameter::GetInstance().GetAppStartTimeoutTime() * BACKGROUND_TIMEOUT_MULTIPLE;
|
||||
if (InsightIntentExecuteParam::IsInsightIntentExecute(GetWant())) {
|
||||
backgroundTimeout = AmsConfigurationParameter::GetInstance().GetAppStartTimeoutTime() *
|
||||
INSIGHT_INTENT_TIMEOUT_MULTIPLE;
|
||||
}
|
||||
handler->SubmitTask(task, "background_" + std::to_string(recordId_), backgroundTimeout, false);
|
||||
|
||||
if (abilityInfo_.type == AppExecFwk::AbilityType::PAGE) {
|
||||
|
@ -29,6 +29,7 @@ constexpr int32_t COLDSTART_TIMEOUT_MULTIPLE = 15000;
|
||||
constexpr int32_t LOAD_TIMEOUT_MULTIPLE = 15000;
|
||||
constexpr int32_t FOREGROUND_TIMEOUT_MULTIPLE = 7500;
|
||||
constexpr int32_t BACKGROUND_TIMEOUT_MULTIPLE = 4500;
|
||||
constexpr int32_t INSIGHT_INTENT_TIMEOUT_MULTIPLE = 15000;
|
||||
constexpr int32_t ACTIVE_TIMEOUT_MULTIPLE = 7500;
|
||||
constexpr int32_t TERMINATE_TIMEOUT_MULTIPLE = 15000;
|
||||
constexpr int32_t INACTIVE_TIMEOUT_MULTIPLE = 800;
|
||||
@ -39,6 +40,7 @@ constexpr int32_t COLDSTART_TIMEOUT_MULTIPLE = 10;
|
||||
constexpr int32_t LOAD_TIMEOUT_MULTIPLE = 10;
|
||||
constexpr int32_t FOREGROUND_TIMEOUT_MULTIPLE = 5;
|
||||
constexpr int32_t BACKGROUND_TIMEOUT_MULTIPLE = 3;
|
||||
constexpr int32_t INSIGHT_INTENT_TIMEOUT_MULTIPLE = 10;
|
||||
constexpr int32_t ACTIVE_TIMEOUT_MULTIPLE = 5;
|
||||
constexpr int32_t TERMINATE_TIMEOUT_MULTIPLE = 10;
|
||||
constexpr int32_t INACTIVE_TIMEOUT_MULTIPLE = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user