From 35ded7a219892848c6830ca1eec9955b3cd7644d Mon Sep 17 00:00:00 2001 From: shilei Date: Sat, 27 May 2023 10:18:00 +0000 Subject: [PATCH] fix installatin timeout problem Signed-off-by: shilei Change-Id: I040397a56eb3fd6454c182a68f5f4ad6c5fe87fd --- services/bundlemgr_lite/src/gt_bundle_extractor.cpp | 7 ++++++- services/bundlemgr_lite/src/gt_bundle_parser.cpp | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/services/bundlemgr_lite/src/gt_bundle_extractor.cpp b/services/bundlemgr_lite/src/gt_bundle_extractor.cpp index 32de443..c83c377 100644 --- a/services/bundlemgr_lite/src/gt_bundle_extractor.cpp +++ b/services/bundlemgr_lite/src/gt_bundle_extractor.cpp @@ -145,7 +145,9 @@ bool GtBundleExtractor::ExtractResourceFile(const char *path, int32_t fp, uint32 HILOG_ERROR(HILOG_MODULE_AAFWK, "[BMS] extract file data pos failed!"); return false; } - +#ifdef _MINI_BMS_PERMISSION_ + RefreshAllServiceTimeStamp(); +#endif while (index < totalFileSize) { if (GtExtractorUtil::ExtractFileAttr(fp, &fileName, &relativeFilePath, fileSize) != ERR_OK) { HILOG_ERROR(HILOG_MODULE_AAFWK, "[BMS] get file attr failed!"); @@ -183,6 +185,9 @@ bool GtBundleExtractor::ExtractResourceFile(const char *path, int32_t fp, uint32 uint8_t GtBundleExtractor::ExtractInstallMsg(const char *path, char **bundleName, char **label, char **smallIconPath, char **bigIconPath) { +#ifdef _MINI_BMS_PERMISSION_ + RefreshAllServiceTimeStamp(); +#endif if (!BundleUtil::CheckRealPath(path)) { return ERR_APPEXECFWK_INSTALL_FAILED_PARAM_ERROR; } diff --git a/services/bundlemgr_lite/src/gt_bundle_parser.cpp b/services/bundlemgr_lite/src/gt_bundle_parser.cpp index 91d2e09..6787af8 100644 --- a/services/bundlemgr_lite/src/gt_bundle_parser.cpp +++ b/services/bundlemgr_lite/src/gt_bundle_parser.cpp @@ -398,7 +398,9 @@ BundleInfo *GtBundleParser::CreateBundleInfo(const char *path, const BundleProfi BundleInfoUtils::FreeBundleInfo(bundleInfo); return nullptr; } - +#ifdef _MINI_BMS_PERMISSION_ + RefreshAllServiceTimeStamp(); +#endif uint8_t errorCode = ConvertResInfoToBundleInfo(path, bundleRes.abilityRes->labelId, bundleRes.abilityRes->iconId, bundleInfo); if (errorCode != ERR_OK) { -- Gitee