!7493 添加包扫描开始与结束的打点

Merge pull request !7493 from weimingjin/master
This commit is contained in:
openharmony_ci 2024-11-21 07:20:52 +00:00 committed by Gitee
commit 3a85a1ed06
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 11 additions and 1 deletions

View File

@ -14,4 +14,5 @@
const.bms.optimizing_apps.switch = foundation:foundation:0755
bms.optimizing_apps.status = foundation:foundation:0755
bootevent.bms.main.bundles.ready = foundation:foundation:0755
persist.bms.data.preload = foundation:foundation:0755
persist.bms.data.preload = foundation:foundation:0755
bms.scanning_apps.status = foundation:foundation:0755

View File

@ -109,6 +109,9 @@ constexpr const char* SYSTEM_RESOURCES_APP = "ohos.global.systemres";
constexpr const char* FOUNDATION_PROCESS_NAME = "foundation";
constexpr int32_t SCENE_ID_OTA_INSTALL = 3;
constexpr const char* PGO_FILE_PATH = "pgo_files";
constexpr const char* BUNDLE_SCAN_PARAM = "bms.scanning_apps.status";
constexpr const char* BUNDLE_SCAN_START = "0";
constexpr const char* BUNDLE_SCAN_FINISH = "1";
std::set<PreScanInfo> installList_;
std::set<PreScanInfo> systemHspList_;
@ -209,6 +212,9 @@ void BMSEventHandler::BeforeBmsStart()
}
EventReport::SendScanSysEvent(BMSEventType::BOOT_SCAN_START);
if (SetParameter(BUNDLE_SCAN_PARAM, BUNDLE_SCAN_START) != 0) {
LOG_E(BMS_TAG_DEFAULT, "set bms.scanning_apps.status 0 failed");
}
}
void BMSEventHandler::OnBmsStarting()
@ -285,6 +291,9 @@ void BMSEventHandler::AfterBmsStart()
CleanTempDir();
DelayedSingleton<BundleMgrService>::GetInstance()->RegisterService();
EventReport::SendScanSysEvent(BMSEventType::BOOT_SCAN_END);
if (SetParameter(BUNDLE_SCAN_PARAM, BUNDLE_SCAN_FINISH) != 0) {
LOG_E(BMS_TAG_DEFAULT, "set bms.scanning_apps.status 1 failed");
}
ClearCache();
if (needNotifyBundleScanStatus_) {
DelayedSingleton<BundleMgrService>::GetInstance()->NotifyBundleScanStatus();