From 783920ebf57de55f0671769e9868348fdab87b66 Mon Sep 17 00:00:00 2001 From: dujingcheng Date: Thu, 2 Mar 2023 03:52:01 +0000 Subject: [PATCH] test Signed-off-by: dujingcheng --- frameworks/resmgr/src/hap_manager.cpp | 2 ++ frameworks/resmgr/src/hap_resource.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frameworks/resmgr/src/hap_manager.cpp b/frameworks/resmgr/src/hap_manager.cpp index 29e594e..2438d67 100644 --- a/frameworks/resmgr/src/hap_manager.cpp +++ b/frameworks/resmgr/src/hap_manager.cpp @@ -380,6 +380,7 @@ std::vector HapManager::GetResourceListByName(con bool HapManager::AddResourcePath(const char *path) { + HILOG_INFO("AddResourcePath %{public}s", path); std::string sPath(path); auto it = loadedHapPaths_.find(sPath); if (it != loadedHapPaths_.end()) { @@ -388,6 +389,7 @@ bool HapManager::AddResourcePath(const char *path) } const HapResource *pResource = HapResource::Load(path, resConfig_); if (pResource == nullptr) { + HILOG_ERROR("AddResourcePath Load failed %{public}s", path); #if !defined(__WINNT__) && !defined(__IDE_PREVIEW__) && !defined(__ARKUI_CROSS__) ReportAddResourcePathFail(path, "AddResourcePath failed"); #endif diff --git a/frameworks/resmgr/src/hap_resource.cpp b/frameworks/resmgr/src/hap_resource.cpp index c2d00b3..6c6c8f1 100644 --- a/frameworks/resmgr/src/hap_resource.cpp +++ b/frameworks/resmgr/src/hap_resource.cpp @@ -145,6 +145,7 @@ const HapResource* HapResource::Load(const char *path, const ResConfigImpl* defa const HapResource* HapResource::LoadFromIndex(const char *path, const ResConfigImpl *defaultConfig, bool system) { + HILOG_INFO("LoadFromIndex %{public}s", path); char outPath[PATH_MAX + 1] = {0}; CanonicalizePath(path, outPath, PATH_MAX); std::ifstream inFile(outPath, std::ios::binary | std::ios::in); @@ -168,7 +169,7 @@ const HapResource* HapResource::LoadFromIndex(const char *path, const ResConfigI inFile.read(static_cast(buf), bufLen); inFile.close(); - HILOG_DEBUG("extract success, bufLen:%d", bufLen); + HILOG_INFO("extract success, bufLen:%d", bufLen); ResDesc *resDesc = new (std::nothrow) ResDesc(); if (resDesc == nullptr) { @@ -200,6 +201,7 @@ const HapResource* HapResource::LoadFromIndex(const char *path, const ResConfigI const HapResource* HapResource::LoadFromHap(const char *path, const ResConfigImpl *defaultConfig, bool system) { + HILOG_INFO("LoadFromHap %{public}s", path); std::unique_ptr tmpBuf; size_t tmpLen; int32_t ret = HapParser::ReadIndexFromFile(path, tmpBuf, tmpLen); -- Gitee