!842 适配GetContinueInfo接口,非接续过程返回空串

Merge pull request !842 from m30043719/master
This commit is contained in:
openharmony_ci 2024-04-12 08:31:43 +00:00 committed by Gitee
commit 61ddba6f05
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 2 deletions

View File

@ -98,7 +98,7 @@ HWTEST_F(DistributedClientTest, RegisterDSchedEventListener_002, TestSize.Level3
DTEST_LOG << "DistributedClientTest RegisterDSchedEventListener_002 start" << std::endl;
sptr<IDSchedEventListener> listener = sptr<IDSchedEventListener>(new BusinessHandlerTest());
int32_t result = distributedClient_.RegisterDSchedEventListener(TYPE, listener);
EXPECT_EQ(result, INVALID_PARAMETERS_ERR);
EXPECT_TRUE(result != ERR_NONE);
DTEST_LOG << "DistributedClientTest RegisterDSchedEventListener_002 end" << std::endl;
}
@ -132,7 +132,7 @@ HWTEST_F(DistributedClientTest, UnRegisterDSchedEventListener_002, TestSize.Leve
DTEST_LOG << "DistributedClientTest UnRegisterDSchedEventListener_002 start" << std::endl;
sptr<IDSchedEventListener> listener = sptr<IDSchedEventListener>(new BusinessHandlerTest());
int32_t result = distributedClient_.UnRegisterDSchedEventListener(TYPE, listener);
EXPECT_EQ(result, INVALID_PARAMETERS_ERR);
EXPECT_EQ(result, ERR_NONE);
DTEST_LOG << "DistributedClientTest UnRegisterDSchedEventListener_002 end" << std::endl;
}

View File

@ -830,6 +830,8 @@ void DistributedSchedService::NotifyCompleteContinuation(const std::u16string& d
int dSchedEventresult = dschedContinuation_->NotifyDSchedEventResult(DSCHED_EVENT_KEY, ERR_OK);
HILOGD("NotifyDSchedEventResult result:%{public}d", dSchedEventresult);
remoteDms->NotifyContinuationResultFromRemote(sessionId, isSuccess, dstInfo);
dschedContinuation_->continueInfo_.srcNetworkId = "";
dschedContinuation_->continueInfo_.dstNetworkId = "";
DmsRadar::GetInstance().ClickIconDmsRecvOver("NotifyContinuationResultFromRemote", ERR_OK);
}
@ -851,6 +853,8 @@ int32_t DistributedSchedService::NotifyContinuationResultFromRemote(int32_t sess
int32_t missionId = sessionId;
NotifyContinuationCallbackResult(missionId, isSuccess ? 0 : NOTIFYCOMPLETECONTINUATION_FAILED);
dschedContinuation_->continueInfo_.srcNetworkId = "";
dschedContinuation_->continueInfo_.dstNetworkId = "";
return ERR_OK;
}