diff --git a/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_proxy.cpp index 71711f25bb035d29819ec03c7ecda6f7d35e34fb..356566511dd1e6d872e4d11a15fbf76e97decbd4 100644 --- a/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_proxy.cpp @@ -209,7 +209,7 @@ ErrCode AppControlProxy::DeleteAppRunningControlRule(int32_t userId) ErrCode AppControlProxy::GetAppRunningControlRule(int32_t userId, std::vector &appIds) { - LOG_D(BMS_TAG_DEFAULT, "begin to call GetAppInstallControlRule"); + LOG_D(BMS_TAG_DEFAULT, "begin to call GetAppRunningControlRule"); MessageParcel data; if (!data.WriteInterfaceToken(GetDescriptor())) { LOG_E(BMS_TAG_DEFAULT, "WriteInterfaceToken failed"); @@ -232,7 +232,7 @@ ErrCode AppControlProxy::GetAppRunningControlRule( return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteString(bundleName)) { - LOG_E(BMS_TAG_DEFAULT, "fail to GetMediaData due to write bundleName fail"); + LOG_E(BMS_TAG_DEFAULT, "write bundleName fail"); return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { @@ -274,7 +274,7 @@ ErrCode AppControlProxy::ConfirmAppJumpControlRule(const std::string &callerBund ErrCode AppControlProxy::AddAppJumpControlRule(const std::vector &controlRules, int32_t userId) { if (controlRules.empty()) { - LOG_E(BMS_TAG_DEFAULT, "DeleteAppJumpControlRule failed due to params error"); + LOG_E(BMS_TAG_DEFAULT, "AddAppJumpControlRule failed due to params error"); return ERR_BUNDLE_MANAGER_INVALID_PARAMETER; } MessageParcel data; @@ -362,11 +362,11 @@ ErrCode AppControlProxy::GetAppJumpControlRule(const std::string &callerBundleNa return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteString(callerBundleName)) { - LOG_E(BMS_TAG_DEFAULT, "fail to write callerBundleName fail"); + LOG_E(BMS_TAG_DEFAULT, "fail to write callerBundleName"); return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteString(targetBundleName)) { - LOG_E(BMS_TAG_DEFAULT, "fail to write targetBundleName fail"); + LOG_E(BMS_TAG_DEFAULT, "fail to write targetBundleName"); return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { @@ -451,7 +451,7 @@ ErrCode AppControlProxy::GetDisposedStatus(const std::string &appId, Want &want, return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteString(appId)) { - LOG_E(BMS_TAG_DEFAULT, "write bundleName failed"); + LOG_E(BMS_TAG_DEFAULT, "write appId failed"); return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { diff --git a/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_proxy.cpp index 50481462f83a025b4d0d444703801564d6a4201a..dc75e6b10bf963a2805b7fe5cae1966f6d2b7897 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_proxy.cpp @@ -82,7 +82,7 @@ ErrCode BundleResourceProxy::GetBundleResourceInfo(const std::string &bundleName return ERR_APPEXECFWK_PARCEL_ERROR; } if (!data.WriteInt32(appIndex)) { - APP_LOGE("fail to write flags"); + APP_LOGE("fail to write appIndex"); return ERR_APPEXECFWK_PARCEL_ERROR; } return GetParcelInfo( diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_installer_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_installer_proxy.cpp index 1875578ba4c5d4c5e27c4e046f72878d85dd99d5..3f8c3f08813bad6b066fa17a7e402636749e737c 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_installer_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_installer_proxy.cpp @@ -213,7 +213,7 @@ ErrCode BundleInstallerProxy::InstallSandboxApp(const std::string &bundleName, i return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(dlpType)) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallSandboxApp due to write appIndex fail"); + LOG_E(BMS_TAG_INSTALLER, "failed to InstallSandboxApp due to write dlpType fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { @@ -243,19 +243,19 @@ ErrCode BundleInstallerProxy::UninstallSandboxApp(const std::string &bundleName, MessageOption option(MessageOption::TF_SYNC); if (!data.WriteInterfaceToken(GetDescriptor())) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallSandboxApp due to write MessageParcel fail"); + LOG_E(BMS_TAG_INSTALLER, "failed to UninstallSandboxApp due to write MessageParcel fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteString16(Str8ToStr16(bundleName))) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallSandboxApp due to write bundleName fail"); + LOG_E(BMS_TAG_INSTALLER, "failed to UninstallSandboxApp due to write bundleName fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(appIndex)) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallSandboxApp due to write appIndex fail"); + LOG_E(BMS_TAG_INSTALLER, "failed to UninstallSandboxApp due to write appIndex fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallSandboxApp due to write userId fail"); + LOG_E(BMS_TAG_INSTALLER, "failed to UninstallSandboxApp due to write userId fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp index 560b0fa845ec8ef77bc6f792bf5f938519ce0907..18488f84c9c77a3316e13d0c624c0d3192dc9d86 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp @@ -36,7 +36,6 @@ namespace OHOS { namespace AppExecFwk { namespace { -const int16_t LIMIT_PARCEL_SIZE = 1024; const int32_t MAX_LIMIT_SIZE = 100; const int8_t ASHMEM_LEN = 16; constexpr size_t MAX_PARCEL_CAPACITY = 100 * 1024 * 1024; // 100M @@ -51,19 +50,6 @@ constexpr size_t MAX_PARCEL_CAPACITY_OF_ASHMEM = 1024 * 1024 * 1024; // max allo constexpr size_t MAX_IPC_REWDATA_SIZE = 120 * 1024 * 1024; // max ipc size 120MB const std::string BUNDLE_MANAGER_ASHMEM_NAME = "bundleManagerAshemeName"; -void SplitString(const std::string &source, std::vector &strings) -{ - int splitSize = (source.size() / LIMIT_PARCEL_SIZE); - if ((source.size() % LIMIT_PARCEL_SIZE) != 0) { - splitSize++; - } - APP_LOGD("the dump string split into %{public}d size", splitSize); - for (int i = 0; i < splitSize; i++) { - int32_t start = LIMIT_PARCEL_SIZE * i; - strings.emplace_back(source.substr(start, LIMIT_PARCEL_SIZE)); - } -} - bool GetData(void *&buffer, size_t size, const void *data) { if (data == nullptr) { diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_mini_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_mini_proxy.cpp index 3c4e4bc279d3fe8e2de251e4a6626bced4a95e4b..99169b506a9ee6d9a92d2bcf3dd90c3a349c48be 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_mini_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_mini_proxy.cpp @@ -120,7 +120,7 @@ int32_t BundleMgrMiniProxy::GetUidByBundleName(const std::string &bundleName, co return Constants::INVALID_UID; } if (!data.WriteInt32(appIndex)) { - APP_LOGE("failed to GetUidByBundleName due to write uid fail"); + APP_LOGE("failed to GetUidByBundleName due to write appIndex fail"); return Constants::INVALID_UID; } diff --git a/interfaces/inner_api/appexecfwk_core/src/overlay/overlay_manager_host.cpp b/interfaces/inner_api/appexecfwk_core/src/overlay/overlay_manager_host.cpp index a2fa33663be08ce177da33cbc23f9bccb393f596..aea19ef750b13e7245060af44c95fd9f49bdfed1 100644 --- a/interfaces/inner_api/appexecfwk_core/src/overlay/overlay_manager_host.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/overlay/overlay_manager_host.cpp @@ -42,7 +42,7 @@ int OverlayManagerHost::OnRemoteRequest(uint32_t code, MessageParcel& data, std::u16string descriptor = OverlayManagerHost::GetDescriptor(); std::u16string remoteDescriptor = data.ReadInterfaceToken(); if (descriptor != remoteDescriptor) { - APP_LOGE("fail to write reply message in bundle mgr host due to the reply is nullptr"); + APP_LOGE("descriptor invalid"); return OBJECT_NULL; } diff --git a/services/bundlemgr/src/distributed_manager/bundle_distributed_manager.cpp b/services/bundlemgr/src/distributed_manager/bundle_distributed_manager.cpp index 68be4abb0e6cc86328334df29600c79d5e2f32e0..33043129314898571e00b54ee4ace650d1deafa6 100644 --- a/services/bundlemgr/src/distributed_manager/bundle_distributed_manager.cpp +++ b/services/bundlemgr/src/distributed_manager/bundle_distributed_manager.cpp @@ -95,7 +95,7 @@ int32_t BundleDistributedManager::ComparePcIdString(const Want &want, const RpcI } std::string capabilities = jsonObject[CHARACTER_PRIVATE_SYSCAP]; if (capabilities.empty()) { - pcId.resize(pcId.length() - 1); + pcId.resize(pcId.empty() ? pcId.length() : (pcId.length() - 1)); } else { pcId = pcId + capabilities; }