mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
!806 修复计算器组网成功后无法拉起设备
Merge pull request !806 from 师皓杰/cherry-pick-1708998218
This commit is contained in:
commit
9a389d63f4
@ -187,16 +187,25 @@ DmsDumperInfo DmsContinueTime::GetDstInfo()
|
||||
|
||||
void DmsContinueTime::SetDurationBegin(const int32_t idx, const int64_t time)
|
||||
{
|
||||
if (durationInfo_.empty()) {
|
||||
return;
|
||||
}
|
||||
durationInfo_[idx].SetBeginTime(time);
|
||||
}
|
||||
|
||||
void DmsContinueTime::SetDurationEnd(const int32_t idx, const int64_t time)
|
||||
{
|
||||
if (durationInfo_.empty()) {
|
||||
return;
|
||||
}
|
||||
durationInfo_[idx].SetEndTime(time);
|
||||
}
|
||||
|
||||
void DmsContinueTime::SetDurationStrTime(const int32_t idx, const std::string info)
|
||||
{
|
||||
if (durationInfo_.empty()) {
|
||||
return;
|
||||
}
|
||||
durationInfo_[idx].SetStrTime(info);
|
||||
}
|
||||
|
||||
@ -372,6 +381,7 @@ void DmsContinueTime::AppendInfo()
|
||||
}
|
||||
timeInfoList_.push_back(appendInfo_);
|
||||
appendInfo_.clear();
|
||||
durationInfo_.clear();
|
||||
}
|
||||
|
||||
void DmsContinueTime::ShowInfo(std::string& result)
|
||||
|
@ -200,6 +200,7 @@ void DistributedSchedService::DeviceOfflineNotify(const std::string& networkId)
|
||||
bool DistributedSchedService::Init()
|
||||
{
|
||||
HILOGD("ready to init.");
|
||||
DmsContinueTime::GetInstance().Init();
|
||||
DnetworkAdapter::GetInstance()->Init();
|
||||
if (!DtbschedmgrDeviceInfoStorage::GetInstance().Init()) {
|
||||
HILOGW("DtbschedmgrDeviceInfoStorage init failed.");
|
||||
|
@ -69,6 +69,7 @@ void DmsContinueTimeTest::TearDown()
|
||||
void DmsContinueTimeTest::SetUp()
|
||||
{
|
||||
DTEST_LOG << "DmsContinueTimeTest::SetUp" << std::endl;
|
||||
DmsContinueTime::GetInstance().Init();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,6 +371,7 @@ HWTEST_F(DmsContinueTimeTest, AppendInfo_002, TestSize.Level3)
|
||||
std::string result;
|
||||
DmsContinueTime::GetInstance().SetSrcBundleName(BUNDLE_NAME);
|
||||
DmsContinueTime::GetInstance().SetDstBundleName(BUNDLE_NAME);
|
||||
DmsContinueTime::GetInstance().SetPull(false);
|
||||
DmsContinueTime::GetInstance().AppendInfo();
|
||||
DmsContinueTime::GetInstance().ShowInfo(result);
|
||||
EXPECT_EQ(result.empty(), false);
|
||||
|
Loading…
Reference in New Issue
Block a user