!1185 AMS加载应用慢,添加合适等待时间

Merge pull request !1185 from 韦国庆/master
This commit is contained in:
openharmony_ci 2024-11-22 07:57:42 +00:00 committed by Gitee
commit fa8d0ac7d2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 9 additions and 4 deletions

View File

@ -525,6 +525,10 @@ enum {
* Result(29360237) for not get mgr.
*/
DMS_NOT_GET_MANAGER = 29360237,
/**
* Result(29360238) for get window failed from scb.
*/
DMS_GET_WINDOW_FAILED_FROM_SCB = 29360238,
};
} // namespace DistributedSchedule
} // namespace OHOS

View File

@ -945,15 +945,15 @@ int32_t DSchedContinue::ExecuteContinueData(std::shared_ptr<DSchedContinueDataCm
int32_t persistentId;
if (ContinueSceneSessionHandler::GetInstance().GetPersistentId(persistentId) != ERR_OK) {
HILOGE("get persistentId failed, stop start ability");
return OnContinueEnd(ERR_OK);
return OnContinueEnd(DMS_GET_WINDOW_FAILED_FROM_SCB);
}
HILOGI("get persistentId success, persistentId: %{public}d", persistentId);
WaitAbilityStateInitial(persistentId);
want.SetParam(DMS_PERSISTENT_ID, persistentId);
if (ContinueSceneSessionHandler::GetInstance().GetPersistentId(persistentId) != ERR_OK) {
HILOGE("get persistentId failed, stop start ability");
return OnContinueEnd(ERR_OK);
HILOGE("Second get persistentId failed, stop start ability");
return OnContinueEnd(DMS_GET_WINDOW_FAILED_FROM_SCB);
}
}

View File

@ -26,7 +26,7 @@ namespace OHOS {
namespace DistributedSchedule {
namespace {
const std::string TAG = "ContinueSceneSessionHandler";
constexpr int32_t RETRY_TIMES = 2;
constexpr int32_t RETRY_TIMES = 60;
constexpr int32_t SLEEP_TIME = 50;
}

View File

@ -137,6 +137,7 @@ void MultiUserManager::OnUserSwitched(int32_t accountId)
HILOGI("GetSendMgr failed.");
return;
}
sendMgr->NotifyDeviceOnline();
recvMgr = GetCurrentRecvMgr();
if (recvMgr == nullptr) {
HILOGI("GetRecvMgr failed.");