mirror of
https://github.com/openharmony/distributedschedule_samgr.git
synced 2026-07-19 19:33:38 -04:00
IssueNo:#I5GPXF:【免安装】【跨设备】callingBundleNames和callingAppIds需要dms传到对端设备
Description:修复callingBundleNames和callingAppIds需要dms传到对端设备问题 Sig:SIG_ApplicaitonFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: dy <dingyao5@huawei.com>
This commit is contained in:
@@ -35,6 +35,7 @@ const std::string TAG = "DistributedSchedProxy";
|
||||
const std::u16string DMS_PROXY_INTERFACE_TOKEN = u"ohos.distributedschedule.accessToken";
|
||||
const std::string EXTRO_INFO_JSON_KEY_ACCESS_TOKEN = "accessTokenID";
|
||||
const std::string EXTRO_INFO_JSON_KEY_REQUEST_CODE = "requestCode";
|
||||
const std::string FREE_INSTLL_CALLING_BUNDLENAMES = "freeInstallCallingBundleNames";
|
||||
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
||||
constexpr int32_t WAIT_TIME = 15;
|
||||
#endif
|
||||
@@ -735,6 +736,7 @@ int32_t DistributedSchedProxy::StartFreeInstallFromRemote(const FreeInstallInfo&
|
||||
PARCEL_WRITE_HELPER(data, String, info.callerInfo.callerAppId);
|
||||
PARCEL_WRITE_HELPER(data, Int64, taskId);
|
||||
OHOS::AAFwk::Want cmpWant;
|
||||
cmpWant.SetParam(FREE_INSTLL_CALLING_BUNDLENAMES, info.callerInfo.bundleNames);
|
||||
PARCEL_WRITE_HELPER(data, Parcelable, &cmpWant);
|
||||
nlohmann::json extraInfoJson;
|
||||
extraInfoJson[EXTRO_INFO_JSON_KEY_ACCESS_TOKEN] = info.callerInfo.accessToken;
|
||||
|
||||
@@ -49,6 +49,8 @@ const std::u16string DMS_STUB_INTERFACE_TOKEN = u"ohos.distributedschedule.acces
|
||||
const std::string EXTRO_INFO_JSON_KEY_ACCESS_TOKEN = "accessTokenID";
|
||||
const std::string EXTRO_INFO_JSON_KEY_REQUEST_CODE = "requestCode";
|
||||
const std::string PERMISSION_DISTRIBUTED_DATASYNC = "ohos.permission.DISTRIBUTED_DATASYNC";
|
||||
const std::string FREE_INSTLL_CALLING_APP_ID = "freeInstallCallingAppId";
|
||||
const std::string FREE_INSTLL_CALLING_BUNDLENAMES = "freeInstallCallingBundleNames";
|
||||
const int DEFAULT_REQUEST_CODE = -1;
|
||||
}
|
||||
|
||||
@@ -957,11 +959,10 @@ int32_t DistributedSchedStub::StartFreeInstallFromRemoteInner(MessageParcel& dat
|
||||
}
|
||||
|
||||
FreeInstallInfo info = {
|
||||
.want = *want,
|
||||
.callerInfo = callerInfo,
|
||||
.accountInfo = accountInfo,
|
||||
.requestCode = requestCode
|
||||
};
|
||||
.want = *want, .callerInfo = callerInfo, .accountInfo = accountInfo, .requestCode = requestCode};
|
||||
info.want.SetParam(FREE_INSTLL_CALLING_APP_ID, callerInfo.callerAppId);
|
||||
info.want.SetParam(
|
||||
FREE_INSTLL_CALLING_BUNDLENAMES, (*cmpWant).GetStringArrayParam(FREE_INSTLL_CALLING_BUNDLENAMES));
|
||||
int32_t result = StartFreeInstallFromRemote(info, taskId);
|
||||
HILOGI("result = %{public}d", result);
|
||||
PARCEL_WRITE_HELPER(reply, Int32, result);
|
||||
|
||||
Reference in New Issue
Block a user