mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 12:43:16 -04:00
add ipc option for image start
Signed-off-by: AsukaSoryu <gongyuechen@huawei.com>
This commit is contained in:
@@ -48,7 +48,7 @@ void AppMgrProxy::AttachApplication(const sptr<IRemoteObject> &obj)
|
||||
{
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
MessageOption option(MessageOption::TF_SYNC | MessageOption::TF_IMAGE);
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
return;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void AppMgrProxy::PreloadModuleFinished(const int32_t recordId)
|
||||
TAG_LOGD(AAFwkTag::APPMGR, "PreloadModuleFinished called");
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_ASYNC);
|
||||
MessageOption option(MessageOption::TF_ASYNC | MessageOption::TF_IMAGE);
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "PreloadModuleFinished write interface token failed");
|
||||
return;
|
||||
@@ -270,11 +270,13 @@ int32_t AppMgrProxy::GetAllRunningProcesses(std::vector<RunningProcessInfo> &inf
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_SYNC);
|
||||
MessageOption option(MessageOption::TF_SYNC | MessageOption::TF_IMAGE);
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
return ERR_FLATTEN_OBJECT;
|
||||
}
|
||||
if (!SendTransactCmd(AppMgrInterfaceCode::APP_GET_ALL_RUNNING_PROCESSES, data, reply)) {
|
||||
int32_t result = SendRequest(AppMgrInterfaceCode::APP_GET_ALL_RUNNING_PROCESSES, data, reply, option);
|
||||
if (result != NO_ERROR) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "receive error transact code %{public}d in transact cmd", result);
|
||||
return ERR_NULL_OBJECT;
|
||||
}
|
||||
auto error = GetParcelableInfos<RunningProcessInfo>(reply, info);
|
||||
@@ -282,7 +284,7 @@ int32_t AppMgrProxy::GetAllRunningProcesses(std::vector<RunningProcessInfo> &inf
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "GetParcelableInfos fail, error: %{public}d", error);
|
||||
return error;
|
||||
}
|
||||
int result = reply.ReadInt32();
|
||||
result = reply.ReadInt32();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -476,11 +478,14 @@ int32_t AppMgrProxy::GetProcessRunningInformation(RunningProcessInfo &info)
|
||||
{
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option(MessageOption::TF_SYNC | MessageOption::TF_IMAGE);
|
||||
|
||||
if (!WriteInterfaceToken(data)) {
|
||||
return ERR_FLATTEN_OBJECT;
|
||||
}
|
||||
if (!SendTransactCmd(AppMgrInterfaceCode::APP_GET_PROCESS_RUNNING_INFORMATION, data, reply)) {
|
||||
int32_t result = SendRequest(AppMgrInterfaceCode::APP_GET_PROCESS_RUNNING_INFORMATION, data, reply, option);
|
||||
if (result != NO_ERROR) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "receive error transact code %{public}d in transact cmd", result);
|
||||
return ERR_NULL_OBJECT;
|
||||
}
|
||||
std::unique_ptr<RunningProcessInfo> infoReply(reply.ReadParcelable<RunningProcessInfo>());
|
||||
@@ -2387,7 +2392,7 @@ int32_t AppMgrProxy::SetSupportedProcessCacheSelf(bool isSupport)
|
||||
PARCEL_UTIL_WRITE_RET_INT(data, Bool, isSupport);
|
||||
|
||||
MessageParcel reply;
|
||||
MessageOption option;
|
||||
MessageOption option(MessageOption::TF_IMAGE);
|
||||
|
||||
PARCEL_UTIL_SENDREQ_RET_INT(AppMgrInterfaceCode::SET_SUPPORTED_PROCESS_CACHE_SELF, data, reply, option);
|
||||
return reply.ReadInt32();
|
||||
|
||||
Reference in New Issue
Block a user