mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 14:30:21 +00:00
IssueNo:#I5IHCD:统一免安装在want中设置的常量命名:统一免安装在want中设置的常量命名
Description:统一免安装在want中设置的常量命名 Sig:SIG_ApplicaitonFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: dy <dingyao5@huawei.com>
This commit is contained in:
parent
667d1a9af4
commit
91b16ebed0
@ -35,7 +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";
|
||||
const std::string CMPT_PARAM_FREEINSTALL_BUNDLENAMES = "ohos.extra.param.key.allowedBundles";
|
||||
#ifdef SUPPORT_DISTRIBUTED_MISSION_MANAGER
|
||||
constexpr int32_t WAIT_TIME = 15;
|
||||
#endif
|
||||
@ -736,7 +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);
|
||||
cmpWant.SetParam(CMPT_PARAM_FREEINSTALL_BUNDLENAMES, info.callerInfo.bundleNames);
|
||||
PARCEL_WRITE_HELPER(data, Parcelable, &cmpWant);
|
||||
nlohmann::json extraInfoJson;
|
||||
extraInfoJson[EXTRO_INFO_JSON_KEY_ACCESS_TOKEN] = info.callerInfo.accessToken;
|
||||
|
@ -49,8 +49,9 @@ 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 std::string PARAM_FREEINSTALL_APPID = "ohos.freeinstall.params.callingAppId";
|
||||
const std::string PARAM_FREEINSTALL_BUNDLENAMES = "ohos.freeinstall.params.callingBundleNames";
|
||||
const std::string CMPT_PARAM_FREEINSTALL_BUNDLENAMES = "ohos.extra.param.key.allowedBundles";
|
||||
const int DEFAULT_REQUEST_CODE = -1;
|
||||
}
|
||||
|
||||
@ -960,9 +961,9 @@ int32_t DistributedSchedStub::StartFreeInstallFromRemoteInner(MessageParcel& dat
|
||||
|
||||
FreeInstallInfo info = {
|
||||
.want = *want, .callerInfo = callerInfo, .accountInfo = accountInfo, .requestCode = requestCode};
|
||||
info.want.SetParam(FREE_INSTLL_CALLING_APP_ID, callerInfo.callerAppId);
|
||||
info.want.SetParam(PARAM_FREEINSTALL_APPID, callerInfo.callerAppId);
|
||||
info.want.SetParam(
|
||||
FREE_INSTLL_CALLING_BUNDLENAMES, (*cmpWant).GetStringArrayParam(FREE_INSTLL_CALLING_BUNDLENAMES));
|
||||
PARAM_FREEINSTALL_BUNDLENAMES, (*cmpWant).GetStringArrayParam(CMPT_PARAM_FREEINSTALL_BUNDLENAMES));
|
||||
int32_t result = StartFreeInstallFromRemote(info, taskId);
|
||||
HILOGI("result = %{public}d", result);
|
||||
PARCEL_WRITE_HELPER(reply, Int32, result);
|
||||
|
Loading…
Reference in New Issue
Block a user