mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
AMS加载应用慢,添加合适等待时间
Signed-off-by: 韦国庆 <weiguoqing2@huawei.com>
This commit is contained in:
parent
ea37dc0646
commit
9a721a0aff
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -137,6 +137,7 @@ void MultiUserManager::OnUserSwitched(int32_t accountId)
|
||||
HILOGI("GetSendMgr failed.");
|
||||
return;
|
||||
}
|
||||
sendMgr->NotifyDeviceOnline();
|
||||
recvMgr = GetCurrentRecvMgr();
|
||||
if (recvMgr == nullptr) {
|
||||
HILOGI("GetRecvMgr failed.");
|
||||
|
Loading…
Reference in New Issue
Block a user