From 18fdab18766c99df916719a3adb0b080276770fa Mon Sep 17 00:00:00 2001 From: sunjiakun Date: Thu, 5 Dec 2024 10:34:52 +0800 Subject: [PATCH] fixLog_1205 Signed-off-by: sunjiakun --- common/utils/src/bundle_file_util.cpp | 2 +- .../appexecfwk_base/src/ability_info.cpp | 12 +-- .../appexecfwk_base/src/application_info.cpp | 30 +++---- .../appexecfwk_base/src/bundle_info.cpp | 18 ++-- .../appexecfwk_base/src/bundle_pack_info.cpp | 30 +++---- .../appexecfwk_base/src/bundle_user_info.cpp | 8 +- .../src/code_protect_bundle_info.cpp | 2 +- .../src/compatible_ability_info.cpp | 10 +-- .../src/compatible_application_info.cpp | 4 +- .../src/distributed_ability_info.cpp | 10 +-- .../src/distributed_bundle_info.cpp | 4 +- .../src/distributed_manager/rpc_id_result.cpp | 2 +- .../src/distributed_module_info.cpp | 6 +- .../src/extension_ability_info.cpp | 10 +-- .../appexecfwk_base/src/form_info.cpp | 2 +- .../src/free_install/install_result.cpp | 6 +- .../src/free_install/target_ability_info.cpp | 6 +- .../appexecfwk_base/src/hap_module_info.cpp | 24 +++--- .../src/overlay/overlay_bundle_info.cpp | 2 +- .../src/overlay/overlay_module_info.cpp | 2 +- .../src/preinstalled_application_info.cpp | 4 +- .../src/quick_fix/app_quick_fix.cpp | 6 +- .../src/quick_fix/appqf_info.cpp | 4 +- .../src/quick_fix/hqf_info.cpp | 2 +- .../src/remote_ability_info.cpp | 2 +- .../src/shared/shared_bundle_info.cpp | 2 +- .../inner_api/appexecfwk_base/src/skill.cpp | 6 +- .../src/app_control/app_control_host.cpp | 24 +++--- .../bundle_resource/bundle_resource_host.cpp | 4 +- .../bundle_resource/bundle_resource_proxy.cpp | 18 ++-- .../bundlemgr/bundle_event_callback_proxy.cpp | 2 +- .../src/bundlemgr/bundle_installer_proxy.cpp | 86 +++++++++---------- .../src/bundlemgr/bundle_mgr_client.cpp | 32 +++---- 33 files changed, 191 insertions(+), 191 deletions(-) diff --git a/common/utils/src/bundle_file_util.cpp b/common/utils/src/bundle_file_util.cpp index c0326e889d..dd6f8f0db8 100644 --- a/common/utils/src/bundle_file_util.cpp +++ b/common/utils/src/bundle_file_util.cpp @@ -135,7 +135,7 @@ bool BundleFileUtil::CheckFileType(const std::string &fileName, const std::strin bool BundleFileUtil::CheckFileName(const std::string &fileName) { if (fileName.empty()) { - APP_LOGE("the file name is empty"); + APP_LOGE("fileName empty"); return false; } if (fileName.size() > PATH_MAX_SIZE) { diff --git a/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp index cbdfd05dbf..c912905938 100644 --- a/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp @@ -161,7 +161,7 @@ bool AbilityInfo::ReadFromParcel(Parcel &parcel) std::unique_ptr appInfo(parcel.ReadParcelable()); if (!appInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read appInfo failed"); return false; } applicationInfo = *appInfo; @@ -215,7 +215,7 @@ bool AbilityInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < metadataSize; i++) { std::unique_ptr metadataPtr(parcel.ReadParcelable()); if (!metadataPtr) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read metadata failed"); return false; } metadata.emplace_back(*metadataPtr); @@ -508,12 +508,12 @@ void AbilityInfo::Dump(std::string prefix, int fd) { APP_LOGI("call Dump"); if (fd < 0) { - APP_LOGE("dump Abilityinfo fd error"); + APP_LOGE("dump fd error"); return; } int flags = fcntl(fd, F_GETFL); if (flags < 0) { - APP_LOGE("dump Abilityinfo fcntl error : %{public}d", errno); + APP_LOGE("dump fcntl error : %{public}d", errno); return; } uint uflags = static_cast(flags); @@ -525,7 +525,7 @@ void AbilityInfo::Dump(std::string prefix, int fd) result.append(jsonObject.dump(Constants::DUMP_INDENT)); int ret = TEMP_FAILURE_RETRY(write(fd, result.c_str(), result.size())); if (ret < 0) { - APP_LOGE("dump Abilityinfo write error : %{public}d", errno); + APP_LOGE("dump write error : %{public}d", errno); } } return; @@ -1274,7 +1274,7 @@ void from_json(const nlohmann::json &jsonObject, AbilityInfo &abilityInfo) void AbilityInfo::ConvertToCompatiableAbilityInfo(CompatibleAbilityInfo& compatibleAbilityInfo) const { - APP_LOGE("AbilityInfo::ConvertToCompatiableAbilityInfo called"); + APP_LOGI("begin"); compatibleAbilityInfo.package = package; compatibleAbilityInfo.name = name; compatibleAbilityInfo.label = label; diff --git a/interfaces/inner_api/appexecfwk_base/src/application_info.cpp b/interfaces/inner_api/appexecfwk_base/src/application_info.cpp index 6ec610ab86..d3d1a002b8 100644 --- a/interfaces/inner_api/appexecfwk_base/src/application_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/application_info.cpp @@ -296,7 +296,7 @@ bool ApplicationInfo::ReadMetaDataFromParcel(Parcel &parcel) for (int32_t j = 0; j < customizeDataSize; j++) { std::unique_ptr customizeData(parcel.ReadParcelable()); if (!customizeData) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read customizeData failed"); return false; } metaData[moduleName].emplace_back(*customizeData); @@ -374,7 +374,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) iconId = parcel.ReadUint32(); std::unique_ptr iconResourcePtr(parcel.ReadParcelable()); if (!iconResourcePtr) { - APP_LOGE("icon ReadParcelable failed"); + APP_LOGE("icon read resource failed"); return false; } iconResource = *iconResourcePtr; @@ -383,7 +383,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) labelId = parcel.ReadUint32(); std::unique_ptr labelResourcePtr(parcel.ReadParcelable()); if (!labelResourcePtr) { - APP_LOGE("label ReadParcelable failed"); + APP_LOGE("label read resource failed"); return false; } labelResource = *labelResourcePtr; @@ -392,7 +392,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) descriptionId = parcel.ReadUint32(); std::unique_ptr descriptionResourcePtr(parcel.ReadParcelable()); if (!descriptionResourcePtr) { - APP_LOGE("description ReadParcelable failed"); + APP_LOGE("description read resource failed"); return false; } descriptionResource = *descriptionResourcePtr; @@ -464,7 +464,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < moduleInfosSize; i++) { std::unique_ptr moduleInfo(parcel.ReadParcelable()); if (!moduleInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read moduleInfo failed"); return false; } moduleInfos.emplace_back(*moduleInfo); @@ -480,7 +480,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) for (int n = 0; n < hnpSize; ++n) { std::unique_ptr hnp(parcel.ReadParcelable()); if (!hnp) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read hnpPackage failed"); return false; } hnpPackages[key].emplace_back(*hnp); @@ -497,7 +497,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) for (int n = 0; n < customizeDataSize; ++n) { std::unique_ptr customizeData(parcel.ReadParcelable()); if (!customizeData) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read customizeData failed"); return false; } metaData[key].emplace_back(*customizeData); @@ -514,7 +514,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) for (int n = 0; n < metaSize; ++n) { std::unique_ptr meta(parcel.ReadParcelable()); if (!meta) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read metadata failed"); return false; } metadata[key].emplace_back(*meta); @@ -537,7 +537,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) multiProjects = parcel.ReadBool(); std::unique_ptr appQuickFixPtr(parcel.ReadParcelable()); if (appQuickFixPtr == nullptr) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("null appQuickFixPtr"); return false; } appQuickFix = *appQuickFixPtr; @@ -568,7 +568,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < applicationEnvironmentsSize; ++i) { std::unique_ptr applicationEnvironment(parcel.ReadParcelable()); if (!applicationEnvironment) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read appEnvironment failed"); return false; } appEnvironments.emplace_back(*applicationEnvironment); @@ -577,7 +577,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) std::unique_ptr multiAppModePtr(parcel.ReadParcelable()); if (!multiAppModePtr) { - APP_LOGE("icon ReadParcelable failed"); + APP_LOGE("icon read multiAppMode failed"); return false; } multiAppMode = *multiAppModePtr; @@ -770,9 +770,9 @@ bool ApplicationInfo::Marshalling(Parcel &parcel) const void ApplicationInfo::Dump(const std::string &prefix, int fd) { - APP_LOGI("called dump ApplicationInfo"); + APP_LOGI("begin"); if (fd < 0) { - APP_LOGE("dump ApplicationInfo fd error"); + APP_LOGE("dump fd error"); return; } int flags = fcntl(fd, F_GETFL); @@ -858,7 +858,7 @@ void from_json(const nlohmann::json &jsonObject, Resource &resource) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - APP_LOGE("read Resource error : %{public}d", parseResult); + APP_LOGE("read resource error : %{public}d", parseResult); } } @@ -908,7 +908,7 @@ void from_json(const nlohmann::json &jsonObject, HnpPackage &hnpPackage) true, parseResult); if (parseResult != ERR_OK) { - APP_LOGE("read Resource error %{public}d", parseResult); + APP_LOGE("read resource error %{public}d", parseResult); } } diff --git a/interfaces/inner_api/appexecfwk_base/src/bundle_info.cpp b/interfaces/inner_api/appexecfwk_base/src/bundle_info.cpp index 8328cf0904..0b723ce810 100644 --- a/interfaces/inner_api/appexecfwk_base/src/bundle_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/bundle_info.cpp @@ -124,7 +124,7 @@ bool RequestPermission::ReadFromParcel(Parcel &parcel) reasonId = parcel.ReadUint32(); std::unique_ptr scene(parcel.ReadParcelable()); if (!scene) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read requestPermissionUsedScene failed"); return false; } usedScene = *scene; @@ -186,7 +186,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) { std::unique_ptr appInfo(parcel.ReadParcelable()); if (!appInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read appInfo failed"); return false; } applicationInfo = *appInfo; @@ -197,7 +197,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < abilityInfosSize; i++) { std::unique_ptr abilityInfo(parcel.ReadParcelable()); if (!abilityInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read abilityInfo failed"); return false; } abilityInfos.emplace_back(*abilityInfo); @@ -209,7 +209,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < extensionInfosSize; i++) { std::unique_ptr extensionAbilityInfo(parcel.ReadParcelable()); if (!extensionAbilityInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read extensionAbilityInfo failed"); return false; } extensionInfos.emplace_back(*extensionAbilityInfo); @@ -221,7 +221,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < hapModuleInfosSize; i++) { std::unique_ptr hapModuleInfo(parcel.ReadParcelable()); if (!hapModuleInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read hapModuleInfo failed"); return false; } hapModuleInfos.emplace_back(*hapModuleInfo); @@ -313,7 +313,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < reqPermissionDetailsSize; i++) { std::unique_ptr requestPermission(parcel.ReadParcelable()); if (!requestPermission) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read requestPermission failed"); return false; } reqPermissionDetails.emplace_back(*requestPermission); @@ -331,7 +331,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) std::unique_ptr sigInfo(parcel.ReadParcelable()); if (!sigInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read sigInfo failed"); return false; } signatureInfo = *sigInfo; @@ -343,7 +343,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < overlayBundleInfoSize; i++) { std::unique_ptr overlayBundleInfo(parcel.ReadParcelable()); if (!overlayBundleInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read overlayBundleInfo failed"); return false; } overlayBundleInfos.emplace_back(*overlayBundleInfo); @@ -360,7 +360,7 @@ bool BundleInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < routerArraySize; ++i) { std::unique_ptr routerItem(parcel.ReadParcelable()); if (!routerItem) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read routerItem failed"); return false; } routerArray.emplace_back(*routerItem); diff --git a/interfaces/inner_api/appexecfwk_base/src/bundle_pack_info.cpp b/interfaces/inner_api/appexecfwk_base/src/bundle_pack_info.cpp index cda55518d6..2da652384c 100644 --- a/interfaces/inner_api/appexecfwk_base/src/bundle_pack_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/bundle_pack_info.cpp @@ -183,7 +183,7 @@ void from_json(const nlohmann::json &jsonObject, ExtensionAbilities &extensionAb parseResult, ArrayType::OBJECT); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read extensionAbilities error %{public}d", parseResult); } } @@ -228,7 +228,7 @@ void from_json(const nlohmann::json &jsonObject, ModuleAbilityInfo &abilityinfo) parseResult, ArrayType::OBJECT); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read abilityInfo error %{public}d", parseResult); } } @@ -264,7 +264,7 @@ void from_json(const nlohmann::json &jsonObject, AbilityFormInfo &abilityFormInf BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, PACK_SUMMARY_MODULE_ABILITY_FORMS_DEFAULT_DIMENSION, abilityFormInfo.defaultDimension, false, parseResult); if (parseResult != ERR_OK) { - APP_LOGE("read BundleConfigInfo error %{public}d", parseResult); + APP_LOGE("read abilityFormInfo error %{public}d", parseResult); } } @@ -307,7 +307,7 @@ void from_json(const nlohmann::json &jsonObject, ModuleDistro &distro) false, parseResult); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read moduleDistro error %{public}d", parseResult); } } @@ -347,7 +347,7 @@ void from_json(const nlohmann::json &jsonObject, ApiVersion &apiVersion) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read apiVersion error %{public}d", parseResult); } } @@ -414,7 +414,7 @@ void from_json(const nlohmann::json &jsonObject, PackageModule &packageModule) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read packageModule error %{public}d", parseResult); } } @@ -447,7 +447,7 @@ void from_json(const nlohmann::json &jsonObject, Summary &summary) parseResult, ArrayType::OBJECT); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read summary error %{public}d", parseResult); } } @@ -492,7 +492,7 @@ void from_json(const nlohmann::json &jsonObject, Packages &packages) false, parseResult); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read packages error %{public}d", parseResult); } } @@ -525,7 +525,7 @@ void from_json(const nlohmann::json &jsonObject, BundlePackInfo &bundlePackInfo) parseResult, ArrayType::OBJECT); if (parseResult != ERR_OK) { - APP_LOGE("read abilityinfo error %{public}d", parseResult); + APP_LOGE("read bundlePackInfo error %{public}d", parseResult); } } @@ -533,17 +533,17 @@ bool BundlePackInfo::ReadFromParcel(Parcel &parcel) { MessageParcel *messageParcel = reinterpret_cast(&parcel); if (!messageParcel) { - APP_LOGE("Type conversion failed"); + APP_LOGE("type conversion failed"); return false; } uint32_t length = messageParcel->ReadUint32(); if (length == 0) { - APP_LOGE("Invalid data length"); + APP_LOGE("invalid data length"); return false; } const char *data = reinterpret_cast(messageParcel->ReadRawData(length)); if (!data) { - APP_LOGE("Fail read raw length = %{public}d", length); + APP_LOGE("fail read raw length = %{public}d", length); return false; } nlohmann::json jsonObject = nlohmann::json::parse(data, nullptr, false); @@ -559,17 +559,17 @@ bool BundlePackInfo::Marshalling(Parcel &parcel) const { MessageParcel *messageParcel = reinterpret_cast(&parcel); if (!messageParcel) { - APP_LOGE("Type conversion failed"); + APP_LOGE("type conversion failed"); return false; } nlohmann::json jsonObject = *this; std::string str = jsonObject.dump(); if (!messageParcel->WriteUint32(str.size() + 1)) { - APP_LOGE("Failed to write;data size"); + APP_LOGE("failed to write data size"); return false; } if (!messageParcel->WriteRawData(str.c_str(), str.size() + 1)) { - APP_LOGE("Failed to write data"); + APP_LOGE("failed to write data"); return false; } return true; diff --git a/interfaces/inner_api/appexecfwk_base/src/bundle_user_info.cpp b/interfaces/inner_api/appexecfwk_base/src/bundle_user_info.cpp index ccae271635..e79d8de4a2 100644 --- a/interfaces/inner_api/appexecfwk_base/src/bundle_user_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/bundle_user_info.cpp @@ -86,14 +86,14 @@ bool BundleUserInfo::Marshalling(Parcel &parcel) const void BundleUserInfo::Dump(const std::string &prefix, int fd) { - APP_LOGI("called dump BundleUserInfo"); + APP_LOGI("begin"); if (fd < 0) { - APP_LOGE("dump BundleUserInfo fd error"); + APP_LOGE("dump fd error"); return; } int flags = fcntl(fd, F_GETFL); if (flags < 0) { - APP_LOGE("BundleUserInfo fcntl error %{public}s", strerror(errno)); + APP_LOGE("fcntl error %{public}s", strerror(errno)); return; } uint uflags = static_cast(flags); @@ -105,7 +105,7 @@ void BundleUserInfo::Dump(const std::string &prefix, int fd) result.append(jsonObject.dump(Constants::DUMP_INDENT)); int ret = TEMP_FAILURE_RETRY(write(fd, result.c_str(), result.size())); if (ret < 0) { - APP_LOGE("BundleUserInfo write error %{public}s", strerror(errno)); + APP_LOGE("write error %{public}s", strerror(errno)); } } } diff --git a/interfaces/inner_api/appexecfwk_base/src/code_protect_bundle_info.cpp b/interfaces/inner_api/appexecfwk_base/src/code_protect_bundle_info.cpp index 6eb522f360..aba6e730e6 100644 --- a/interfaces/inner_api/appexecfwk_base/src/code_protect_bundle_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/code_protect_bundle_info.cpp @@ -85,7 +85,7 @@ void from_json(const nlohmann::json &jsonObject, CodeProtectBundleInfo &CodeProt GetValueIfFindKey(jsonObject, jsonObjectEnd, APPLICATION_RESERVED_FLAG, CodeProtectBundleInfo.applicationReservedFlag, JsonType::NUMBER, false, parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - APP_LOGE("read CodeProtectBundleInfo jsonObject error : %{public}d", parseResult); + APP_LOGE("read error : %{public}d", parseResult); } } } // namespace AppExecFwk diff --git a/interfaces/inner_api/appexecfwk_base/src/compatible_ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/compatible_ability_info.cpp index 1ff753818f..305f880064 100644 --- a/interfaces/inner_api/appexecfwk_base/src/compatible_ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/compatible_ability_info.cpp @@ -74,7 +74,7 @@ bool CompatibleAbilityInfo::ReadFromParcel(Parcel& parcel) for (int32_t i = 0; i < permissionsSize; i++) { std::string permission = Str16ToStr8(parcel.ReadString16()); if (permission.empty()) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("permission empty"); return false; } permissions.emplace_back(permission); @@ -89,7 +89,7 @@ bool CompatibleAbilityInfo::ReadFromParcel(Parcel& parcel) for (auto i = 0; i < deviceTypeSize; i++) { std::string deviceType = Str16ToStr8(parcel.ReadString16()); if (deviceType.empty()) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("deviceType empty"); return false; } deviceTypes.emplace_back(deviceType); @@ -104,7 +104,7 @@ bool CompatibleAbilityInfo::ReadFromParcel(Parcel& parcel) for (auto i = 0; i < deviceCapabilitySize; i++) { std::string deviceCapability = Str16ToStr8(parcel.ReadString16()); if (deviceCapability.empty()) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("deviceCapability empty"); return false; } deviceCapabilities.emplace_back(deviceCapability); @@ -122,7 +122,7 @@ bool CompatibleAbilityInfo::ReadFromParcel(Parcel& parcel) deviceId = Str16ToStr8(parcel.ReadString16()); std::unique_ptr appInfo(parcel.ReadParcelable()); if (!appInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read compatibleAppInfo failed"); return false; } applicationInfo = *appInfo; @@ -201,7 +201,7 @@ bool CompatibleAbilityInfo::Marshalling(Parcel& parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(bundleName)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(className)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(deviceId)); - APP_LOGE("CompatibleAbilityInfo::Marshalling start to write application info"); + APP_LOGI("start to write app info"); if (!parcel.WriteParcelable(&applicationInfo)) { return false; } diff --git a/interfaces/inner_api/appexecfwk_base/src/compatible_application_info.cpp b/interfaces/inner_api/appexecfwk_base/src/compatible_application_info.cpp index e01513e0ec..671a515e22 100644 --- a/interfaces/inner_api/appexecfwk_base/src/compatible_application_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/compatible_application_info.cpp @@ -59,7 +59,7 @@ bool CompatibleApplicationInfo::ReadFromParcel(Parcel& parcel) for (auto i = 0; i < permissionSize; i++) { std::string permission = Str16ToStr8(parcel.ReadString16()); if (permission.empty()) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("permission empty"); return false; } permissions.emplace_back(permission); @@ -76,7 +76,7 @@ bool CompatibleApplicationInfo::ReadFromParcel(Parcel& parcel) std::string moduleName = Str16ToStr8(parcel.ReadString16()); std::string moduleSourceDir = Str16ToStr8(parcel.ReadString16()); if (moduleName.empty()) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("moduleName empty"); return false; } moduleInfo.moduleName = moduleName; diff --git a/interfaces/inner_api/appexecfwk_base/src/distributed_ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/distributed_ability_info.cpp index b49bbf14dd..55af057c9a 100644 --- a/interfaces/inner_api/appexecfwk_base/src/distributed_ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/distributed_ability_info.cpp @@ -73,14 +73,14 @@ DistributedAbilityInfo *DistributedAbilityInfo::Unmarshalling(Parcel &parcel) void DistributedAbilityInfo::Dump(const std::string &prefix, int fd) { - APP_LOGI("called dump DistributedAbilityInfo"); + APP_LOGI("begin"); if (fd < 0) { - APP_LOGE("dump DistributedAbilityInfo fd error"); + APP_LOGE("dump fd error"); return; } int flags = fcntl(fd, F_GETFL); if (flags < 0) { - APP_LOGE("dump DistributedAbilityInfo fcntl error %{public}d", errno); + APP_LOGE("dump fcntl error %{public}d", errno); return; } uint uflags = static_cast(flags); @@ -92,7 +92,7 @@ void DistributedAbilityInfo::Dump(const std::string &prefix, int fd) result.append(jsonObject.dump(Constants::DUMP_INDENT)); int ret = TEMP_FAILURE_RETRY(write(fd, result.c_str(), result.size())); if (ret < 0) { - APP_LOGE("dump DistributedAbilityInfo write error %{public}d", errno); + APP_LOGE("write error %{public}d", errno); } } } @@ -140,7 +140,7 @@ void from_json(const nlohmann::json& jsonObject, DistributedAbilityInfo& distrib false, parseResult); if (parseResult != ERR_OK) { - APP_LOGE("read distributedAbilityInfo jsonObject error : %{public}d", parseResult); + APP_LOGE("read distributedAbilityInfo error : %{public}d", parseResult); } } } // namespace AppExecFwk diff --git a/interfaces/inner_api/appexecfwk_base/src/distributed_bundle_info.cpp b/interfaces/inner_api/appexecfwk_base/src/distributed_bundle_info.cpp index 14739de7b6..9a3a4553ca 100644 --- a/interfaces/inner_api/appexecfwk_base/src/distributed_bundle_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/distributed_bundle_info.cpp @@ -55,7 +55,7 @@ bool DistributedBundleInfo::ReadFromParcel(Parcel &parcel) for (uint32_t i = 0; i < moduleInfosSize; i++) { std::unique_ptr distributedModuleInfo(parcel.ReadParcelable()); if (!distributedModuleInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read distributedModuleInfo failed"); return false; } moduleInfos.emplace_back(*distributedModuleInfo); @@ -120,7 +120,7 @@ bool DistributedBundleInfo::FromJsonString(const std::string &jsonString) { nlohmann::json jsonObject = nlohmann::json::parse(jsonString, nullptr, false); if (jsonObject.is_discarded()) { - APP_LOGE("failed parse DistributedBundleInfo: %{public}s", jsonString.c_str()); + APP_LOGE("failed parse %{public}s", jsonString.c_str()); return false; } diff --git a/interfaces/inner_api/appexecfwk_base/src/distributed_manager/rpc_id_result.cpp b/interfaces/inner_api/appexecfwk_base/src/distributed_manager/rpc_id_result.cpp index f20206f97b..47cd602b86 100644 --- a/interfaces/inner_api/appexecfwk_base/src/distributed_manager/rpc_id_result.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/distributed_manager/rpc_id_result.cpp @@ -218,7 +218,7 @@ bool RpcIdResult::ReadFromParcel(Parcel &parcel) resultMsg = Str16ToStr8(parcel.ReadString16()); std::unique_ptr summaryAbilityInfo(parcel.ReadParcelable()); if (!summaryAbilityInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read summaryAbilityInfo failed"); return false; } abilityInfo = *summaryAbilityInfo; diff --git a/interfaces/inner_api/appexecfwk_base/src/distributed_module_info.cpp b/interfaces/inner_api/appexecfwk_base/src/distributed_module_info.cpp index 34bc5de890..186c5d3ccf 100644 --- a/interfaces/inner_api/appexecfwk_base/src/distributed_module_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/distributed_module_info.cpp @@ -39,7 +39,7 @@ bool DistributedModuleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < abilityInfosSize; i++) { std::unique_ptr abilityInfo(parcel.ReadParcelable()); if (!abilityInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read abilityInfo failed"); return false; } abilities.emplace_back(*abilityInfo); @@ -70,9 +70,9 @@ DistributedModuleInfo *DistributedModuleInfo::Unmarshalling(Parcel &parcel) void DistributedModuleInfo::Dump(const std::string &prefix, int fd) { - APP_LOGI("called dump DistributedModuleInfo"); + APP_LOGI("begin"); if (fd < 0) { - APP_LOGE("dump DistributedModuleInfo fd error"); + APP_LOGE("dump fd error"); return; } int flags = fcntl(fd, F_GETFL); diff --git a/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp index 752bc6551b..0d22277396 100644 --- a/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp @@ -177,7 +177,7 @@ bool ReadMetadataFromParcel(Parcel &parcel, std::vector &metadata) for (auto i = 0; i < metadataSize; i++) { std::unique_ptr meta(parcel.ReadParcelable()); if (!meta) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read metadata failed"); return false; } metadata.emplace_back(*meta); @@ -212,13 +212,13 @@ bool ExtensionAbilityInfo::ReadFromParcel(Parcel &parcel) extensionTypeName = Str16ToStr8(parcel.ReadString16()); visible = parcel.ReadBool(); if (!ReadMetadataFromParcel(parcel, metadata)) { - APP_LOGE("Read meta data failed"); + APP_LOGE("read meta data failed"); return false; } std::unique_ptr appInfo(parcel.ReadParcelable()); if (!appInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read appInfo failed"); return false; } applicationInfo = *appInfo; @@ -231,7 +231,7 @@ bool ExtensionAbilityInfo::ReadFromParcel(Parcel &parcel) uid = parcel.ReadInt32(); appIndex = parcel.ReadInt32(); if (!ReadSkillInfoFromParcel(parcel, skillUri)) { - APP_LOGE("Read skill info failed"); + APP_LOGE("read skill info failed"); return false; } extensionProcessMode = static_cast(parcel.ReadInt32()); @@ -241,7 +241,7 @@ bool ExtensionAbilityInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < skillsSize; i++) { std::unique_ptr extensionSkillPtr(parcel.ReadParcelable()); if (!extensionSkillPtr) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read extension skill failed"); return false; } skills.emplace_back(*extensionSkillPtr); diff --git a/interfaces/inner_api/appexecfwk_base/src/form_info.cpp b/interfaces/inner_api/appexecfwk_base/src/form_info.cpp index b86adeda81..d2f82ba29a 100644 --- a/interfaces/inner_api/appexecfwk_base/src/form_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/form_info.cpp @@ -307,7 +307,7 @@ bool FormInfo::Marshalling(Parcel &parcel) const bool FormInfo::IsValid() const { if (!window.autoDesignWidth && window.designWidth <= 0) { - APP_LOGW("Invalid FormInfo, window.designWidth <= 0"); + APP_LOGW("invalid formInfo, window.designWidth <= 0"); return false; } return true; diff --git a/interfaces/inner_api/appexecfwk_base/src/free_install/install_result.cpp b/interfaces/inner_api/appexecfwk_base/src/free_install/install_result.cpp index 18b90dff8c..2d9e153d76 100644 --- a/interfaces/inner_api/appexecfwk_base/src/free_install/install_result.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/free_install/install_result.cpp @@ -69,7 +69,7 @@ void from_json(const nlohmann::json &jsonObject, Result &result) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module result from jsonObject error, error code : %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module result error, error code : %{public}d", parseResult); } } @@ -102,7 +102,7 @@ void from_json(const nlohmann::json &jsonObject, Progress &progress) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module progress from jsonObject error, error code : %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module progress error, error code : %{public}d", parseResult); } } @@ -142,7 +142,7 @@ void from_json(const nlohmann::json &jsonObject, InstallResult &installResult) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module installResult from jsonObject error: %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module installResult error: %{public}d", parseResult); } } diff --git a/interfaces/inner_api/appexecfwk_base/src/free_install/target_ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/free_install/target_ability_info.cpp index c4f0248701..5e1ea2a15a 100644 --- a/interfaces/inner_api/appexecfwk_base/src/free_install/target_ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/free_install/target_ability_info.cpp @@ -64,7 +64,7 @@ void from_json(const nlohmann::json &jsonObject, TargetExtSetting &targetExtSett parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module targetExtSetting from jsonObject error: %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module targetExtSetting error: %{public}d", parseResult); } } @@ -234,7 +234,7 @@ void from_json(const nlohmann::json &jsonObject, TargetInfo &targetInfo) parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module targetInfo from jsonObject error: %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module targetInfo error: %{public}d", parseResult); } } @@ -349,7 +349,7 @@ void from_json(const nlohmann::json &jsonObject, TargetAbilityInfo &targetAbilit parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module targetAbilityInfo from jsonObject error: %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module targetAbilityInfo error: %{public}d", parseResult); } } diff --git a/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp b/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp index 7046c698e0..a787325269 100644 --- a/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp @@ -140,7 +140,7 @@ void from_json(const nlohmann::json &jsonObject, PreloadItem &preloadItem) false, parseResult); if (parseResult != ERR_OK) { - APP_LOGE("read PreloadItem database error : %{public}d", parseResult); + APP_LOGE("read preloadItem error : %{public}d", parseResult); } } @@ -216,7 +216,7 @@ bool ProxyData::ReadFromParcel(Parcel &parcel) requiredWritePermission = Str16ToStr8(parcel.ReadString16()); std::unique_ptr data(parcel.ReadParcelable()); if (!data) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read metadata failed"); return false; } metadata = *data; @@ -466,7 +466,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < abilityInfosSize; i++) { std::unique_ptr abilityInfo(parcel.ReadParcelable()); if (!abilityInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read abilityInfo failed"); return false; } abilityInfos.emplace_back(*abilityInfo); @@ -478,7 +478,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < extensionInfosSize; i++) { std::unique_ptr extensionAbilityInfo(parcel.ReadParcelable()); if (!extensionAbilityInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read extensionAbilityInfo failed"); return false; } extensionInfos.emplace_back(*extensionAbilityInfo); @@ -521,7 +521,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < dependenciesSize; i++) { std::unique_ptr dependency(parcel.ReadParcelable()); if (!dependency) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read dependency failed"); return false; } dependencies.emplace_back(*dependency); @@ -557,7 +557,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < metadataSize; ++i) { std::unique_ptr meta(parcel.ReadParcelable()); if (!meta) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read metadata failed"); return false; } metadata.emplace_back(*meta); @@ -567,7 +567,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) compileMode = static_cast(parcel.ReadInt32()); std::unique_ptr hqfInfoPtr(parcel.ReadParcelable()); if (hqfInfoPtr == nullptr) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("null hqfInfoPtr"); return false; } hqfInfo = *hqfInfoPtr; @@ -582,7 +582,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < overlayModuleInfosSize; i++) { std::unique_ptr overlayModuleInfo(parcel.ReadParcelable()); if (!overlayModuleInfo) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read overlayModuleInfo failed"); return false; } overlayModuleInfos.emplace_back(*overlayModuleInfo); @@ -594,7 +594,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < preloadsSize; ++i) { std::unique_ptr preload(parcel.ReadParcelable()); if (!preload) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read preloadItem failed"); return false; } preloads.emplace_back(*preload); @@ -605,7 +605,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < proxyDatasSize; ++i) { std::unique_ptr proxyData(parcel.ReadParcelable()); if (!proxyData) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read proxyData failed"); return false; } proxyDatas.emplace_back(*proxyData); @@ -629,7 +629,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < routerArraySize; ++i) { std::unique_ptr routerItem(parcel.ReadParcelable()); if (!routerItem) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read routerItem failed"); return false; } routerArray.emplace_back(*routerItem); @@ -640,7 +640,7 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) for (int32_t i = 0; i < appEnvironmentsSize; ++i) { std::unique_ptr appEnvironment(parcel.ReadParcelable()); if (!appEnvironment) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read appEnvironment failed"); return false; } appEnvironments.emplace_back(*appEnvironment); diff --git a/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_bundle_info.cpp b/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_bundle_info.cpp index 5cccbbd1a9..46351728e6 100644 --- a/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_bundle_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_bundle_info.cpp @@ -102,7 +102,7 @@ void from_json(const nlohmann::json &jsonObject, OverlayBundleInfo &overlayBundl parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - APP_LOGE("overlayBundleInfo from_json error : %{public}d", parseResult); + APP_LOGE("overlayBundleInfo error : %{public}d", parseResult); } } } // AppExecFwk diff --git a/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_module_info.cpp b/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_module_info.cpp index ba54824490..64dffbb8dd 100644 --- a/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_module_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/overlay/overlay_module_info.cpp @@ -123,7 +123,7 @@ void from_json(const nlohmann::json &jsonObject, OverlayModuleInfo &overlayModul parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - APP_LOGE("overlayModuleInfo from_json error : %{public}d", parseResult); + APP_LOGE("overlayModuleInfo error : %{public}d", parseResult); } } } // AppExecFwk diff --git a/interfaces/inner_api/appexecfwk_base/src/preinstalled_application_info.cpp b/interfaces/inner_api/appexecfwk_base/src/preinstalled_application_info.cpp index 156f52f27c..cdaa48e9b5 100644 --- a/interfaces/inner_api/appexecfwk_base/src/preinstalled_application_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/preinstalled_application_info.cpp @@ -40,11 +40,11 @@ PreinstalledApplicationInfo *PreinstalledApplicationInfo::Unmarshalling(Parcel & { PreinstalledApplicationInfo *info = new (std::nothrow) PreinstalledApplicationInfo(); if (info == nullptr) { - APP_LOGE("Info is null"); + APP_LOGE("null info"); return nullptr; } if (!info->ReadFromParcel(parcel)) { - APP_LOGW("Read from parcel failed"); + APP_LOGW("read from parcel failed"); delete info; info = nullptr; } diff --git a/interfaces/inner_api/appexecfwk_base/src/quick_fix/app_quick_fix.cpp b/interfaces/inner_api/appexecfwk_base/src/quick_fix/app_quick_fix.cpp index 2e203cfa9b..017e1a00ba 100644 --- a/interfaces/inner_api/appexecfwk_base/src/quick_fix/app_quick_fix.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/quick_fix/app_quick_fix.cpp @@ -70,7 +70,7 @@ void from_json(const nlohmann::json &jsonObject, AppQuickFix &appQuickFix) JsonType::OBJECT, false, parseResult, ArrayType::NOT_ARRAY); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module appQuickFix from jsonObject error, error code : %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module appQuickFix error, error code : %{public}d", parseResult); } } @@ -81,14 +81,14 @@ bool AppQuickFix::ReadFromParcel(Parcel &parcel) versionName = Str16ToStr8(parcel.ReadString16()); std::unique_ptr deployedAppqfInfoPtr(parcel.ReadParcelable()); if (!deployedAppqfInfoPtr) { - LOG_E(BMS_TAG_DEFAULT, "ReadParcelable failed"); + LOG_E(BMS_TAG_DEFAULT, "read AppqfInfo failed"); return false; } deployedAppqfInfo = *deployedAppqfInfoPtr; std::unique_ptr deployingAppqfInfoPtr(parcel.ReadParcelable()); if (!deployingAppqfInfoPtr) { - LOG_E(BMS_TAG_DEFAULT, "ReadParcelable failed"); + LOG_E(BMS_TAG_DEFAULT, "read AppqfInfo failed"); return false; } deployingAppqfInfo = *deployingAppqfInfoPtr; diff --git a/interfaces/inner_api/appexecfwk_base/src/quick_fix/appqf_info.cpp b/interfaces/inner_api/appexecfwk_base/src/quick_fix/appqf_info.cpp index 89ae0aa030..376fca51bf 100644 --- a/interfaces/inner_api/appexecfwk_base/src/quick_fix/appqf_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/quick_fix/appqf_info.cpp @@ -76,7 +76,7 @@ void from_json(const nlohmann::json &jsonObject, AppqfInfo &appqfInfo) JsonType::ARRAY, false, parseResult, ArrayType::OBJECT); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module appqfInfo from jsonObject error, error code : %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module appqfInfo error, error code : %{public}d", parseResult); } } @@ -93,7 +93,7 @@ bool AppqfInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < hqfSize; i++) { std::unique_ptr hqfInfoPtr(parcel.ReadParcelable()); if (!hqfInfoPtr) { - LOG_E(BMS_TAG_DEFAULT, "ReadParcelable failed"); + LOG_E(BMS_TAG_DEFAULT, "read HqfInfo failed"); return false; } hqfInfos.emplace_back(*hqfInfoPtr); diff --git a/interfaces/inner_api/appexecfwk_base/src/quick_fix/hqf_info.cpp b/interfaces/inner_api/appexecfwk_base/src/quick_fix/hqf_info.cpp index d80e9d15f6..2b4425890b 100644 --- a/interfaces/inner_api/appexecfwk_base/src/quick_fix/hqf_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/quick_fix/hqf_info.cpp @@ -87,7 +87,7 @@ void from_json(const nlohmann::json &jsonObject, HqfInfo &hqfInfo) false, parseResult); if (parseResult != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "read module hqfInfo from jsonObject error, error code : %{public}d", parseResult); + LOG_E(BMS_TAG_DEFAULT, "read module hqfInfo error, error code : %{public}d", parseResult); } } diff --git a/interfaces/inner_api/appexecfwk_base/src/remote_ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/remote_ability_info.cpp index 8df4cbf025..30980e7561 100644 --- a/interfaces/inner_api/appexecfwk_base/src/remote_ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/remote_ability_info.cpp @@ -25,7 +25,7 @@ bool RemoteAbilityInfo::ReadFromParcel(Parcel &parcel) { std::unique_ptr elementNamePtr(parcel.ReadParcelable()); if (!elementNamePtr) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read elementName failed"); return false; } elementName = *elementNamePtr; diff --git a/interfaces/inner_api/appexecfwk_base/src/shared/shared_bundle_info.cpp b/interfaces/inner_api/appexecfwk_base/src/shared/shared_bundle_info.cpp index 3371b827c1..448e5c054c 100644 --- a/interfaces/inner_api/appexecfwk_base/src/shared/shared_bundle_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/shared/shared_bundle_info.cpp @@ -40,7 +40,7 @@ bool SharedBundleInfo::ReadFromParcel(Parcel &parcel) for (auto i = 0; i < size; i++) { std::unique_ptr info(parcel.ReadParcelable()); if (!info) { - APP_LOGE("ReadParcelable failed"); + APP_LOGE("read sharedModuleInfo failed"); return false; } sharedModuleInfos.emplace_back(*info); diff --git a/interfaces/inner_api/appexecfwk_base/src/skill.cpp b/interfaces/inner_api/appexecfwk_base/src/skill.cpp index 10e9d06b00..693ee6889b 100644 --- a/interfaces/inner_api/appexecfwk_base/src/skill.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/skill.cpp @@ -660,14 +660,14 @@ bool Skill::Marshalling(Parcel &parcel) const void Skill::Dump(std::string prefix, int fd) { - APP_LOGI("called dump Skill"); + APP_LOGI("begin"); if (fd < 0) { - APP_LOGE("dump Skill fd error"); + APP_LOGE("dump fd error"); return; } int flags = fcntl(fd, F_GETFL); if (flags < 0) { - APP_LOGE("dump Skill fcntl error : %{public}d", errno); + APP_LOGE("dump fcntl error : %{public}d", errno); return; } uint uflags = static_cast(flags); diff --git a/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_host.cpp b/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_host.cpp index b8ee6e6e6e..f1544b4af1 100644 --- a/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_host.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/app_control/app_control_host.cpp @@ -40,7 +40,7 @@ int AppControlHost::OnRemoteRequest( uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) { BundleMemoryGuard memoryGuard; - LOG_I(BMS_TAG_DEFAULT, "AppControlHost OnRemoteRequest, message code : %{public}u", code); + LOG_I(BMS_TAG_DEFAULT, "message code : %{public}u", code); std::u16string descriptor = AppControlHost::GetDescriptor(); std::u16string remoteDescriptor = data.ReadInterfaceToken(); if (descriptor != remoteDescriptor) { @@ -104,7 +104,7 @@ int AppControlHost::OnRemoteRequest( case static_cast(AppControlManagerInterfaceCode::DELETE_UNINSTALL_DISPOSED_RULE): return HandleDeleteUninstallDisposedRule(data, reply); default: - LOG_W(BMS_TAG_DEFAULT, "AppControlHost receive unknown code, code = %{public}d", code); + LOG_W(BMS_TAG_DEFAULT, "receive unknown code, code = %{public}d", code); return IPCObjectStub::OnRemoteRequest(code, data, reply, option); } } @@ -184,7 +184,7 @@ ErrCode AppControlHost::HandleAddAppRunningControlRule(MessageParcel& data, Mess std::vector controlRules; auto ret = ReadParcelableVector(data, controlRules); if (ret != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "AddAppRunningControlRule read controlRuleParam failed"); + LOG_E(BMS_TAG_DEFAULT, "read controlRuleParam failed"); return ret; } int32_t userId = data.ReadInt32(); @@ -196,7 +196,7 @@ ErrCode AppControlHost::HandleDeleteAppRunningControlRule(MessageParcel& data, M std::vector controlRules; auto ret = ReadParcelableVector(data, controlRules); if (ret != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "DeleteAppRunningControlRule read controlRuleParam failed"); + LOG_E(BMS_TAG_DEFAULT, "read controlRuleParam failed"); return ret; } int32_t userId = data.ReadInt32(); @@ -266,7 +266,7 @@ ErrCode AppControlHost::HandleAddAppJumpControlRule(MessageParcel& data, Message std::vector controlRules; auto ret = ReadParcelableVector(data, controlRules); if (ret != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "HandleAddAppJumpControlRule read controlRuleParam failed"); + LOG_E(BMS_TAG_DEFAULT, "read controlRuleParam failed"); return ret; } int32_t userId = data.ReadInt32(); @@ -278,7 +278,7 @@ ErrCode AppControlHost::HandleDeleteAppJumpControlRule(MessageParcel& data, Mess std::vector controlRules; auto ret = ReadParcelableVector(data, controlRules); if (ret != ERR_OK) { - LOG_E(BMS_TAG_DEFAULT, "HandleDeleteAppJumpControlRule read controlRuleParam failed"); + LOG_E(BMS_TAG_DEFAULT, "read controlRuleParam failed"); return ret; } int32_t userId = data.ReadInt32(); @@ -334,7 +334,7 @@ ErrCode AppControlHost::HandleSetDisposedStatus(MessageParcel& data, MessageParc std::unique_ptr want(data.ReadParcelable()); int32_t userId = data.ReadInt32(); if (want == nullptr) { - LOG_E(BMS_TAG_DEFAULT, "ReadParcelable failed"); + LOG_E(BMS_TAG_DEFAULT, "null want"); return ERR_APPEXECFWK_PARCEL_ERROR; } ErrCode ret = SetDisposedStatus(appId, *want, userId); @@ -401,7 +401,7 @@ ErrCode AppControlHost::HandleSetDisposedRule(MessageParcel& data, MessageParcel std::unique_ptr disposedRule(data.ReadParcelable()); int32_t userId = data.ReadInt32(); if (disposedRule == nullptr) { - LOG_E(BMS_TAG_DEFAULT, "ReadParcelable failed"); + LOG_E(BMS_TAG_DEFAULT, "null disposedRule"); return ERR_APPEXECFWK_PARCEL_ERROR; } ErrCode ret = SetDisposedRule(appId, *disposedRule, userId); @@ -459,7 +459,7 @@ ErrCode AppControlHost::HandleSetDisposedRuleForCloneApp(MessageParcel& data, Me int32_t userId = data.ReadInt32(); int32_t appIndex = data.ReadInt32(); if (disposedRule == nullptr) { - LOG_E(BMS_TAG_DEFAULT, "ReadParcelable failed"); + LOG_E(BMS_TAG_DEFAULT, "null disposedRule"); return ERR_APPEXECFWK_PARCEL_ERROR; } ErrCode ret = SetDisposedRuleForCloneApp(appId, *disposedRule, appIndex, userId); @@ -486,7 +486,7 @@ ErrCode AppControlHost::HandleDeleteDisposedRuleForCloneApp(MessageParcel& data, bool AppControlHost::WriteStringVector(const std::vector &stringVector, MessageParcel &reply) { if (!reply.WriteInt32(stringVector.size())) { - LOG_E(BMS_TAG_DEFAULT, "write ParcelableVector failed"); + LOG_E(BMS_TAG_DEFAULT, "write stringVector failed"); return false; } @@ -521,13 +521,13 @@ ErrCode AppControlHost::ReadParcelableVector(MessageParcel &data, std::vector { int32_t infoSize = data.ReadInt32(); if (infoSize > AppControlConstants::LIST_MAX_SIZE) { - LOG_E(BMS_TAG_DEFAULT, "elements num exceeds the limit %{public}d", AppControlConstants::LIST_MAX_SIZE); + LOG_E(BMS_TAG_DEFAULT, "infoSize exceeds limit %{public}d", AppControlConstants::LIST_MAX_SIZE); return ERR_BUNDLE_MANAGER_INVALID_PARAMETER; } for (int32_t i = 0; i < infoSize; i++) { std::unique_ptr info(data.ReadParcelable()); if (info == nullptr) { - LOG_E(BMS_TAG_DEFAULT, "read parcelable infos failed"); + LOG_E(BMS_TAG_DEFAULT, "null info"); return ERR_APPEXECFWK_PARCEL_ERROR; } parcelableInfos.emplace_back(*info); diff --git a/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_host.cpp b/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_host.cpp index 6d481ded79..ab449c438d 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_host.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundle_resource/bundle_resource_host.cpp @@ -208,13 +208,13 @@ ErrCode BundleResourceHost::WriteParcelableIntoAshmem(MessageParcel &tempParcel, sptr ashmem = Ashmem::CreateAshmem( (BUNDLE_RESOURCE_ASHMEM_NAME + std::to_string(AllocatAshmemNum())).c_str(), dataSize); if (ashmem == nullptr) { - APP_LOGE("Create shared memory failed"); + APP_LOGE("create shared memory failed"); return ERR_APPEXECFWK_PARCEL_ERROR; } // Set the read/write mode of the ashme. if (!ashmem->MapReadAndWriteAshmem()) { - APP_LOGE("Map shared memory fail"); + APP_LOGE("map shared memory fail"); return ERR_APPEXECFWK_PARCEL_ERROR; } // Write the size and content of each item to the ashmem. 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 0e67e67683..bf0fb728fc 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 @@ -33,7 +33,7 @@ constexpr size_t MAX_IPC_ALLOWED_CAPACITY = 100 * 1024 * 1024; // max ipc size 1 bool GetData(size_t size, const void *data, void *&buffer) { if (data == nullptr) { - APP_LOGE("failed due to null data"); + APP_LOGE("null data"); return false; } if ((size == 0) || size > MAX_PARCEL_CAPACITY) { @@ -42,7 +42,7 @@ bool GetData(size_t size, const void *data, void *&buffer) } buffer = malloc(size); if (buffer == nullptr) { - APP_LOGE("failed due to malloc buffer failed"); + APP_LOGE("malloc buffer failed"); return false; } if (memcpy_s(buffer, size, data, size) != EOK) { @@ -65,7 +65,7 @@ ErrCode BundleResourceProxy::GetBundleResourceInfo(const std::string &bundleName HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__); APP_LOGD("start, bundleName:%{public}s, flags:%{public}u", bundleName.c_str(), flags); if (bundleName.empty()) { - APP_LOGE("bundleName is empty"); + APP_LOGE("bundleName empty"); return ERR_BUNDLE_MANAGER_PARAM_ERROR; } MessageParcel data; @@ -97,7 +97,7 @@ ErrCode BundleResourceProxy::GetLauncherAbilityResourceInfo(const std::string &b HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__); APP_LOGD("start, bundleName:%{public}s, flags:%{public}u", bundleName.c_str(), flags); if (bundleName.empty()) { - APP_LOGE("bundleName is empty"); + APP_LOGE("bundleName empty"); return ERR_BUNDLE_MANAGER_PARAM_ERROR; } MessageParcel data; @@ -316,7 +316,7 @@ ErrCode BundleResourceProxy::GetVectorParcelInfo( size_t dataSize = reply.ReadUint32(); if (dataSize == 0) { - APP_LOGW("Parcel no data"); + APP_LOGW("parcel no data"); return ERR_OK; } @@ -336,7 +336,7 @@ ErrCode BundleResourceProxy::GetVectorParcelInfo( MessageParcel tempParcel; if (!tempParcel.ParseFrom(reinterpret_cast(buffer), dataSize)) { - APP_LOGE("Fail to ParseFrom"); + APP_LOGE("fail to ParseFrom"); return ERR_APPEXECFWK_PARCEL_ERROR; } @@ -345,7 +345,7 @@ ErrCode BundleResourceProxy::GetVectorParcelInfo( for (int32_t i = 0; i < infoSize; i++) { std::unique_ptr info(tempParcel.ReadParcelable()); if (info == nullptr) { - APP_LOGE("Read Parcelable infos failed"); + APP_LOGE("null info"); return ERR_APPEXECFWK_PARCEL_ERROR; } parcelInfos.emplace_back(*info); @@ -366,7 +366,7 @@ ErrCode BundleResourceProxy::GetParcelInfoFromAshMem(MessageParcel &reply, void { sptr ashMem = reply.ReadAshmem(); if (ashMem == nullptr) { - APP_LOGE("Ashmem is nullptr"); + APP_LOGE("null ashMem"); return ERR_APPEXECFWK_PARCEL_ERROR; } @@ -411,7 +411,7 @@ bool BundleResourceProxy::SendRequest(BundleResourceInterfaceCode code, sptr remote = Remote(); if (remote == nullptr) { - APP_LOGE("fail send transact cmd %{public}hhu due to remote object", code); + APP_LOGE("fail send transact cmd %{public}hhu due to null remote", code); return false; } int32_t result = remote->SendRequest(static_cast(code), data, reply, option); diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_event_callback_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_event_callback_proxy.cpp index 3188ea9816..27b4f81ebc 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_event_callback_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_event_callback_proxy.cpp @@ -50,7 +50,7 @@ void BundleEventCallbackProxy::OnReceiveEvent(const EventFwk::CommonEventData ev } sptr remote = Remote(); if (remote == nullptr) { - APP_LOGE("remote is null"); + APP_LOGE("null remote"); return; } int32_t ret = remote->SendRequest( 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 9ee5c394f3..a727c840db 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 @@ -60,7 +60,7 @@ bool BundleInstallerProxy::Install( PARCEL_WRITE(data, Parcelable, &installParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to install, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "install fail, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -88,7 +88,7 @@ bool BundleInstallerProxy::Install(const std::vector &bundleFilePat PARCEL_WRITE(data, Parcelable, &installParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to install, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "install fail, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -112,7 +112,7 @@ bool BundleInstallerProxy::Recover(const std::string &bundleName, PARCEL_WRITE(data, Parcelable, &installParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to install, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "install fail, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -136,7 +136,7 @@ bool BundleInstallerProxy::Uninstall( PARCEL_WRITE(data, String16, Str8ToStr16(bundleName)); PARCEL_WRITE(data, Parcelable, &installParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to uninstall, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "uninstall fail, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -160,7 +160,7 @@ bool BundleInstallerProxy::Uninstall(const std::string &bundleName, const std::s PARCEL_WRITE(data, String16, Str8ToStr16(modulePackage)); PARCEL_WRITE(data, Parcelable, &installParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to uninstall, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "uninstall fail, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -180,7 +180,7 @@ bool BundleInstallerProxy::Uninstall(const UninstallParam &uninstallParam, PARCEL_WRITE_INTERFACE_TOKEN(data, GetDescriptor()); PARCEL_WRITE(data, Parcelable, &uninstallParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to uninstall, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "uninstall fail, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -199,19 +199,19 @@ ErrCode BundleInstallerProxy::InstallSandboxApp(const std::string &bundleName, i 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, "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, "write bundleName fail"); 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, "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, "write userId fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } @@ -237,19 +237,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, "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, "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, "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, "write userId fail"); return ERR_APPEXECFWK_SANDBOX_INSTALL_WRITE_PARCEL_ERROR; } @@ -272,19 +272,19 @@ sptr BundleInstallerProxy::CreateStreamInstaller(const I MessageOption option(MessageOption::TF_SYNC); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to install, for receiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "install fail, null statusReceiver"); return nullptr; } bool ret = data.WriteInterfaceToken(GetDescriptor()); if (!ret) { - LOG_E(BMS_TAG_INSTALLER, "fail to write interface token into the parcel"); + LOG_E(BMS_TAG_INSTALLER, "fail to write interface token"); statusReceiver->OnFinished(ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, ""); return nullptr; } ret = data.WriteParcelable(&installParam); if (!ret) { - LOG_E(BMS_TAG_INSTALLER, "fail to write parameter into the parcel"); + LOG_E(BMS_TAG_INSTALLER, "fail to write installParam"); statusReceiver->OnFinished(ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, ""); return nullptr; } @@ -300,7 +300,7 @@ sptr BundleInstallerProxy::CreateStreamInstaller(const I } bool res = SendInstallRequest(BundleInstallerInterfaceCode::CREATE_STREAM_INSTALLER, data, reply, option); if (!res) { - LOG_E(BMS_TAG_INSTALLER, "CreateStreamInstaller failed due to send request fail"); + LOG_E(BMS_TAG_INSTALLER, "send request fail"); statusReceiver->OnFinished(ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, ""); return nullptr; } @@ -311,7 +311,7 @@ sptr BundleInstallerProxy::CreateStreamInstaller(const I uint32_t streamInstallerId = reply.ReadUint32(); sptr object = reply.ReadRemoteObject(); if (object == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "CreateStreamInstaller create nullptr remote object"); + LOG_E(BMS_TAG_INSTALLER, "null object"); return nullptr; } sptr streamInstaller = iface_cast(object); @@ -336,7 +336,7 @@ bool BundleInstallerProxy::DestoryBundleStreamInstaller(uint32_t streamInstaller PARCEL_WRITE(data, Uint32, streamInstallerId); bool res = SendInstallRequest(BundleInstallerInterfaceCode::DESTORY_STREAM_INSTALLER, data, reply, option); if (!res) { - LOG_E(BMS_TAG_INSTALLER, "CreateStreamInstaller failed due to send request fail"); + LOG_E(BMS_TAG_INSTALLER, "send request fail"); return false; } LOG_D(BMS_TAG_INSTALLER, "destory stream installer successfully"); @@ -355,7 +355,7 @@ bool BundleInstallerProxy::UninstallAndRecover(const std::string &bundleName, co PARCEL_WRITE(data, String16, Str8ToStr16(bundleName)); PARCEL_WRITE(data, Parcelable, &installParam); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to uninstall quick fix, for statusReceiver is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "fail to uninstall quick fix, null statusReceiver"); return false; } if (!data.WriteRemoteObject(statusReceiver->AsObject())) { @@ -372,19 +372,19 @@ ErrCode BundleInstallerProxy::StreamInstall(const std::vector &bund HITRACE_METER_NAME(HITRACE_TAG_APP, __PRETTY_FUNCTION__); LOG_D(BMS_TAG_INSTALLER, "stream install start"); if (statusReceiver == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "stream install failed due to nullptr status receiver"); + LOG_E(BMS_TAG_INSTALLER, "null statusReceiver"); return ERR_APPEXECFWK_INSTALL_PARAM_ERROR; } std::vector realPaths; if (!bundleFilePaths.empty() && !BundleFileUtil::CheckFilePath(bundleFilePaths, realPaths)) { - LOG_E(BMS_TAG_INSTALLER, "stream install failed due to check file failed"); + LOG_E(BMS_TAG_INSTALLER, "check file failed"); return ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID; } sptr streamInstaller = CreateStreamInstaller(installParam, statusReceiver, realPaths); if (streamInstaller == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "stream install failed due to nullptr stream installer"); + LOG_E(BMS_TAG_INSTALLER, "null streamInstaller"); return ERR_OK; } ErrCode res = ERR_OK; @@ -403,7 +403,7 @@ ErrCode BundleInstallerProxy::StreamInstall(const std::vector &bund if (!realPaths.empty() && !installParam.verifyCodeParams.empty() && (realPaths.size() != installParam.verifyCodeParams.size())) { DestoryBundleStreamInstaller(streamInstaller->GetInstallerId()); - LOG_E(BMS_TAG_INSTALLER, "size of hapFiles is not same with size of verifyCodeParams"); + LOG_E(BMS_TAG_INSTALLER, "size of hapFiles and verifyCodeParams are different"); return ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID; } if ((res = CopySignatureFileToService(streamInstaller, installParam)) != ERR_OK) { @@ -423,7 +423,7 @@ ErrCode BundleInstallerProxy::StreamInstall(const std::vector &bund realPaths.clear(); std::vector sharedBundleDir = {installParam.sharedBundleDirPaths[i]}; if (!BundleFileUtil::CheckFilePath(sharedBundleDir, realPaths)) { - LOG_E(BMS_TAG_INSTALLER, "stream install failed due to check shared package files failed"); + LOG_E(BMS_TAG_INSTALLER, "check shared package files failed"); DestoryBundleStreamInstaller(streamInstaller->GetInstallerId()); return ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID; } @@ -499,7 +499,7 @@ ErrCode BundleInstallerProxy::WriteHapFileToStream(sptr const std::string &path) { if (streamInstaller == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "write file to stream failed due to nullptr stream installer"); + LOG_E(BMS_TAG_INSTALLER, "null streamInstaller"); return ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR; } std::string fileName; @@ -527,7 +527,7 @@ ErrCode BundleInstallerProxy::WriteSignatureFileToStream(sptr const std::string &path, const std::string &moduleName) { if (streamInstaller == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "write file to stream failed due to nullptr stream installer"); + LOG_E(BMS_TAG_INSTALLER, "null streamInstaller"); return ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR; } @@ -613,7 +613,7 @@ ErrCode BundleInstallerProxy::CopySignatureFileToService(sptr const InstallParam &installParam) { if (streamInstaller == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "copy file failed due to nullptr stream installer"); + LOG_E(BMS_TAG_INSTALLER, "null streamInstaller"); return ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR; } if (installParam.pgoParams.empty()) { @@ -668,12 +668,12 @@ ErrCode BundleInstallerProxy::GetFileNameByFilePath(const std::string &filePath, { size_t pos = filePath.find_last_of(SEPARATOR); if (pos == std::string::npos) { - LOG_E(BMS_TAG_INSTALLER, "write file to stream failed due to invalid file path"); + LOG_E(BMS_TAG_INSTALLER, "invalid file path"); return ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID; } fileName = filePath.substr(pos + 1); if (fileName.empty()) { - LOG_E(BMS_TAG_INSTALLER, "write file to stream failed due to invalid file path"); + LOG_E(BMS_TAG_INSTALLER, "fileName empty"); return ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID; } return ERR_OK; @@ -684,7 +684,7 @@ bool BundleInstallerProxy::SendInstallRequest( { sptr remote = Remote(); if (remote == nullptr) { - LOG_E(BMS_TAG_INSTALLER, "fail to uninstall, for Remote() is nullptr"); + LOG_E(BMS_TAG_INSTALLER, "null remote"); return false; } @@ -704,19 +704,19 @@ ErrCode BundleInstallerProxy::InstallCloneApp(const std::string &bundleName, int MessageOption option(MessageOption::TF_SYNC); if (!data.WriteInterfaceToken(GetDescriptor())) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallCloneApp due to write MessageParcel fail"); + LOG_E(BMS_TAG_INSTALLER, "write MessageParcel fail"); return ERR_APPEXECFWK_CLONE_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteString16(Str8ToStr16(bundleName))) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallCloneApp due to write bundleName fail"); + LOG_E(BMS_TAG_INSTALLER, "write bundleName fail"); return ERR_APPEXECFWK_CLONE_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallCloneApp due to write userId fail"); + LOG_E(BMS_TAG_INSTALLER, "write userId fail"); return ERR_APPEXECFWK_CLONE_INSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(appIndex)) { - LOG_E(BMS_TAG_INSTALLER, "failed to InstallCloneApp due to write appIndex fail"); + LOG_E(BMS_TAG_INSTALLER, "write appIndex fail"); return ERR_APPEXECFWK_CLONE_INSTALL_WRITE_PARCEL_ERROR; } @@ -743,19 +743,19 @@ ErrCode BundleInstallerProxy::UninstallCloneApp(const std::string &bundleName, i MessageOption option(MessageOption::TF_SYNC); if (!data.WriteInterfaceToken(GetDescriptor())) { - LOG_E(BMS_TAG_INSTALLER, "failed to UninstallCloneApp due to write MessageParcel fail"); + LOG_E(BMS_TAG_INSTALLER, "write MessageParcel fail"); return ERR_APPEXECFWK_CLONE_UNINSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteString16(Str8ToStr16(bundleName))) { - LOG_E(BMS_TAG_INSTALLER, "failed to UninstallCloneApp due to write bundleName fail"); + LOG_E(BMS_TAG_INSTALLER, "write bundleName fail"); return ERR_APPEXECFWK_CLONE_UNINSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(userId)) { - LOG_E(BMS_TAG_INSTALLER, "failed to UninstallCloneApp due to write userId fail"); + LOG_E(BMS_TAG_INSTALLER, "write userId fail"); return ERR_APPEXECFWK_CLONE_UNINSTALL_WRITE_PARCEL_ERROR; } if (!data.WriteInt32(appIndex)) { - LOG_E(BMS_TAG_INSTALLER, "failed to UninstallCloneApp due to write appIndex fail"); + LOG_E(BMS_TAG_INSTALLER, "write appIndex fail"); return ERR_APPEXECFWK_CLONE_UNINSTALL_WRITE_PARCEL_ERROR; } diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_client.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_client.cpp index 1d827d2e90..8af89b0d6c 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_client.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_client.cpp @@ -38,7 +38,7 @@ BundleMgrClient::~BundleMgrClient() ErrCode BundleMgrClient::GetNameForUid(const int uid, std::string &name) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; } return impl_->GetNameForUid(uid, name); @@ -58,7 +58,7 @@ ErrCode BundleMgrClient::GetBundlePackInfo( const std::string &bundleName, const BundlePackFlag flag, BundlePackInfo &bundlePackInfo, int32_t userId) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; } return impl_->GetBundlePackInfo(bundleName, flag, bundlePackInfo, userId); @@ -67,7 +67,7 @@ ErrCode BundleMgrClient::GetBundlePackInfo( ErrCode BundleMgrClient::CreateBundleDataDir(int32_t userId) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; } return impl_->CreateBundleDataDir(userId); @@ -77,7 +77,7 @@ bool BundleMgrClient::GetHapModuleInfo(const std::string &bundleName, const std: HapModuleInfo &hapModuleInfo) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetHapModuleInfo(bundleName, hapName, hapModuleInfo); @@ -87,7 +87,7 @@ bool BundleMgrClient::GetResConfigFile(const HapModuleInfo &hapModuleInfo, const std::vector &profileInfos) const { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetResConfigFile(hapModuleInfo, metadataName, profileInfos); @@ -97,7 +97,7 @@ bool BundleMgrClient::GetResConfigFile(const ExtensionAbilityInfo &extensionInfo std::vector &profileInfos) const { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetResConfigFile(extensionInfo, metadataName, profileInfos); @@ -107,7 +107,7 @@ bool BundleMgrClient::GetResConfigFile(const AbilityInfo &abilityInfo, const std std::vector &profileInfos) const { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetResConfigFile(abilityInfo, metadataName, profileInfos); @@ -117,7 +117,7 @@ bool BundleMgrClient::GetProfileFromExtension(const ExtensionAbilityInfo &extens const std::string &metadataName, std::vector &profileInfos) const { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetProfileFromExtension(extensionInfo, metadataName, profileInfos); @@ -127,7 +127,7 @@ bool BundleMgrClient::GetProfileFromAbility(const AbilityInfo &abilityInfo, cons std::vector &profileInfos) const { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetProfileFromAbility(abilityInfo, metadataName, profileInfos); @@ -137,7 +137,7 @@ bool BundleMgrClient::GetProfileFromHap(const HapModuleInfo &hapModuleInfo, cons std::vector &profileInfos) const { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return false; } return impl_->GetProfileFromHap(hapModuleInfo, metadataName, profileInfos); @@ -147,7 +147,7 @@ ErrCode BundleMgrClient::InstallSandboxApp(const std::string &bundleName, int32_ int32_t &appIndex) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SANDBOX_INSTALL_INTERNAL_ERROR; } return impl_->InstallSandboxApp(bundleName, dlpType, userId, appIndex); @@ -166,7 +166,7 @@ ErrCode BundleMgrClient::GetSandboxBundleInfo( const std::string &bundleName, int32_t appIndex, int32_t userId, BundleInfo &info) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SANDBOX_QUERY_INTERNAL_ERROR; } return impl_->GetSandboxBundleInfo(bundleName, appIndex, userId, info); @@ -176,7 +176,7 @@ ErrCode BundleMgrClient::GetSandboxAbilityInfo(const Want &want, int32_t appInde AbilityInfo &abilityInfo) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SANDBOX_QUERY_INTERNAL_ERROR; } return impl_->GetSandboxAbilityInfo(want, appIndex, flags, userId, abilityInfo); @@ -186,7 +186,7 @@ ErrCode BundleMgrClient::GetSandboxExtAbilityInfos(const Want &want, int32_t app std::vector &extensionInfos) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SANDBOX_QUERY_INTERNAL_ERROR; } return impl_->GetSandboxExtAbilityInfos(want, appIndex, flags, userId, extensionInfos); @@ -196,7 +196,7 @@ ErrCode BundleMgrClient::GetSandboxHapModuleInfo(const AbilityInfo &abilityInfo, HapModuleInfo &hapModuleInfo) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SANDBOX_QUERY_INTERNAL_ERROR; } return impl_->GetSandboxHapModuleInfo(abilityInfo, appIndex, userId, hapModuleInfo); @@ -206,7 +206,7 @@ ErrCode BundleMgrClient::GetDirByBundleNameAndAppIndex(const std::string &bundle std::string &dataDir) { if (impl_ == nullptr) { - APP_LOGE("Bundle mgr client impl is nullptr"); + APP_LOGE("null impl_"); return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; } return impl_->GetDirByBundleNameAndAppIndex(bundleName, appIndex, dataDir); -- Gitee