mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
DFX: add app version for radar
Signed-off-by: z00838083 <zhuhuixuan@huawei.com>
This commit is contained in:
parent
ad126ee669
commit
9872bf56af
@ -142,7 +142,7 @@ private:
|
|||||||
|
|
||||||
int32_t PostStartTask(const OHOS::AAFwk::WantParams& wantParams);
|
int32_t PostStartTask(const OHOS::AAFwk::WantParams& wantParams);
|
||||||
int32_t PostReplyTask(std::shared_ptr<DSchedContinueReplyCmd> cmd);
|
int32_t PostReplyTask(std::shared_ptr<DSchedContinueReplyCmd> cmd);
|
||||||
int32_t PostCotinueAbilityTask(int32_t appVersion);
|
int32_t PostCotinueAbilityTask(uint32_t appVersion);
|
||||||
int32_t PostContinueSendTask(const OHOS::AAFwk::Want& want, int32_t callerUid, int32_t status,
|
int32_t PostContinueSendTask(const OHOS::AAFwk::Want& want, int32_t callerUid, int32_t status,
|
||||||
uint32_t accessToken);
|
uint32_t accessToken);
|
||||||
int32_t PostContinueDataTask(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
int32_t PostContinueDataTask(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
||||||
@ -150,7 +150,7 @@ private:
|
|||||||
int32_t PostContinueEndTask(int32_t result);
|
int32_t PostContinueEndTask(int32_t result);
|
||||||
|
|
||||||
int32_t ExecuteContinueReq(std::shared_ptr<DistributedWantParams> wantParams);
|
int32_t ExecuteContinueReq(std::shared_ptr<DistributedWantParams> wantParams);
|
||||||
int32_t ExecuteContinueAbility(int32_t appVersion);
|
int32_t ExecuteContinueAbility(uint32_t appVersion);
|
||||||
int32_t ExecuteContinueReply();
|
int32_t ExecuteContinueReply();
|
||||||
int32_t ExecuteContinueSend(std::shared_ptr<ContinueAbilityData> data);
|
int32_t ExecuteContinueSend(std::shared_ptr<ContinueAbilityData> data);
|
||||||
int32_t ExecuteContinueData(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
int32_t ExecuteContinueData(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
||||||
@ -159,7 +159,7 @@ private:
|
|||||||
int32_t ExecuteContinueError(int32_t result);
|
int32_t ExecuteContinueError(int32_t result);
|
||||||
|
|
||||||
int32_t OnContinueMission(const OHOS::AAFwk::WantParams& wantParams);
|
int32_t OnContinueMission(const OHOS::AAFwk::WantParams& wantParams);
|
||||||
int32_t OnStartCmd(int32_t appVersion);
|
int32_t OnStartCmd(uint32_t appVersion);
|
||||||
int32_t OnReplyCmd(std::shared_ptr<DSchedContinueReplyCmd> cmd);
|
int32_t OnReplyCmd(std::shared_ptr<DSchedContinueReplyCmd> cmd);
|
||||||
int32_t OnStartContinuation(const OHOS::AAFwk::Want& want, int32_t callerUid, int32_t status,
|
int32_t OnStartContinuation(const OHOS::AAFwk::Want& want, int32_t callerUid, int32_t status,
|
||||||
uint32_t accessToken);
|
uint32_t accessToken);
|
||||||
@ -182,7 +182,7 @@ private:
|
|||||||
const AccountInfo& accountInfo);
|
const AccountInfo& accountInfo);
|
||||||
int32_t CheckStartPermission(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
int32_t CheckStartPermission(std::shared_ptr<DSchedContinueDataCmd> cmd);
|
||||||
int32_t PackEndCmd(std::shared_ptr<DSchedContinueEndCmd> cmd, int32_t result);
|
int32_t PackEndCmd(std::shared_ptr<DSchedContinueEndCmd> cmd, int32_t result);
|
||||||
int32_t PackReplyCmd(std::shared_ptr<DSchedContinueReplyCmd> cmd, int32_t replyCmd, int32_t appVersion,
|
int32_t PackReplyCmd(std::shared_ptr<DSchedContinueReplyCmd> cmd, int32_t replyCmd, uint32_t appVersion,
|
||||||
int32_t result, const std::string reason);
|
int32_t result, const std::string reason);
|
||||||
int32_t SendCommand(std::shared_ptr<DSchedContinueCmdBase> cmd);
|
int32_t SendCommand(std::shared_ptr<DSchedContinueCmdBase> cmd);
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t direction_ = 0;
|
int32_t direction_ = 0;
|
||||||
int32_t appVersion_ = 0;
|
uint32_t appVersion_ = 0;
|
||||||
DistributedWantParams wantParams_;
|
DistributedWantParams wantParams_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t replyCmd_ = 0;
|
int32_t replyCmd_ = 0;
|
||||||
int32_t appVersion_ = 0;
|
uint32_t appVersion_ = 0;
|
||||||
int32_t result_ = 0;
|
int32_t result_ = 0;
|
||||||
std::string reason_;
|
std::string reason_;
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ namespace DistributedSchedule {
|
|||||||
namespace {
|
namespace {
|
||||||
constexpr int32_t MAX_CONCURRENT_SINK = 1;
|
constexpr int32_t MAX_CONCURRENT_SINK = 1;
|
||||||
constexpr int32_t MAX_CONCURRENT_SOURCE = 1;
|
constexpr int32_t MAX_CONCURRENT_SOURCE = 1;
|
||||||
constexpr int32_t CONTINUE_TIMEOUT = 7000;
|
constexpr int32_t CONTINUE_TIMEOUT = 10000;
|
||||||
}
|
}
|
||||||
class DSchedContinueManager {
|
class DSchedContinueManager {
|
||||||
DECLARE_SINGLE_INSTANCE_BASE(DSchedContinueManager);
|
DECLARE_SINGLE_INSTANCE_BASE(DSchedContinueManager);
|
||||||
@ -59,7 +59,7 @@ public:
|
|||||||
std::shared_ptr<DSchedContinue> GetDSchedContinueByWant(const OHOS::AAFwk::Want& want, int32_t missionId);
|
std::shared_ptr<DSchedContinue> GetDSchedContinueByWant(const OHOS::AAFwk::Want& want, int32_t missionId);
|
||||||
std::shared_ptr<DSchedContinue> GetDSchedContinueByDevId(const std::u16string& devId, int32_t missionId);
|
std::shared_ptr<DSchedContinue> GetDSchedContinueByDevId(const std::u16string& devId, int32_t missionId);
|
||||||
void NotifyTerminateContinuation(const int32_t missionId);
|
void NotifyTerminateContinuation(const int32_t missionId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void StartEvent();
|
void StartEvent();
|
||||||
void HandleContinueMission(const std::string& srcDeviceId, const std::string& dstDeviceId, int32_t missionId,
|
void HandleContinueMission(const std::string& srcDeviceId, const std::string& dstDeviceId, int32_t missionId,
|
||||||
|
@ -50,6 +50,8 @@ const std::string ERROR_CODE = "ERROR_CODE";
|
|||||||
const std::string PEER_UDID = "PEER_UDID";
|
const std::string PEER_UDID = "PEER_UDID";
|
||||||
const std::string APP_CALLEE = "APP_CALLEE";
|
const std::string APP_CALLEE = "APP_CALLEE";
|
||||||
const std::string APP_CALLER = "APP_CALLER";
|
const std::string APP_CALLER = "APP_CALLER";
|
||||||
|
const std::string LOCAL_APP_VERSION = "LOCAL_APP_VERSION";
|
||||||
|
const std::string PEER_APP_VERSION = "PEER_APP_VERSION";
|
||||||
constexpr char APP_CONTINUE_DOMAIN[] = "APP_CONTINUE";
|
constexpr char APP_CONTINUE_DOMAIN[] = "APP_CONTINUE";
|
||||||
constexpr int32_t ANONYM_MIN_LENGTH = 10;
|
constexpr int32_t ANONYM_MIN_LENGTH = 10;
|
||||||
constexpr int32_t SUBSTR_UDID_LENGTH = 5;
|
constexpr int32_t SUBSTR_UDID_LENGTH = 5;
|
||||||
@ -168,7 +170,7 @@ public:
|
|||||||
bool RecvUnfocused(const std::string& func);
|
bool RecvUnfocused(const std::string& func);
|
||||||
bool UnfocusedGetBundleName(const std::string& func, int32_t errCode);
|
bool UnfocusedGetBundleName(const std::string& func, int32_t errCode);
|
||||||
bool NotifyDockUnfocused(const std::string& func, int32_t errCode);
|
bool NotifyDockUnfocused(const std::string& func, int32_t errCode);
|
||||||
bool ClickIconDmsContinue(const std::string& func, int32_t errCode, std::string peerUdid,
|
bool ClickIconDmsContinue(const std::string& func, int32_t errCode, std::string peerDeviceId,
|
||||||
const std::string& srcBundleName, const std::string& dstBundleName);
|
const std::string& srcBundleName, const std::string& dstBundleName);
|
||||||
bool ClickIconDmsStartAbility(const std::string& func, int32_t errCode);
|
bool ClickIconDmsStartAbility(const std::string& func, int32_t errCode);
|
||||||
bool ClickIconDmsRecvOver(const std::string& func, int32_t errCode);
|
bool ClickIconDmsRecvOver(const std::string& func, int32_t errCode);
|
||||||
|
@ -264,13 +264,13 @@ int32_t DSchedContinue::PostStartTask(const OHOS::AAFwk::WantParams& wantParams)
|
|||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DSchedContinue::OnStartCmd(int32_t appVersion)
|
int32_t DSchedContinue::OnStartCmd(uint32_t appVersion)
|
||||||
{
|
{
|
||||||
HILOGI("called");
|
HILOGI("called");
|
||||||
return PostCotinueAbilityTask(appVersion);
|
return PostCotinueAbilityTask(appVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DSchedContinue::PostCotinueAbilityTask(int32_t appVersion)
|
int32_t DSchedContinue::PostCotinueAbilityTask(uint32_t appVersion)
|
||||||
{
|
{
|
||||||
DSchedContinueEventType eventType = DSHCED_CONTINUE_ABILITY_EVENT;
|
DSchedContinueEventType eventType = DSHCED_CONTINUE_ABILITY_EVENT;
|
||||||
HILOGI("PostCotinueAbilityTask %{public}d, continueInfo %{public}s", eventType,
|
HILOGI("PostCotinueAbilityTask %{public}d, continueInfo %{public}s", eventType,
|
||||||
@ -279,7 +279,7 @@ int32_t DSchedContinue::PostCotinueAbilityTask(int32_t appVersion)
|
|||||||
HILOGE("PostCotinueAbilityTask eventHandler is nullptr");
|
HILOGE("PostCotinueAbilityTask eventHandler is nullptr");
|
||||||
return INVALID_PARAMETERS_ERR;
|
return INVALID_PARAMETERS_ERR;
|
||||||
}
|
}
|
||||||
auto data = std::make_shared<int32_t>(appVersion);
|
auto data = std::make_shared<uint32_t>(appVersion);
|
||||||
auto msgEvent = AppExecFwk::InnerEvent::Get(eventType, data, 0);
|
auto msgEvent = AppExecFwk::InnerEvent::Get(eventType, data, 0);
|
||||||
if (!eventHandler_->SendEvent(msgEvent, 0, AppExecFwk::EventQueue::Priority::IMMEDIATE)) {
|
if (!eventHandler_->SendEvent(msgEvent, 0, AppExecFwk::EventQueue::Priority::IMMEDIATE)) {
|
||||||
HILOGE("PostCotinueAbilityTask eventHandler send event type %{public}d fail", eventType);
|
HILOGE("PostCotinueAbilityTask eventHandler send event type %{public}d fail", eventType);
|
||||||
@ -498,8 +498,7 @@ int32_t DSchedContinue::ExecuteContinueReq(std::shared_ptr<DistributedWantParams
|
|||||||
std::string peerDeviceId = (direction_ == CONTINUE_SOURCE) ?
|
std::string peerDeviceId = (direction_ == CONTINUE_SOURCE) ?
|
||||||
continueInfo_.sinkDeviceId_ : continueInfo_.sourceDeviceId_;
|
continueInfo_.sinkDeviceId_ : continueInfo_.sourceDeviceId_;
|
||||||
|
|
||||||
std::string peerUdid = DtbschedmgrDeviceInfoStorage::GetInstance().GetUdidByNetworkId(peerDeviceId);
|
DmsRadar::GetInstance().ClickIconDmsContinue("ContinueMission", ERR_OK, peerDeviceId,
|
||||||
DmsRadar::GetInstance().ClickIconDmsContinue("ContinueMission", ERR_OK, peerUdid,
|
|
||||||
continueInfo_.sourceBundleName_, continueInfo_.sinkBundleName_);
|
continueInfo_.sourceBundleName_, continueInfo_.sinkBundleName_);
|
||||||
|
|
||||||
DmsUE::GetInstance().TriggerDmsContinue(continueInfo_.sinkBundleName_, continueInfo_.sinkAbilityName_,
|
DmsUE::GetInstance().TriggerDmsContinue(continueInfo_.sinkBundleName_, continueInfo_.sinkAbilityName_,
|
||||||
@ -653,15 +652,15 @@ int32_t DSchedContinue::PackStartCmd(std::shared_ptr<DSchedContinueStartCmd>& cm
|
|||||||
HILOGE("pack start cmd failed, the bundle is not installed on local device.");
|
HILOGE("pack start cmd failed, the bundle is not installed on local device.");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
cmd->appVersion_ = static_cast<int32_t>(localBundleInfo.versionCode);
|
cmd->appVersion_ = localBundleInfo.versionCode;
|
||||||
}
|
}
|
||||||
cmd->wantParams_ = *wantParams;
|
cmd->wantParams_ = *wantParams;
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DSchedContinue::ExecuteContinueAbility(int32_t appVersion)
|
int32_t DSchedContinue::ExecuteContinueAbility(uint32_t appVersion)
|
||||||
{
|
{
|
||||||
HILOGI("ExecuteContinueAbility start, appVersion: %{public}d", appVersion);
|
HILOGI("ExecuteContinueAbility start, appVersion: %{public}u", appVersion);
|
||||||
DmsRadar::GetInstance().SaveDataDmsContinue("ContinueAbility", ERR_OK);
|
DmsRadar::GetInstance().SaveDataDmsContinue("ContinueAbility", ERR_OK);
|
||||||
|
|
||||||
int32_t result = GetMissionIdByBundleName();
|
int32_t result = GetMissionIdByBundleName();
|
||||||
@ -1072,7 +1071,7 @@ int32_t DSchedContinue::ExecuteNotifyComplete(int32_t result)
|
|||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t DSchedContinue::PackReplyCmd(std::shared_ptr<DSchedContinueReplyCmd> cmd, int32_t replyCmd, int32_t appVersion,
|
int32_t DSchedContinue::PackReplyCmd(std::shared_ptr<DSchedContinueReplyCmd> cmd, int32_t replyCmd, uint32_t appVersion,
|
||||||
int32_t result, const std::string reason)
|
int32_t result, const std::string reason)
|
||||||
{
|
{
|
||||||
if (cmd == nullptr) {
|
if (cmd == nullptr) {
|
||||||
|
@ -177,11 +177,12 @@ int32_t DSchedContinueStartCmd::Unmarshal(const std::string &jsonStr)
|
|||||||
direction_ = direction->valueint;
|
direction_ = direction->valueint;
|
||||||
|
|
||||||
cJSON *appVersion = cJSON_GetObjectItemCaseSensitive(rootValue, "AppVersion");
|
cJSON *appVersion = cJSON_GetObjectItemCaseSensitive(rootValue, "AppVersion");
|
||||||
if (appVersion == nullptr || !cJSON_IsNumber(appVersion)) {
|
if (appVersion == nullptr || !cJSON_IsNumber(appVersion) || appVersion->valueint < 0 ||
|
||||||
|
appVersion->valueint > UINT32_MAX) {
|
||||||
cJSON_Delete(rootValue);
|
cJSON_Delete(rootValue);
|
||||||
return INVALID_PARAMETERS_ERR;
|
return INVALID_PARAMETERS_ERR;
|
||||||
}
|
}
|
||||||
appVersion_ = appVersion->valueint;
|
appVersion_ = static_cast<uint32_t>(appVersion->valueint);
|
||||||
|
|
||||||
cJSON *wantParams = cJSON_GetObjectItemCaseSensitive(rootValue, "WantParams");
|
cJSON *wantParams = cJSON_GetObjectItemCaseSensitive(rootValue, "WantParams");
|
||||||
if (wantParams == nullptr || !cJSON_IsString(wantParams) || (wantParams->valuestring == nullptr)) {
|
if (wantParams == nullptr || !cJSON_IsString(wantParams) || (wantParams->valuestring == nullptr)) {
|
||||||
@ -653,10 +654,10 @@ int32_t DSchedContinueReplyCmd::Unmarshal(const std::string &jsonStr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *numKeys[] = {
|
const char *numKeys[] = {
|
||||||
"ReplyCmd", "AppVersion", "Result"
|
"ReplyCmd", "Result"
|
||||||
};
|
};
|
||||||
int32_t *numValues[] = {
|
int32_t *numValues[] = {
|
||||||
&replyCmd_, &appVersion_, &result_
|
&replyCmd_, &result_
|
||||||
};
|
};
|
||||||
int32_t numLength = sizeof(numKeys) / sizeof(numKeys[0]);
|
int32_t numLength = sizeof(numKeys) / sizeof(numKeys[0]);
|
||||||
for (int32_t i = 0; i < numLength; i++) {
|
for (int32_t i = 0; i < numLength; i++) {
|
||||||
@ -668,6 +669,14 @@ int32_t DSchedContinueReplyCmd::Unmarshal(const std::string &jsonStr)
|
|||||||
*numValues[i] = item->valueint;
|
*numValues[i] = item->valueint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cJSON *appVersion = cJSON_GetObjectItemCaseSensitive(rootValue, "AppVersion");
|
||||||
|
if (appVersion == nullptr || !cJSON_IsNumber(appVersion) || appVersion->valueint < 0 ||
|
||||||
|
appVersion->valueint > UINT32_MAX) {
|
||||||
|
cJSON_Delete(rootValue);
|
||||||
|
return INVALID_PARAMETERS_ERR;
|
||||||
|
}
|
||||||
|
appVersion_ = static_cast<uint32_t>(appVersion->valueint);
|
||||||
|
|
||||||
cJSON *reason = cJSON_GetObjectItemCaseSensitive(rootValue, "Reason");
|
cJSON *reason = cJSON_GetObjectItemCaseSensitive(rootValue, "Reason");
|
||||||
if (reason == nullptr || !cJSON_IsString(reason) || (reason->valuestring == nullptr)) {
|
if (reason == nullptr || !cJSON_IsString(reason) || (reason->valuestring == nullptr)) {
|
||||||
cJSON_Delete(rootValue);
|
cJSON_Delete(rootValue);
|
||||||
|
@ -86,7 +86,7 @@ int32_t DSchedContinueSourceStartState::DoContinueAbilityTask(std::shared_ptr<DS
|
|||||||
HILOGE("dContinue or event is null");
|
HILOGE("dContinue or event is null");
|
||||||
return INVALID_PARAMETERS_ERR;
|
return INVALID_PARAMETERS_ERR;
|
||||||
}
|
}
|
||||||
auto syncContinueData = event->GetSharedObject<int32_t>();
|
auto syncContinueData = event->GetSharedObject<uint32_t>();
|
||||||
int32_t ret = dContinue->ExecuteContinueAbility(*syncContinueData);
|
int32_t ret = dContinue->ExecuteContinueAbility(*syncContinueData);
|
||||||
if (ret != ERR_OK) {
|
if (ret != ERR_OK) {
|
||||||
HILOGE("DSchedContinueSourceStartState ExecuteContinueAbility failed, ret: %{public}d", ret);
|
HILOGE("DSchedContinueSourceStartState ExecuteContinueAbility failed, ret: %{public}d", ret);
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
#include "dfx/distributed_radar.h"
|
#include "dfx/distributed_radar.h"
|
||||||
|
|
||||||
|
#include "bundle/bundle_manager_internal.h"
|
||||||
|
#include "dtbschedmgr_device_info_storage.h"
|
||||||
#include "hisysevent.h"
|
#include "hisysevent.h"
|
||||||
|
|
||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
@ -728,13 +730,17 @@ bool DmsRadar::NotifyDockUnfocused(const std::string& func, int32_t errCode)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DmsRadar::ClickIconDmsContinue(const std::string& func, int32_t errCode, std::string peerUdid,
|
bool DmsRadar::ClickIconDmsContinue(const std::string& func, int32_t errCode, std::string peerDeviceId,
|
||||||
const std::string& srcBundleName, const std::string& dstBundleName)
|
const std::string& srcBundleName, const std::string& dstBundleName)
|
||||||
{
|
{
|
||||||
if (peerUdid.empty()) {
|
std::string peerUdid = DtbschedmgrDeviceInfoStorage::GetInstance().GetUdidByNetworkId(peerDeviceId);
|
||||||
HILOGE("peerUdid is empty.");
|
|
||||||
return false;
|
DmsBundleInfo srcBundleInfo;
|
||||||
}
|
DmsBmStorage::GetInstance()->GetStorageDistributeInfo(peerDeviceId, srcBundleName, srcBundleInfo);
|
||||||
|
|
||||||
|
AppExecFwk::BundleInfo dstBundleInfo;
|
||||||
|
BundleManagerInternal::GetLocalBundleInfoV9(dstBundleName, dstBundleInfo);
|
||||||
|
|
||||||
int32_t res = ERR_OK;
|
int32_t res = ERR_OK;
|
||||||
StageRes stageRes = (errCode == ERR_OK) ? StageRes::STAGE_SUCC : StageRes::STAGE_FAIL;
|
StageRes stageRes = (errCode == ERR_OK) ? StageRes::STAGE_SUCC : StageRes::STAGE_FAIL;
|
||||||
if (stageRes == StageRes::STAGE_SUCC) {
|
if (stageRes == StageRes::STAGE_SUCC) {
|
||||||
@ -749,7 +755,9 @@ bool DmsRadar::ClickIconDmsContinue(const std::string& func, int32_t errCode, st
|
|||||||
STAGE_RES, static_cast<int32_t>(StageRes::STAGE_SUCC),
|
STAGE_RES, static_cast<int32_t>(StageRes::STAGE_SUCC),
|
||||||
PEER_UDID, GetAnonyUdid(peerUdid),
|
PEER_UDID, GetAnonyUdid(peerUdid),
|
||||||
APP_CALLEE, srcBundleName,
|
APP_CALLEE, srcBundleName,
|
||||||
APP_CALLER, dstBundleName);
|
APP_CALLER, dstBundleName,
|
||||||
|
LOCAL_APP_VERSION, srcBundleInfo.versionName,
|
||||||
|
PEER_APP_VERSION, dstBundleInfo.versionName);
|
||||||
} else {
|
} else {
|
||||||
res = HiSysEventWrite(
|
res = HiSysEventWrite(
|
||||||
APP_CONTINUE_DOMAIN,
|
APP_CONTINUE_DOMAIN,
|
||||||
@ -763,6 +771,8 @@ bool DmsRadar::ClickIconDmsContinue(const std::string& func, int32_t errCode, st
|
|||||||
PEER_UDID, GetAnonyUdid(peerUdid),
|
PEER_UDID, GetAnonyUdid(peerUdid),
|
||||||
APP_CALLEE, srcBundleName,
|
APP_CALLEE, srcBundleName,
|
||||||
APP_CALLER, dstBundleName,
|
APP_CALLER, dstBundleName,
|
||||||
|
LOCAL_APP_VERSION, srcBundleInfo.versionName,
|
||||||
|
PEER_APP_VERSION, dstBundleInfo.versionName,
|
||||||
ERROR_CODE, errCode);
|
ERROR_CODE, errCode);
|
||||||
}
|
}
|
||||||
if (res != ERR_OK) {
|
if (res != ERR_OK) {
|
||||||
|
@ -103,7 +103,7 @@ HWTEST_F(DSchedContinueTest, DSchedContinueTest_002_1, TestSize.Level0)
|
|||||||
int32_t subType = CONTINUE_PULL;
|
int32_t subType = CONTINUE_PULL;
|
||||||
int32_t direction = CONTINUE_SINK;
|
int32_t direction = CONTINUE_SINK;
|
||||||
sptr<IRemoteObject> callback = nullptr;
|
sptr<IRemoteObject> callback = nullptr;
|
||||||
int32_t appVersion = 0;
|
uint32_t appVersion = 0;
|
||||||
auto info = DSchedContinueInfo(deviceId, bundleName, deviceId, bundleName, "");
|
auto info = DSchedContinueInfo(deviceId, bundleName, deviceId, bundleName, "");
|
||||||
auto conti = std::make_shared<DSchedContinue>(subType, direction, callback, info);
|
auto conti = std::make_shared<DSchedContinue>(subType, direction, callback, info);
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ HWTEST_F(DSchedContinueTest, DSchedContinueTest_0010_1, TestSize.Level0)
|
|||||||
auto conti = std::make_shared<DSchedContinue>(subType, direction, callback, info);
|
auto conti = std::make_shared<DSchedContinue>(subType, direction, callback, info);
|
||||||
conti->Init();
|
conti->Init();
|
||||||
|
|
||||||
int32_t appVersion = 0;
|
uint32_t appVersion = 0;
|
||||||
int32_t ret = conti->ExecuteContinueAbility(appVersion);
|
int32_t ret = conti->ExecuteContinueAbility(appVersion);
|
||||||
EXPECT_NE(ret, ERR_OK);
|
EXPECT_NE(ret, ERR_OK);
|
||||||
DTEST_LOG << "DSchedContinueTest DSchedContinueTest_0010_1 end ret:" << ret << std::endl;
|
DTEST_LOG << "DSchedContinueTest DSchedContinueTest_0010_1 end ret:" << ret << std::endl;
|
||||||
@ -644,7 +644,7 @@ HWTEST_F(DSchedContinueTest, DSchedContinueTest_0019_1, TestSize.Level0)
|
|||||||
|
|
||||||
auto cmd = std::make_shared<DSchedContinueReplyCmd>();
|
auto cmd = std::make_shared<DSchedContinueReplyCmd>();
|
||||||
int32_t replyCmd = 0;
|
int32_t replyCmd = 0;
|
||||||
int32_t appVersion = 0;
|
uint32_t appVersion = 0;
|
||||||
int32_t result = 0;
|
int32_t result = 0;
|
||||||
|
|
||||||
int32_t ret = conti->PackReplyCmd(cmd, replyCmd, appVersion, result, "");
|
int32_t ret = conti->PackReplyCmd(cmd, replyCmd, appVersion, result, "");
|
||||||
|
@ -667,7 +667,7 @@ HWTEST_F(DistributedRadarTest, NormalFocusedGetAccessTokenIdRes_001, TestSize.Le
|
|||||||
DTEST_LOG << "DistributedRadarTest NormalFocusedGetAccessTokenIdRes_001 begin" << std::endl;
|
DTEST_LOG << "DistributedRadarTest NormalFocusedGetAccessTokenIdRes_001 begin" << std::endl;
|
||||||
bool ret = DmsRadar::GetInstance().NormalFocusedGetAccessTokenIdRes(FUNC, ERR_NO);
|
bool ret = DmsRadar::GetInstance().NormalFocusedGetAccessTokenIdRes(FUNC, ERR_NO);
|
||||||
EXPECT_EQ(ret, true);
|
EXPECT_EQ(ret, true);
|
||||||
|
|
||||||
ret = DmsRadar::GetInstance().NormalFocusedGetAccessTokenIdRes(FUNC, ERR_OK);
|
ret = DmsRadar::GetInstance().NormalFocusedGetAccessTokenIdRes(FUNC, ERR_OK);
|
||||||
EXPECT_EQ(ret, true);
|
EXPECT_EQ(ret, true);
|
||||||
DTEST_LOG << "DistributedRadarTest NormalFocusedGetAccessTokenIdRes_001 end" << std::endl;
|
DTEST_LOG << "DistributedRadarTest NormalFocusedGetAccessTokenIdRes_001 end" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user