codecheck

Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
MisterE 2024-11-13 09:35:05 +08:00
commit 0a37918af3
3 changed files with 21 additions and 20 deletions

View File

@ -146,7 +146,6 @@ private:
int32_t PostContinueSendTask(const OHOS::AAFwk::Want& want, int32_t callerUid, int32_t status,
uint32_t accessToken);
int32_t PostContinueDataTask(std::shared_ptr<DSchedContinueDataCmd> cmd);
int32_t UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd> cmd);
int32_t PostNotifyCompleteTask(int32_t result);
int32_t PostContinueEndTask(int32_t result);
@ -166,6 +165,7 @@ private:
uint32_t accessToken);
int32_t OnContinueDataCmd(std::shared_ptr<DSchedContinueDataCmd> cmd);
int32_t OnNotifyComplete(int32_t missionId, bool isSuccess);
int32_t UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd> cmd);
int32_t OnContinueEndCmd(std::shared_ptr<DSchedContinueEndCmd> cmd);
int32_t OnContinueEnd(int32_t result);

View File

@ -404,12 +404,29 @@ int32_t DSchedContinue::PostContinueDataTask(std::shared_ptr<DSchedContinueDataC
return ERR_OK;
}
int32_t DSchedContinue::OnNotifyComplete(int32_t missionId, bool isSuccess)
{
HILOGI("called");
if (!isSuccess) {
HILOGE("start ability not success");
PostNotifyCompleteTask(CONTINUE_CALL_START_ABILITY_FAILED);
return ERR_OK;
}
if (missionId <= 0) {
HILOGE("start ability returns invalid missionId");
PostNotifyCompleteTask(INVALID_PARAMETERS_ERR);
return ERR_OK;
}
PostNotifyCompleteTask(ERR_OK);
return ERR_OK;
}
int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd> cmd)
{
std::string moduleName = cmd->want_.GetStringParam(OHOS::AAFwk::Want::PARAM_MODULE_NAME);
DmsBundleInfo distributedBundleInfo;
if (!DmsBmStorage::GetInstance()->GetDistributedBundleInfo(
cmd->dstDeviceId_, cmd->dstBundleName_, distributedBundleInfo)) {
cmd->dstDeviceId_, cmd->dstBundleName_, distributedBundleInfo)) {
HILOGE("UpdateElementInfo can not found bundle info for bundle name: %{public}s",
cmd->dstBundleName_.c_str());
return CAN_NOT_FOUND_MODULE_ERR;
@ -457,23 +474,6 @@ int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr<DSchedContinueDataCmd>
return ERR_OK;
}
int32_t DSchedContinue::OnNotifyComplete(int32_t missionId, bool isSuccess)
{
HILOGI("called");
if (!isSuccess) {
HILOGE("start ability not success");
PostNotifyCompleteTask(CONTINUE_CALL_START_ABILITY_FAILED);
return ERR_OK;
}
if (missionId <= 0) {
HILOGE("start ability returns invalid missionId");
PostNotifyCompleteTask(INVALID_PARAMETERS_ERR);
return ERR_OK;
}
PostNotifyCompleteTask(ERR_OK);
return ERR_OK;
}
int32_t DSchedContinue::OnContinueEndCmd(std::shared_ptr<DSchedContinueEndCmd> cmd)
{
HILOGI("called");

View File

@ -454,7 +454,8 @@ bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId,
}
bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId, const std::string &bundleName,
DmsBundleInfo &distributeBundleInfo){
DmsBundleInfo &distributeBundleInfo)
{
HILOGD("networkId: %{public}s bundleNameId: %{public}s", GetAnonymStr(networkId).c_str(), bundleName.c_str());
if (!CheckKvStore()) {
HILOGE("kvStore is nullptr");