mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
commit
ad126ee669
@ -505,6 +505,14 @@ enum {
|
||||
* Result(29360232) for all connect manager deal connect apply timeout.
|
||||
*/
|
||||
DMS_CONNECT_APPLY_TIMEOUT_FAILED = 29360232,
|
||||
/**
|
||||
* Result(29360233) for mission continue state is not active.
|
||||
*/
|
||||
MISSION_NOT_CONTINUE_ACTIVE = 29360233,
|
||||
/**
|
||||
* Result(29360234) for mission is not focused.
|
||||
*/
|
||||
MISSION_NOT_FOCUSED = 29360234,
|
||||
};
|
||||
} // namespace DistributedSchedule
|
||||
} // namespace OHOS
|
||||
|
@ -723,7 +723,7 @@ int32_t DSchedContinue::CheckContinueAbilityPermission()
|
||||
if (missionInfo.continueState != AAFwk::ContinueState::CONTINUESTATE_ACTIVE) {
|
||||
HILOGE("Mission continue state set to INACTIVE. Can't continue. Mission id: %{public}d",
|
||||
continueInfo_.missionId_);
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
return MISSION_NOT_CONTINUE_ACTIVE;
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
|
@ -810,7 +810,8 @@ bool DmsRadar::ClickIconDmsStartAbility(const std::string& func, int32_t errCode
|
||||
bool DmsRadar::ClickIconDmsRecvOver(const std::string& func, int32_t errCode)
|
||||
{
|
||||
int32_t res = ERR_OK;
|
||||
StageRes stageRes = (errCode == ERR_OK) ? StageRes::STAGE_SUCC : StageRes::STAGE_FAIL;
|
||||
StageRes stageRes = (errCode == ERR_OK || errCode == MISSION_NOT_FOCUSED ||
|
||||
errCode == MISSION_NOT_CONTINUE_ACTIVE) ? StageRes::STAGE_SUCC : StageRes::STAGE_FAIL;
|
||||
if (stageRes == StageRes::STAGE_SUCC) {
|
||||
res = HiSysEventWrite(
|
||||
APP_CONTINUE_DOMAIN,
|
||||
|
@ -214,7 +214,7 @@ int32_t DMSContinueSendMgr::GetMissionIdByBundleName(const std::string& bundleNa
|
||||
HILOGI("get missionId end, missionId: %{public}d", missionId);
|
||||
return ERR_OK;
|
||||
}
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
return MISSION_NOT_FOCUSED;
|
||||
}
|
||||
|
||||
void DMSContinueSendMgr::StartEvent()
|
||||
@ -240,6 +240,10 @@ int32_t DMSContinueSendMgr::SendSoftbusEvent(uint16_t bundleNameId, uint8_t cont
|
||||
HILOGD("SendSoftbusEvent start, bundleNameId: %{public}u, continueTypeId: %{public}u",
|
||||
bundleNameId, continueTypeId);
|
||||
std::shared_ptr<DSchedDataBuffer> buffer = std::make_shared<DSchedDataBuffer>(DMS_SEND_LEN);
|
||||
if (buffer->Data() == nullptr || buffer->Size() < DMS_SEND_LEN) {
|
||||
HILOGE("Failed to initialize DSchedDataBuffer");
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
}
|
||||
buffer->Data()[0] = (type << CONTINUE_SHIFT_04) | DMS_DATA_LEN;
|
||||
buffer->Data()[1] = (bundleNameId >> CONTINUE_SHIFT_08) & DMS_0XFF;
|
||||
buffer->Data()[INDEX_2] = bundleNameId & DMS_0XFF;
|
||||
|
Loading…
Reference in New Issue
Block a user