• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 #ifndef FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_SERVICE_EVENT_HANDLER_H
17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_SERVICE_EVENT_HANDLER_H
18 
19 #include <list>
20 #include <unordered_set>
21 
22 #include "bundle_constants.h"
23 #include "bundle_data_mgr.h"
24 #include "bundle_mgr_host_impl.h"
25 #include "pre_scan_info.h"
26 #include "nlohmann/json.hpp"
27 
28 namespace OHOS {
29 namespace AppExecFwk {
30 class BundleMgrService;
31 enum class ScanMode;
32 enum class ResultMode;
33 
34 enum class ResultCode {
35     RECOVER_OK = 0,
36     REINSTALL_OK,
37     NO_INSTALLED_DATA,
38     SYSTEM_ERROR,
39 };
40 
41 enum OTAFlag {
42     CHECK_ELDIR = 0x00000001,
43     CHECK_LOG_DIR = 0x00000010,
44     CHECK_FILE_MANAGER_DIR = 0x00000100,
45     CHECK_SHADER_CAHCE_DIR = 0x00000200,
46     CHECK_PREINSTALL_DATA = 0x00000400,
47     CHECK_CLOUD_SHADER_DIR = 0x00000800,
48     CHECK_BACK_UP_DIR = 0x00001000,
49     CHECK_RECOVERABLE_APPLICATION_INFO = 0x00002000,
50     CHECK_INSTALL_SOURCE = 0x00004000,
51 };
52 
53 enum class ScanResultCode {
54     SCAN_HAS_DATA_PARSE_SUCCESS,
55     SCAN_HAS_DATA_PARSE_FAILED,
56     SCAN_NO_DATA,
57 };
58 
59 class BMSEventHandler {
60 public:
61     BMSEventHandler();
62     ~BMSEventHandler();
63     /**
64      * @brief Get preInstall root dir list,
65      *        which the catalog of production has higher priority.
66      * @param rootDirList Indicates the root dir list.
67      * @return
68      */
69     static void GetPreInstallRootDirList(std::vector<std::string> &rootDirList);
70     /**
71      * @brief Load all preInstall infos from proFile.
72      * @return Returns true if get the preInstall list successfully; returns false otherwise.
73      */
74     static bool LoadPreInstallProFile();
75     /**
76      * @brief Clear all preInstall infos cache.
77      * @return
78      */
79     static void ClearPreInstallCache();
80     /**
81      * @brief Get the preInstall capability.
82      * @param preBundleConfigInfo Indicates the preBundleConfigInfo.
83      * @return Returns true if get the preInstall capability successfully; returns false otherwise.
84      */
85     static bool GetPreInstallCapability(PreBundleConfigInfo &preBundleConfigInfo);
86     /**
87      * @brief Check extension type name in the configuration file.
88      * @param extensionTypeName Indicates the extensionTypeName to check in the configuration file.
89      * @return Returns true if the extensionTypeName is in the configuration file; returns false otherwise.
90      */
91     static bool CheckExtensionTypeInConfig(const std::string &extensionTypeName);
92     /**
93      * @brief Has preInstall profile or not.
94      * @return Returns result.
95      */
96     static bool HasPreInstallProfile();
97     /**
98      * @brief Bms start event.
99      * @return
100      */
101     void BmsStartEvent();
102 
103     static void ProcessRebootQuickFixBundleInstall(const std::string &path, bool isOta);
104 
105     static void ProcessRebootQuickFixUnInstallAndRecover(const std::string &path);
106 
107     static void SavePreInstallException(const std::string &bundleDir);
108 
109     static void ProcessSystemBundleInstall(
110         const PreScanInfo &preScanInfo,
111         Constants::AppType appType,
112         int32_t userId = Constants::UNSPECIFIED_USERID);
113 
114 private:
115     /**
116      * @brief Before Bms start.
117      * @return
118      */
119     void BeforeBmsStart();
120     /**
121      * @brief On Bms starting.
122      * @return
123      */
124     void OnBmsStarting();
125     /**
126      * @brief After Bms start.
127      * @return
128      */
129     void AfterBmsStart();
130     /**
131      * @brief Load install infos from db.
132      * @return Returns true if load successfully; returns false otherwise.
133      */
134     bool LoadInstallInfosFromDb();
135     /**
136      * @brief Guard against install infos lossed strategy.
137      * @return Returns ResultCode for recover install infos.
138      */
139     ResultCode GuardAgainstInstallInfosLossedStrategy();
140     /**
141      * @brief Scan and analyze install infos.
142      * @param installInfos Indicates the install infos.
143      * @return
144      */
145     void ScanAndAnalyzeInstallInfos(
146         std::map<std::string, std::vector<InnerBundleInfo>> &installInfos);
147     /**
148      * @brief Scan and analyze common install dir.
149      * @param installInfos Indicates the install infos.
150      * @return
151      */
152     void ScanInstallDir(
153         std::map<std::string, std::vector<std::string>> &hapPathsMap);
154     /**
155      * @brief Get preInstall haps.
156      * @param bundleDirs Indicates preInstall hapPath.
157      * @return
158      */
159     void GetPreInstallDir(std::vector<std::string> &bundleDirs);
160     /**
161      * @brief Analyze hap to InnerBundleInfo.
162      * @param isPreInstallApp Indicates is preInstallApp or not.
163      * @param hapPathsMap Indicates the hapPathsMap which will be analyzed.
164      * @param installInfos Indicates the install infos.
165      * @return
166      */
167     void AnalyzeHaps(
168         bool isPreInstallApp,
169         const std::map<std::string, std::vector<std::string>> &hapPathsMap,
170         std::map<std::string, std::vector<InnerBundleInfo>> &installInfos);
171     /**
172      * @brief Analyze hap to InnerBundleInfo.
173      * @param isPreInstallApp Indicates is preInstallApp or not.
174      * @param bundleDirs Indicates the bundleDirs which will be analyzed.
175      * @param installInfos Indicates the install infos.
176      * @return
177      */
178     void AnalyzeHaps(
179         bool isPreInstallApp,
180         const std::vector<std::string> &bundleDirs,
181         std::map<std::string, std::vector<InnerBundleInfo>> &installInfos);
182     /**
183      * @brief Get preBundle install dir.
184      * @param bundleDirs Indicates the bundleDirs.
185      * @return
186      */
187     void GetPreBundleDir(std::list<std::string> &bundleDirs);
188     /**
189      * @brief Check scaned hapPath whether end with .hap.
190      * @param hapPaths Indicates the hapPaths.
191      * @return Returns the checked hapPaths.
192      */
193     std::vector<std::string> CheckHapPaths(const std::vector<std::string> &hapPaths);
194     /**
195      * @brief Collect install infos from parse result.
196      * @param hapInfos Indicates the parse result.
197      * @param installInfos Indicates the saved installInfos.
198      * @return.
199      */
200     void CollectInstallInfos(
201         const std::unordered_map<std::string, InnerBundleInfo> &hapInfos,
202         std::map<std::string, std::vector<InnerBundleInfo>> &installInfos);
203     /**
204      * @brief Scan and analyze userDatas.
205      * @param userMaps Indicates the userMaps to save userInfo.
206      * @return Returns ScanResultCode if Scan and analyze infos successfully; returns false otherwise.
207      */
208     ScanResultCode ScanAndAnalyzeUserDatas(
209         std::map<std::string, std::vector<InnerBundleUserInfo>> &userMaps);
210     /**
211      * @brief Analyze userDatas.
212      * @param userId Indicates the userId.
213      * @param userDataDir Indicates the userDataDir.
214      * @param userDataBundleName Indicates the userDataBundleName.
215      * @param userMaps Indicates the userMaps to save userInfo.
216      * @return Returns true if analyze infos successfully; returns false otherwise.
217      */
218     bool AnalyzeUserData(
219         int32_t userId, const std::string &userDataDir, const std::string &userDataBundleName,
220         std::map<std::string, std::vector<InnerBundleUserInfo>> &userMaps);
221     /**
222      * @brief ReInstall all Apps from installDir.
223      * @return Returns the ResultCode indicates the result of this action.
224      */
225     ResultCode ReInstallAllInstallDirApps();
226     /**
227      * @brief Combine install infos and userInfos.
228      * @param installInfos Indicates the installInfos.
229      * @param userInfoMaps Indicates the userInfoMaps.
230      * @return Returns true if combine infos successfully; returns false otherwise.
231      */
232     bool CombineBundleInfoAndUserInfo(
233         const std::map<std::string, std::vector<InnerBundleInfo>> &installInfos,
234         const std::map<std::string, std::vector<InnerBundleUserInfo>> &userInfoMaps);
235     /**
236      * @brief Save recover info to cache.
237      * @param info Indicates the InnerBundleInfo.
238      * @return
239      */
240     void SaveInstallInfoToCache(InnerBundleInfo &info);
241     /**
242      * @brief Scan dir by scanMode and resultMode, this function will perform
243      *        scan through installd because installd has higher permissions.
244      * @param scanMode Indicates the scanMode,
245      *        which maybe SUB_FILE_ALL SUB_FILE_DIR or SUB_FILE_FILE.
246      * @param resultMode Indicates the resultMode,
247      *        which maybe ABSOLUTE_PATH or RELATIVE_PATH.
248      * @param resultList Indicates the scan resultList.
249      * @return Returns true if Scan successfully; returns false otherwise.
250      */
251     bool ScanDir(const std::string& dir, ScanMode scanMode,
252         ResultMode resultMode, std::vector<std::string> &resultList);
253     /**
254      * @brief Bundle boot start event.
255      * @return
256      */
257     void BundleBootStartEvent();
258     /**
259      * @brief Bundle reboot start event.
260      * @return
261      */
262     void BundleRebootStartEvent();
263     /**
264      * @brief start boot scan.
265      * @param userId Indicates the userId.
266      * @return
267      */
268     void OnBundleBootStart(int32_t userId = Constants::UNSPECIFIED_USERID);
269     /**
270      * @brief Process boot bundle install from scan.
271      * @param userId Indicates the userId.
272      * @return
273      */
274     void ProcessBootBundleInstallFromScan(int32_t userId);
275     /**
276      * @brief Process bundle install by scanInfos.
277      * @param userId Indicates the userId.
278      * @return
279      */
280     void InnerProcessBootPreBundleProFileInstall(int32_t userId);
281     /**
282      * @brief Install bundles by scanDir.
283      * @param scanDir Indicates the scanDir.
284      * @param appType Indicates the bundle type.
285      * @param userId Indicates userId.
286      * @return
287      */
288     void ProcessSystemBundleInstall(
289         const std::string &scanDir,
290         Constants::AppType appType,
291         int32_t userId = Constants::UNSPECIFIED_USERID);
292     /**
293      * @brief Install system shared bundle.
294      * @param sharedBundlePath Indicates the path of shared bundle.
295      * @param appType Indicates the bundle type.
296      * @return
297      */
298     void ProcessSystemSharedBundleInstall(const std::string &sharedBundlePath, Constants::AppType appType);
299     /**
300      * @brief start reboot scan.
301      * @return
302      */
303     void OnBundleRebootStart();
304     /**
305      * @brief Process reboot bundle.
306      * @return
307      */
308     void ProcessRebootBundle();
309     /**
310      * @brief Obtains the PreInstallBundleInfo objects.
311      * @return Returns true if this function is successfully called; returns false otherwise.
312      */
313     bool LoadAllPreInstallBundleInfos();
314     /**
315      * @brief Process reboot bundle install.
316      * @return
317      */
318     void ProcessRebootBundleInstall();
319     /**
320      * @brief Process reboot bundle install by scanInfos.
321      * @return
322      */
323     void ProcessReBootPreBundleProFileInstall();
324     /**
325      * @brief Process reboot bundle install from scan.
326      * @return
327      */
328     void ProcessRebootBundleInstallFromScan();
329     /**
330      * @brief Process reboot install bundles by bundleList.
331      * @param bundleList Indicates store bundle list.
332      * @param appType Indicates the bundle type.
333      * @return
334      */
335     void InnerProcessRebootBundleInstall(
336         const std::list<std::string> &bundleList, Constants::AppType appType);
337     /**
338      * @brief Process reboot install shared bundles by bundleList.
339      * @param bundleList Indicates store bundle list.
340      * @param appType Indicates the bundle type.
341      * @return
342      */
343     void InnerProcessRebootSharedBundleInstall(const std::list<std::string> &bundleList, Constants::AppType appType);
344     /**
345      * @brief Process reboot install system hsp by bundleList.
346      * @param scanPathList Indicates store bundle list.
347      * @return
348      */
349     void InnerProcessRebootSystemHspInstall(const std::list<std::string> &scanPathList);
350     /**
351      * @brief Reboot uninstall system and system vendor bundles.
352      * @return
353      */
354     void ProcessRebootBundleUninstall();
355     /**
356      * @brief Get bundle dir by scan.
357      * @param bundleDirs Indicates the return bundleDirs.
358      * @return
359      */
360     void GetBundleDirFromScan(std::list<std::string> &bundleDirs);
361     /**
362      * @brief Process scan dir.
363      * @param dir Indicates the dir.
364      * @param bundleDirs Indicates the return bundleDirs.
365      * @return
366      */
367     static void ProcessScanDir(const std::string &dir, std::list<std::string> &bundleDirs);
368     /**
369      * @brief Process parse pre bundle profile.
370      * @param dir Indicates the dir.
371      * @return
372      */
373     static void ParsePreBundleProFile(const std::string &dir);
374     /**
375      * @brief Set the flag indicates that all system and vendor applications installed.
376      * @return
377      */
378     void CreateAppInstallDir() const;
379     void SetAllInstallFlag() const;
380     /**
381      * @brief Check and parse hap.
382      * @param hapFilePath Indicates the absolute file path of the HAP.
383      * @param isPreInstallApp Indicates the hap is preInstallApp or not.
384      * @param infos Indicates the obtained BundleInfo object.
385      * @return Returns true if the BundleInfo is successfully obtained; returns false otherwise.
386      */
387     bool CheckAndParseHapFiles(const std::string &hapFilePath,
388         bool isPreInstallApp, std::unordered_map<std::string, InnerBundleInfo> &infos);
389     bool CheckAndParseHapFiles(const std::vector<std::string> &realPaths,
390         bool isPreInstallApp, std::unordered_map<std::string, InnerBundleInfo> &infos);
391     /**
392      * @brief Parse hap.
393      * @param hapFilePath Indicates the absolute file path of the HAP.
394      * @param infos Indicates the obtained BundleInfo object.
395      * @return Returns true if the BundleInfo is successfully obtained; returns false otherwise.
396      */
397     static bool ParseHapFiles(
398         const std::string &hapFilePath,
399         std::unordered_map<std::string, InnerBundleInfo> &infos);
400     /**
401      * @brief OTA Install system app and system vendor bundles.
402      * @param filePaths Indicates the filePaths.
403      * @param appType Indicates the bundle type.
404      * @param removable Indicates whether it can be removed.
405      * @return Returns true if this function called successfully; returns false otherwise.
406      */
407     bool OTAInstallSystemBundle(
408         const std::vector<std::string> &filePaths,
409         Constants::AppType appType,
410         bool removable);
411 
412     /**
413      * @brief OTA Install system app and system vendor bundles.
414      * @param filePaths Indicates the filePaths.
415      * @param bundleName Indicates the bundleName.
416      * @param appType Indicates the bundle type.
417      * @param removable Indicates whether it can be removed.
418      * @return Returns true if this function called successfully; returns false otherwise.
419      */
420     static bool OTAInstallSystemBundleNeedCheckUser(
421         const std::vector<std::string> &filePaths,
422         const std::string &bundleName,
423         Constants::AppType appType,
424         bool removable);
425     /**
426      * @brief OTA Install system app and system vendor shared bundles.
427      * @param filePaths Indicates the filePaths.
428      * @param appType Indicates the bundle type.
429      * @param removable Indicates whether it can be removed.
430      * @return Returns true if this function called successfully; returns false otherwise.
431      */
432     bool OTAInstallSystemSharedBundle(
433         const std::vector<std::string> &filePaths,
434         Constants::AppType appType,
435         bool removable);
436     /**
437      * @brief OTA Install system hsp.
438      * @param filePaths Indicates the filePaths.
439      * @return Returns ERR_OK if this function called successfully; returns false otherwise.
440      */
441     ErrCode OTAInstallSystemHsp(const std::vector<std::string> &filePaths);
442     /**
443      * @brief version is the same, determine whether to update based on the buildHash
444      * @param oldInfo Indicates the old innerBundleInfo.
445      * @param newInfo Indicates the new innerBundleInfo.
446      * @return Returns true if need to update.
447      */
448     bool IsNeedToUpdateSharedHspByHash(const InnerBundleInfo &oldInfo, const InnerBundleInfo &newInfo) const;
449     /**
450      * @brief Used to determine whether the module has been installed. If the installation has
451      *        been uninstalled, OTA install and upgrade will not be allowed.
452      * @param bundleName Indicates the bundleName.
453      * @param bundlePath Indicates the bundlePath.
454      * @return Returns true if this function called successfully; returns false otherwise.
455      */
456     bool HasModuleSavedInPreInstalledDb(
457         const std::string &bundleName, const std::string &bundlePath);
458     /**
459      * @brief Delete preInstallInfo to Db.
460      * @param bundleName Indicates the bundleName.
461      * @param bundlePath Indicates the bundlePath.
462      */
463     void DeletePreInfoInDb(
464         const std::string &bundleName, const std::string &bundlePath, bool bundleLevel);
465     /**
466      * @brief Add parseInfos to map.
467      * @param bundleName Indicates the bundleName.
468      * @param infos Indicates the infos.
469      */
470     void AddParseInfosToMap(const std::string &bundleName,
471         const std::unordered_map<std::string, InnerBundleInfo> &infos);
472     /**
473      * @brief Clear cache.
474      */
475     void ClearCache();
476     /**
477      * @brief Judge whether the preInstall app can be removable.
478      * @param path Indicates the path.
479      * @return Returns true if the preInstall is removable; returns false otherwise.
480      */
481     bool IsPreInstallRemovable(const std::string &path);
482 
483     void AddTasks(const std::map<int32_t, std::vector<PreScanInfo>,
484         std::greater<int32_t>> &taskMap, int32_t userId);
485     void AddTaskParallel(
486         int32_t taskPriority, const std::vector<PreScanInfo> &tasks, int32_t userId);
487 
488     bool InnerMultiProcessBundleInstall(
489         const std::unordered_map<std::string, std::pair<std::string, bool>> &needInstallMap,
490         Constants::AppType appType);
491 
492     bool CheckOtaFlag(OTAFlag flag, bool &result);
493     bool UpdateOtaFlag(OTAFlag flag);
494     void ProcessCheckAppDataDir();
495     void InnerProcessCheckAppDataDir();
496 
497     void ProcessCheckAppLogDir();
498     void InnerProcessCheckAppLogDir();
499     void ProcessCheckAppFileManagerDir();
500     void InnerProcessCheckAppFileManagerDir();
501     void ProcessCheckPreinstallData();
502     void InnerProcessCheckPreinstallData();
503     void ProcessCheckShaderCacheDir();
504     void InnerProcessCheckShaderCacheDir();
505     void ProcessCheckCloudShaderDir();
506     void InnerProcessCheckCloudShaderDir();
507     void ProcessNewBackupDir();
508     void ProcessCheckRecoverableApplicationInfo();
509     void InnerProcessCheckRecoverableApplicationInfo();
510     void ProcessCheckInstallSource();
511     void InnerProcessCheckInstallSource();
512     std::string ConvertApplicationFlagToInstallSource(int32_t flag);
513 
514     bool InnerProcessUninstallForExistPreBundle(const BundleInfo &installedInfo);
515 
516     void PrepareBundleDirQuota(const std::string &bundleName, const int32_t uid,
517         const std::string &bundleDataDirPath, const int32_t limitSize) const;
518     void RefreshQuotaForAllUid();
519 
520     bool InnerProcessUninstallModule(const BundleInfo &bundleInfo,
521         const std::unordered_map<std::string, InnerBundleInfo> &infos);
522 
523     bool IsSystemUpgrade();
524     bool IsTestSystemUpgrade();
525     bool IsSystemFingerprintChanged();
526     std::string GetCurSystemFingerprint();
527     std::string GetOldSystemFingerprint();
528     bool GetSystemParameter(const std::string &key, std::string &value);
529     void SaveSystemFingerprint();
530     void HandlePreInstallException();
531     static bool IsHapPathExist(const BundleInfo &bundleInfo);
532     static bool IsHspPathExist(const InnerBundleInfo &innerBundleInfo);
533 
534     bool FetchInnerBundleInfo(const std::string &bundleName, InnerBundleInfo &innerBundleInfo);
535     void GetPreInstallDirFromLoadProFile(std::vector<std::string> &bundleDirs);
536     void GetPreInstallDirFromScan(std::vector<std::string> &bundleDirs);
537 
538     void InnerProcessBootSystemHspInstall();
539     void ProcessSystemHspInstall(const PreScanInfo &preScanInfo);
540 
541     static void AddStockAppProvisionInfoByOTA(const std::string &bundleName, const std::string &filePath);
542     void UpdateAppDataSelinuxLabel(const std::string &bundleName, const std::string &apl,
543         bool isPreInstall, bool debug);
544     static bool IsQuickfixFlagExsit(const BundleInfo &bundleInfo);
545     static bool GetValueFromJson(nlohmann::json &jsonObject);
546     static void PatchSystemHspInstall(const std::string &path, bool isOta);
547     static void PatchSystemBundleInstall(const std::string &path, bool isOta);
548 #ifdef USE_PRE_BUNDLE_PROFILE
549     void UpdateRemovable(const std::string &bundleName, bool removable);
550     void UpdateAllPrivilegeCapability();
551     void UpdatePrivilegeCapability(const PreBundleConfigInfo &preBundleConfigInfo);
552     bool MatchSignature(const PreBundleConfigInfo &configInfo, const std::string &signature);
553     bool MatchOldSignatures(const PreBundleConfigInfo &configInfo, const std::vector<std::string> &appSignatures);
554     void UpdateTrustedPrivilegeCapability(const PreBundleConfigInfo &preBundleConfigInfo);
555 #endif
556     void ListeningUserUnlocked() const;
557     void RemoveUnreservedSandbox() const;
558     void HandleSceneBoard() const;
559     static void InnerProcessStockBundleProvisionInfo();
560     bool UpdateModuleByHash(const BundleInfo &oldBundleInfo, const InnerBundleInfo &newInfo) const;
561     bool IsNeedToUpdateSharedAppByHash(const InnerBundleInfo &oldInfo, const InnerBundleInfo &newInfo) const;
562     void CheckALLResourceInfo();
563     // Used to add bundle resource Info that does not exist in rdb when OTA.
564     void static ProcessBundleResourceInfo();
565     // scan all bundle data group info
566     void ProcessAllBundleDataGroupInfo();
567     // Used to send update failed event
568     void SendBundleUpdateFailedEvent(const BundleInfo &bundleInfo);
569     void ProcessAppTmpPath();
570     void UpdatePreinstallDB(const std::unordered_map<std::string, std::pair<std::string, bool>> &needInstallMap);
571     void UpdatePreinstallDBForNotUpdatedBundle(const std::string &bundleName,
572         const std::unordered_map<std::string, InnerBundleInfo> &innerBundleInfos);
573     void InnerProcessRebootUninstallWrongBundle();
574     void ProcessCheckAppEl1Dir();
575     void static ProcessCheckAppEl1DirTask();
576     void CleanAllBundleShaderCache() const;
577     void CheckBundleProvisionInfo();
578     // Used to save the information parsed by Hap in the scanned directory.
579     std::map<std::string, std::unordered_map<std::string, InnerBundleInfo>> hapParseInfoMap_;
580     // Used to save application information that already exists in the Db.
581     std::map<std::string, PreInstallBundleInfo> loadExistData_;
582     // Used to mark Whether trigger OTA check
583     bool needRebootOta_ = false;
584     // Used to notify bundle scan status
585     bool needNotifyBundleScanStatus_ = false;
586 
587     bool hasLoadAllPreInstallBundleInfosFromDb_ = false;
588 };
589 }  // namespace AppExecFwk
590 }  // namespace OHOS
591 #endif  // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_SERVICE_EVENT_HANDLER_H
592