Signed-off-by: yangyang706 <yangyang706@h-partners.com>
Change-Id: Ia70b0ad45738e5b25c4cc1f16b9fc28e8ec39bda
This commit is contained in:
yangyang706 2024-10-30 20:13:42 +08:00
parent 5b6148bb16
commit 4b558c5970
2 changed files with 4 additions and 4 deletions

View File

@ -729,18 +729,18 @@ void AppMgrServiceInner::AfterLoadAbility(std::shared_ptr<AppRunningRecord> appR
PerfProfile::GetInstance().Dump();
PerfProfile::GetInstance().Reset();
auto reportLoadTask = [appRecord, loadParam]() {
auto reportLoadTask = [appRecord, abilityRecordId = loadParam->abilityRecordId]() {
auto priorityObj = appRecord->GetPriorityObject();
if (priorityObj) {
auto timeOut = AbilityRuntime::GlobalConstant::GetLoadTimeOutBase() *
AAFwk::AppUtils::GetInstance().GetTimeoutUnitTimeRatio();
if (appRecord->GetExtensionType() == ExtensionAbilityType::SERVICE) {
timeOut = AbilityRuntime::GlobalConstant::GetLoadTimeOutInactive() *
timeOut = AbilityRuntime::GlobalConstant::GetLoadAndInactiveTimeout() *
AAFwk::AppUtils::GetInstance().GetTimeoutUnitTimeRatio();
}
AAFwk::ResSchedUtil::GetInstance().ReportLoadingEventToRss(AAFwk::LoadingStage::LOAD_BEGIN,
priorityObj->GetPid(), appRecord->GetUid(), timeOut, static_cast<int64_t>(loadParam->abilityRecordId));
priorityObj->GetPid(), appRecord->GetUid(), timeOut, static_cast<int64_t>(abilityRecordId));
}
};
if (taskHandler_) {

View File

@ -55,7 +55,7 @@ constexpr int32_t GetLoadTimeOutBase()
return TIMEOUT_UNIT_TIME * LOAD_TIMEOUT_MULTIPLE;
}
constexpr int32_t GetLoadTimeOutInactive()
constexpr int32_t GetLoadAndInactiveTimeout()
{
return TIMEOUT_UNIT_TIME * (LOAD_TIMEOUT_MULTIPLE + INACTIVE_TIMEOUT_MULTIPLE);
}