fix start ability xts error mismatch

Signed-off-by: t00605578 <tongyuejiao@huawei.com>
This commit is contained in:
t00605578 2024-06-25 16:50:47 +08:00
parent 2618141575
commit 7e823bb913
3 changed files with 9 additions and 6 deletions

View File

@ -161,7 +161,7 @@ int32_t DistributedClient::GetDSchedEventInfo(const DSchedEventType &type, std::
}
uint32_t eventNum = reply.ReadUint32();
if (eventNum > UINT32_MAX || eventNum > DSCHED_EVENT_MAX_NUM) {
if (eventNum > DSCHED_EVENT_MAX_NUM) {
HILOG_ERROR("Proxy get dms eventInfos num %{public}u is invalid.", eventNum);
return AAFwk::INVALID_PARAMETERS_ERR;
}

View File

@ -55,7 +55,9 @@ const int DEFAULT_DMS_MISSION_ID = -1;
const int FA_MODULE_ALLOW_MIN_API_VERSION = 8;
const int DEFAULT_DEVICE_SECURITY_LEVEL = -1;
}
IMPLEMENT_SINGLE_INSTANCE(DistributedSchedPermission);
void from_json(const nlohmann::json& jsonObject, GroupInfo& groupInfo)
{
const auto &jsonObjectEnd = jsonObject.end();

View File

@ -591,6 +591,12 @@ int32_t DistributedSchedService::StartRemoteAbility(const OHOS::AAFwk::Want& wan
}
#endif // DMSFWK_INTERACTIVE_ADAPTER
sptr<IDistributedSched> remoteDms = GetRemoteDms(deviceId);
if (remoteDms == nullptr) {
HILOGE("get remoteDms failed");
return INVALID_PARAMETERS_ERR;
}
CallerInfo callerInfo;
int32_t ret = GetCallerInfo(localDeviceId, callerUid, accessToken, callerInfo);
if (ret != ERR_OK) {
@ -607,11 +613,6 @@ int32_t DistributedSchedService::StartRemoteAbility(const OHOS::AAFwk::Want& wan
newWant->SetParam(DMS_SRC_NETWORK_ID, localDeviceId);
AppExecFwk::AbilityInfo abilityInfo;
sptr<IDistributedSched> remoteDms = GetRemoteDms(deviceId);
if (remoteDms == nullptr) {
HILOGE("get remoteDms failed");
return INVALID_PARAMETERS_ERR;
}
HILOGI("[PerformanceTest] StartRemoteAbility transact begin");
if (!DmsContinueTime::GetInstance().GetPull()) {
int64_t begin = GetTickCount();