• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "inner_event_report.h"
17 
18 #include "app_log_wrapper.h"
19 #include "hisysevent.h"
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 namespace {
24 // event type
25 const std::string BUNDLE_INSTALL_EXCEPTION = "BUNDLE_INSTALL_EXCEPTION";
26 const std::string BUNDLE_UNINSTALL_EXCEPTION = "BUNDLE_UNINSTALL_EXCEPTION";
27 const std::string BUNDLE_UPDATE_EXCEPTION = "BUNDLE_UPDATE_EXCEPTION";
28 const std::string PRE_BUNDLE_RECOVER_EXCEPTION = "PRE_BUNDLE_RECOVER_EXCEPTION";
29 const std::string BUNDLE_STATE_CHANGE_EXCEPTION = "BUNDLE_STATE_CHANGE_EXCEPTION";
30 const std::string BUNDLE_CLEAN_CACHE_EXCEPTION = "BUNDLE_CLEAN_CACHE_EXCEPTION";
31 
32 const std::string BOOT_SCAN_START = "BOOT_SCAN_START";
33 const std::string BOOT_SCAN_END = "BOOT_SCAN_END";
34 const std::string BUNDLE_INSTALL = "BUNDLE_INSTALL";
35 const std::string BUNDLE_UNINSTALL = "BUNDLE_UNINSTALL";
36 const std::string BUNDLE_UPDATE = "BUNDLE_UPDATE";
37 const std::string PRE_BUNDLE_RECOVER = "PRE_BUNDLE_RECOVER";
38 const std::string BUNDLE_STATE_CHANGE = "BUNDLE_STATE_CHANGE";
39 const std::string BUNDLE_CLEAN_CACHE = "BUNDLE_CLEAN_CACHE";
40 const std::string BMS_USER_EVENT = "BMS_USER_EVENT";
41 const std::string BUNDLE_QUICK_FIX = "BUNDLE_QUICK_FIX";
42 
43 // event params
44 const std::string EVENT_PARAM_USERID = "USERID";
45 const std::string EVENT_PARAM_UID = "UID";
46 const std::string EVENT_PARAM_BUNDLE_NAME = "BUNDLE_NAME";
47 const std::string EVENT_PARAM_ERROR_CODE = "ERROR_CODE";
48 const std::string EVENT_PARAM_ABILITY_NAME = "ABILITY_NAME";
49 const std::string EVENT_PARAM_TIME = "TIME";
50 const std::string EVENT_PARAM_VERSION = "VERSION";
51 const std::string EVENT_PARAM_SCENE = "SCENE";
52 const std::string EVENT_PARAM_CLEAN_TYPE = "CLEAN_TYPE";
53 const std::string EVENT_PARAM_INSTALL_TYPE = "INSTALL_TYPE";
54 const std::string EVENT_PARAM_STATE = "STATE";
55 const std::string EVENT_PARAM_CALLING_BUNDLE_NAME = "CALLING_BUNDLE_NAME";
56 const std::string EVENT_PARAM_CALLING_UID = "CALLING_UID";
57 const std::string EVENT_PARAM_CALLING_APPID = "CALLING_APPID";
58 const std::string EVENT_PARAM_FINGERPRINT = "FINGERPRINT";
59 const std::string EVENT_PARAM_HIDE_DESKTOP_ICON = "HIDE_DESKTOP_ICON";
60 const std::string EVENT_PARAM_APP_DISTRIBUTION_TYPE = "APP_DISTRIBUTION_TYPE";
61 const std::string EVENT_PARAM_FILE_PATH = "FILE_PATH";
62 const std::string EVENT_PARAM_HASH_VALUE = "HASH_VALUE";
63 const std::string EVENT_PARAM_INSTALL_TIME = "INSTALL_TIME";
64 const std::string EVENT_PARAM_APPLY_QUICK_FIX_FREQUENCY = "APPLY_QUICK_FIX_FREQUENCY";
65 
66 const std::string FREE_INSTALL_TYPE = "FreeInstall";
67 const std::string PRE_BUNDLE_INSTALL_TYPE = "PreBundleInstall";
68 const std::string NORMAL_INSTALL_TYPE = "normalInstall";
69 const std::string NORMAL_SCENE = "Normal";
70 const std::string BOOT_SCENE = "Boot";
71 const std::string REBOOT_SCENE = "Reboot";
72 const std::string CREATE_USER_SCENE = "CreateUser";
73 const std::string REMOVE_USER_SCENE = "RemoveUser";
74 const std::string CLEAN_CACHE = "cleanCache";
75 const std::string CLEAN_DATA = "cleanData";
76 const std::string ENABLE = "enable";
77 const std::string DISABLE = "disable";
78 const std::string APPLICATION = "application";
79 const std::string ABILITY = "ability";
80 const std::string TYPE = "TYPE";
81 const std::string UNKNOW = "Unknow";
82 const std::string CREATE_START = "CreateUserStart";
83 const std::string CREATE_END = "CreateUserEnd";
84 const std::string REMOVE_START = "RemoveUserStart";
85 const std::string REMOVE_END = "RemoveUserEnd";
86 
87 const std::unordered_map<InstallScene, std::string> INSTALL_SCENE_STR_MAP = {
88     { InstallScene::NORMAL, NORMAL_SCENE },
89     { InstallScene::BOOT, BOOT_SCENE },
90     { InstallScene::REBOOT, REBOOT_SCENE },
91     { InstallScene::CREATE_USER, CREATE_USER_SCENE },
92     { InstallScene::REMOVE_USER, REMOVE_USER_SCENE },
93 };
94 
95 const std::unordered_map<UserEventType, std::string> USER_TYPE_STR_MAP = {
96     { UserEventType::CREATE_START, CREATE_START },
97     { UserEventType::CREATE_END, CREATE_END },
98     { UserEventType::REMOVE_START, REMOVE_START },
99     { UserEventType::REMOVE_END, REMOVE_END },
100 };
101 
GetInstallType(const EventInfo & eventInfo)102 std::string GetInstallType(const EventInfo& eventInfo)
103 {
104     std::string installType = NORMAL_INSTALL_TYPE;
105     if (eventInfo.isFreeInstallMode) {
106         installType = FREE_INSTALL_TYPE;
107     } else if (eventInfo.isPreInstallApp) {
108         installType = PRE_BUNDLE_INSTALL_TYPE;
109     }
110 
111     return installType;
112 }
113 
GetInstallScene(const EventInfo & eventInfo)114 std::string GetInstallScene(const EventInfo& eventInfo)
115 {
116     std::string installScene = NORMAL_SCENE;
117     auto iter = INSTALL_SCENE_STR_MAP.find(eventInfo.preBundleScene);
118     if (iter != INSTALL_SCENE_STR_MAP.end()) {
119         installScene = iter->second;
120     }
121 
122     return installScene;
123 }
124 
GetUserEventType(const EventInfo & eventInfo)125 std::string GetUserEventType(const EventInfo& eventInfo)
126 {
127     std::string type = UNKNOW;
128     auto iter = USER_TYPE_STR_MAP.find(eventInfo.userEventType);
129     if (iter != USER_TYPE_STR_MAP.end()) {
130         type = iter->second;
131     }
132 
133     return type;
134 }
135 }
136 
137 std::unordered_map<BMSEventType, void (*)(const EventInfo& eventInfo)>
138     InnerEventReport::bmsSysEventMap_ = {
139         { BMSEventType::BUNDLE_INSTALL_EXCEPTION,
__anond14319ca0202() 140             [](const EventInfo& eventInfo) {
141                 InnerSendBundleInstallExceptionEvent(eventInfo);
142             } },
143         { BMSEventType::BUNDLE_UNINSTALL_EXCEPTION,
__anond14319ca0302() 144             [](const EventInfo& eventInfo) {
145                 InnerSendBundleUninstallExceptionEvent(eventInfo);
146             } },
147         { BMSEventType::BUNDLE_UPDATE_EXCEPTION,
__anond14319ca0402() 148             [](const EventInfo& eventInfo) {
149                 InnerSendBundleUpdateExceptionEvent(eventInfo);
150             } },
151         { BMSEventType::PRE_BUNDLE_RECOVER_EXCEPTION,
__anond14319ca0502() 152             [](const EventInfo& eventInfo) {
153                 InnerSendPreBundleRecoverExceptionEvent(eventInfo);
154             } },
155         { BMSEventType::BUNDLE_STATE_CHANGE_EXCEPTION,
__anond14319ca0602() 156             [](const EventInfo& eventInfo) {
157                 InnerSendBundleStateChangeExceptionEvent(eventInfo);
158             } },
159         { BMSEventType::BUNDLE_CLEAN_CACHE_EXCEPTION,
__anond14319ca0702() 160             [](const EventInfo& eventInfo) {
161                 InnerSendBundleCleanCacheExceptionEvent(eventInfo);
162             } },
163         { BMSEventType::BOOT_SCAN_START,
__anond14319ca0802() 164             [](const EventInfo& eventInfo) {
165                 InnerSendBootScanStartEvent(eventInfo);
166             } },
167         { BMSEventType::BOOT_SCAN_END,
__anond14319ca0902() 168             [](const EventInfo& eventInfo) {
169                 InnerSendBootScanEndEvent(eventInfo);
170             } },
171         { BMSEventType::BUNDLE_INSTALL,
__anond14319ca0a02() 172             [](const EventInfo& eventInfo) {
173                 InnerSendBundleInstallEvent(eventInfo);
174             } },
175         { BMSEventType::BUNDLE_UNINSTALL,
__anond14319ca0b02() 176             [](const EventInfo& eventInfo) {
177                 InnerSendBundleUninstallEvent(eventInfo);
178             } },
179         { BMSEventType::BUNDLE_UPDATE,
__anond14319ca0c02() 180             [](const EventInfo& eventInfo) {
181                 InnerSendBundleUpdateEvent(eventInfo);
182             } },
183         { BMSEventType::PRE_BUNDLE_RECOVER,
__anond14319ca0d02() 184             [](const EventInfo& eventInfo) {
185                 InnerSendPreBundleRecoverEvent(eventInfo);
186             } },
187         { BMSEventType::BUNDLE_STATE_CHANGE,
__anond14319ca0e02() 188             [](const EventInfo& eventInfo) {
189                 InnerSendBundleStateChangeEvent(eventInfo);
190             } },
191         { BMSEventType::BUNDLE_CLEAN_CACHE,
__anond14319ca0f02() 192             [](const EventInfo& eventInfo) {
193                 InnerSendBundleCleanCacheEvent(eventInfo);
194             } },
195         { BMSEventType::BMS_USER_EVENT,
__anond14319ca1002() 196             [](const EventInfo& eventInfo) {
197                 InnerSendUserEvent(eventInfo);
198             } },
199         { BMSEventType::APPLY_QUICK_FIX,
__anond14319ca1102() 200             [](const EventInfo& eventInfo) {
201                 InnerSendQuickFixEvent(eventInfo);
202             } }
203     };
204 
SendSystemEvent(BMSEventType bmsEventType,const EventInfo & eventInfo)205 void InnerEventReport::SendSystemEvent(BMSEventType bmsEventType, const EventInfo& eventInfo)
206 {
207     auto iter = bmsSysEventMap_.find(bmsEventType);
208     if (iter == bmsSysEventMap_.end()) {
209         return;
210     }
211 
212     iter->second(eventInfo);
213 }
214 
InnerSendBundleInstallExceptionEvent(const EventInfo & eventInfo)215 void InnerEventReport::InnerSendBundleInstallExceptionEvent(const EventInfo& eventInfo)
216 {
217     InnerEventWrite(
218         BUNDLE_INSTALL_EXCEPTION,
219         HiSysEventType::FAULT,
220         EVENT_PARAM_USERID, eventInfo.userId,
221         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
222         EVENT_PARAM_VERSION, eventInfo.versionCode,
223         EVENT_PARAM_INSTALL_TYPE, GetInstallType(eventInfo),
224         EVENT_PARAM_SCENE, GetInstallScene(eventInfo),
225         EVENT_PARAM_ERROR_CODE, eventInfo.errCode);
226 }
227 
InnerSendBundleUninstallExceptionEvent(const EventInfo & eventInfo)228 void InnerEventReport::InnerSendBundleUninstallExceptionEvent(const EventInfo& eventInfo)
229 {
230     InnerEventWrite(
231         BUNDLE_UNINSTALL_EXCEPTION,
232         HiSysEventType::FAULT,
233         EVENT_PARAM_USERID, eventInfo.userId,
234         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
235         EVENT_PARAM_VERSION, eventInfo.versionCode,
236         EVENT_PARAM_INSTALL_TYPE, GetInstallType(eventInfo),
237         EVENT_PARAM_ERROR_CODE, eventInfo.errCode);
238 }
239 
InnerSendBundleUpdateExceptionEvent(const EventInfo & eventInfo)240 void InnerEventReport::InnerSendBundleUpdateExceptionEvent(const EventInfo& eventInfo)
241 {
242     InnerEventWrite(
243         BUNDLE_UPDATE_EXCEPTION,
244         HiSysEventType::FAULT,
245         EVENT_PARAM_USERID, eventInfo.userId,
246         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
247         EVENT_PARAM_VERSION, eventInfo.versionCode,
248         EVENT_PARAM_INSTALL_TYPE, GetInstallType(eventInfo),
249         EVENT_PARAM_ERROR_CODE, eventInfo.errCode);
250 }
251 
InnerSendPreBundleRecoverExceptionEvent(const EventInfo & eventInfo)252 void InnerEventReport::InnerSendPreBundleRecoverExceptionEvent(const EventInfo& eventInfo)
253 {
254     InnerEventWrite(
255         PRE_BUNDLE_RECOVER_EXCEPTION,
256         HiSysEventType::FAULT,
257         EVENT_PARAM_USERID, eventInfo.userId,
258         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
259         EVENT_PARAM_VERSION, eventInfo.versionCode,
260         EVENT_PARAM_INSTALL_TYPE, PRE_BUNDLE_INSTALL_TYPE,
261         EVENT_PARAM_ERROR_CODE, eventInfo.errCode);
262 }
263 
InnerSendBundleStateChangeExceptionEvent(const EventInfo & eventInfo)264 void InnerEventReport::InnerSendBundleStateChangeExceptionEvent(const EventInfo& eventInfo)
265 {
266     std::string type = eventInfo.abilityName.empty() ? APPLICATION : ABILITY;
267     InnerEventWrite(
268         BUNDLE_STATE_CHANGE_EXCEPTION,
269         HiSysEventType::FAULT,
270         EVENT_PARAM_USERID, eventInfo.userId,
271         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
272         EVENT_PARAM_ABILITY_NAME, eventInfo.abilityName,
273         TYPE, type);
274 }
275 
InnerSendBundleCleanCacheExceptionEvent(const EventInfo & eventInfo)276 void InnerEventReport::InnerSendBundleCleanCacheExceptionEvent(const EventInfo& eventInfo)
277 {
278     std::string cleanType = eventInfo.isCleanCache ? CLEAN_CACHE : CLEAN_DATA;
279     InnerEventWrite(
280         BUNDLE_CLEAN_CACHE_EXCEPTION,
281         HiSysEventType::FAULT,
282         EVENT_PARAM_USERID, eventInfo.userId,
283         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
284         EVENT_PARAM_CLEAN_TYPE, cleanType);
285 }
286 
InnerSendBootScanStartEvent(const EventInfo & eventInfo)287 void InnerEventReport::InnerSendBootScanStartEvent(const EventInfo& eventInfo)
288 {
289     InnerEventWrite(
290         BOOT_SCAN_START,
291         HiSysEventType::BEHAVIOR,
292         EVENT_PARAM_TIME, eventInfo.timeStamp);
293 }
294 
InnerSendBootScanEndEvent(const EventInfo & eventInfo)295 void InnerEventReport::InnerSendBootScanEndEvent(const EventInfo& eventInfo)
296 {
297     InnerEventWrite(
298         BOOT_SCAN_END,
299         HiSysEventType::BEHAVIOR,
300         EVENT_PARAM_TIME, eventInfo.timeStamp);
301 }
302 
InnerSendBundleInstallEvent(const EventInfo & eventInfo)303 void InnerEventReport::InnerSendBundleInstallEvent(const EventInfo& eventInfo)
304 {
305     InnerEventWrite(
306         BUNDLE_INSTALL,
307         HiSysEventType::BEHAVIOR,
308         EVENT_PARAM_USERID, eventInfo.userId,
309         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
310         EVENT_PARAM_VERSION, eventInfo.versionCode,
311         EVENT_PARAM_APP_DISTRIBUTION_TYPE, eventInfo.appDistributionType,
312         EVENT_PARAM_INSTALL_TIME, eventInfo.timeStamp,
313         EVENT_PARAM_CALLING_UID, eventInfo.callingUid,
314         EVENT_PARAM_CALLING_APPID, eventInfo.callingAppId,
315         EVENT_PARAM_CALLING_BUNDLE_NAME, eventInfo.callingBundleName,
316         EVENT_PARAM_FILE_PATH, eventInfo.filePath,
317         EVENT_PARAM_HASH_VALUE, eventInfo.hashValue,
318         EVENT_PARAM_FINGERPRINT, eventInfo.fingerprint,
319         EVENT_PARAM_HIDE_DESKTOP_ICON, eventInfo.hideDesktopIcon,
320         EVENT_PARAM_INSTALL_TYPE, GetInstallType(eventInfo),
321         EVENT_PARAM_SCENE, GetInstallScene(eventInfo));
322 }
323 
InnerSendBundleUninstallEvent(const EventInfo & eventInfo)324 void InnerEventReport::InnerSendBundleUninstallEvent(const EventInfo& eventInfo)
325 {
326     InnerEventWrite(
327         BUNDLE_UNINSTALL,
328         HiSysEventType::BEHAVIOR,
329         EVENT_PARAM_USERID, eventInfo.userId,
330         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
331         EVENT_PARAM_VERSION, eventInfo.versionCode,
332         EVENT_PARAM_CALLING_UID, eventInfo.callingUid,
333         EVENT_PARAM_CALLING_APPID, eventInfo.callingAppId,
334         EVENT_PARAM_CALLING_BUNDLE_NAME, eventInfo.callingBundleName,
335         EVENT_PARAM_INSTALL_TYPE, GetInstallType(eventInfo));
336 }
337 
InnerSendBundleUpdateEvent(const EventInfo & eventInfo)338 void InnerEventReport::InnerSendBundleUpdateEvent(const EventInfo& eventInfo)
339 {
340     InnerEventWrite(
341         BUNDLE_UPDATE,
342         HiSysEventType::BEHAVIOR,
343         EVENT_PARAM_USERID, eventInfo.userId,
344         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
345         EVENT_PARAM_VERSION, eventInfo.versionCode,
346         EVENT_PARAM_APP_DISTRIBUTION_TYPE, eventInfo.appDistributionType,
347         EVENT_PARAM_INSTALL_TIME, eventInfo.timeStamp,
348         EVENT_PARAM_CALLING_UID, eventInfo.callingUid,
349         EVENT_PARAM_CALLING_APPID, eventInfo.callingAppId,
350         EVENT_PARAM_CALLING_BUNDLE_NAME, eventInfo.callingBundleName,
351         EVENT_PARAM_FILE_PATH, eventInfo.filePath,
352         EVENT_PARAM_HASH_VALUE, eventInfo.hashValue,
353         EVENT_PARAM_FINGERPRINT, eventInfo.fingerprint,
354         EVENT_PARAM_HIDE_DESKTOP_ICON, eventInfo.hideDesktopIcon,
355         EVENT_PARAM_INSTALL_TYPE, GetInstallType(eventInfo));
356 }
357 
InnerSendPreBundleRecoverEvent(const EventInfo & eventInfo)358 void InnerEventReport::InnerSendPreBundleRecoverEvent(const EventInfo& eventInfo)
359 {
360     InnerEventWrite(
361         PRE_BUNDLE_RECOVER,
362         HiSysEventType::BEHAVIOR,
363         EVENT_PARAM_USERID, eventInfo.userId,
364         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
365         EVENT_PARAM_VERSION, eventInfo.versionCode,
366         EVENT_PARAM_APP_DISTRIBUTION_TYPE, eventInfo.appDistributionType,
367         EVENT_PARAM_INSTALL_TIME, eventInfo.timeStamp,
368         EVENT_PARAM_CALLING_UID, eventInfo.callingUid,
369         EVENT_PARAM_CALLING_APPID, eventInfo.callingAppId,
370         EVENT_PARAM_CALLING_BUNDLE_NAME, eventInfo.callingBundleName,
371         EVENT_PARAM_FINGERPRINT, eventInfo.fingerprint,
372         EVENT_PARAM_HIDE_DESKTOP_ICON, eventInfo.hideDesktopIcon,
373         EVENT_PARAM_INSTALL_TYPE, PRE_BUNDLE_INSTALL_TYPE);
374 }
375 
InnerSendBundleStateChangeEvent(const EventInfo & eventInfo)376 void InnerEventReport::InnerSendBundleStateChangeEvent(const EventInfo& eventInfo)
377 {
378     std::string type = eventInfo.abilityName.empty() ? APPLICATION : ABILITY;
379     std::string state = eventInfo.isEnable ? ENABLE : DISABLE;
380     InnerEventWrite(
381         BUNDLE_STATE_CHANGE,
382         HiSysEventType::BEHAVIOR,
383         EVENT_PARAM_USERID, eventInfo.userId,
384         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
385         EVENT_PARAM_ABILITY_NAME, eventInfo.abilityName,
386         TYPE, type,
387         EVENT_PARAM_STATE, state);
388 }
389 
InnerSendBundleCleanCacheEvent(const EventInfo & eventInfo)390 void InnerEventReport::InnerSendBundleCleanCacheEvent(const EventInfo& eventInfo)
391 {
392     std::string cleanType = eventInfo.isCleanCache ? CLEAN_CACHE : CLEAN_DATA;
393     InnerEventWrite(
394         BUNDLE_CLEAN_CACHE,
395         HiSysEventType::BEHAVIOR,
396         EVENT_PARAM_USERID, eventInfo.userId,
397         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
398         EVENT_PARAM_CLEAN_TYPE, cleanType);
399 }
400 
InnerSendUserEvent(const EventInfo & eventInfo)401 void InnerEventReport::InnerSendUserEvent(const EventInfo& eventInfo)
402 {
403     InnerEventWrite(
404         BMS_USER_EVENT,
405         HiSysEventType::BEHAVIOR,
406         TYPE, GetUserEventType(eventInfo),
407         EVENT_PARAM_USERID, eventInfo.userId,
408         EVENT_PARAM_TIME, eventInfo.timeStamp);
409 }
410 
InnerSendQuickFixEvent(const EventInfo & eventInfo)411 void InnerEventReport::InnerSendQuickFixEvent(const EventInfo& eventInfo)
412 {
413     InnerEventWrite(
414         BUNDLE_QUICK_FIX,
415         HiSysEventType::BEHAVIOR,
416         EVENT_PARAM_BUNDLE_NAME, eventInfo.bundleName,
417         EVENT_PARAM_APP_DISTRIBUTION_TYPE, eventInfo.appDistributionType,
418         EVENT_PARAM_APPLY_QUICK_FIX_FREQUENCY, eventInfo.applyQuickFixFrequency,
419         EVENT_PARAM_FILE_PATH, eventInfo.filePath,
420         EVENT_PARAM_HASH_VALUE, eventInfo.hashValue);
421 }
422 
423 template<typename... Types>
InnerEventWrite(const std::string & eventName,HiSysEventType type,Types...keyValues)424 void InnerEventReport::InnerEventWrite(
425     const std::string &eventName,
426     HiSysEventType type,
427     Types... keyValues)
428 {
429     HiSysEventWrite(
430         OHOS::HiviewDFX::HiSysEvent::Domain::BUNDLE_MANAGER,
431         eventName,
432         static_cast<OHOS::HiviewDFX::HiSysEvent::EventType>(type),
433         keyValues...);
434 }
435 }  // namespace AppExecFwk
436 }  // namespace OHOS