• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright (c) 2021-2024 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 "bundle_util.h"
17 
18 namespace OHOS {
19 namespace AppExecFwk {
20 namespace {
21 }
22 
23 std::mutex BundleUtil::g_mutex;
24 
25 #ifdef BUNDLE_FRAMEWORK_BUNDLE_UTIL_RETURN_TRUE
CheckFilePath(const std::string & bundlePath,std::string & realPath)26 ErrCode BundleUtil::CheckFilePath(const std::string &bundlePath, std::string &realPath)
27 {
28     return ERR_OK;
29 }
30 
CheckFilePath(const std::vector<std::string> & bundlePaths,std::vector<std::string> & realPaths)31 ErrCode BundleUtil::CheckFilePath(const std::vector<std::string> &bundlePaths, std::vector<std::string> &realPaths)
32 {
33     return ERR_OK;
34 }
35 
CheckFileType(const std::string & fileName,const std::string & extensionName)36 bool BundleUtil::CheckFileType(const std::string &fileName, const std::string &extensionName)
37 {
38     return true;
39 }
40 
CheckFileName(const std::string & fileName)41 bool BundleUtil::CheckFileName(const std::string &fileName)
42 {
43     return true;
44 }
45 
CheckFileSize(const std::string & bundlePath,const int64_t fileSize)46 bool BundleUtil::CheckFileSize(const std::string &bundlePath, const int64_t fileSize)
47 {
48     return true;
49 }
50 
CheckSystemSize(const std::string & bundlePath,const std::string & diskPath)51 bool BundleUtil::CheckSystemSize(const std::string &bundlePath, const std::string &diskPath)
52 {
53     return true;
54 }
55 
CheckSystemFreeSize(const std::string & path,int64_t size)56 bool BundleUtil::CheckSystemFreeSize(const std::string &path, int64_t size)
57 {
58     return true;
59 }
60 
CheckSystemSizeAndHisysEvent(const std::string & path,const std::string & fileName)61 bool BundleUtil::CheckSystemSizeAndHisysEvent(const std::string &path, const std::string &fileName)
62 {
63     return true;
64 }
65 
GetHapFilesFromBundlePath(const std::string & currentBundlePath,std::vector<std::string> & hapFileList)66 bool BundleUtil::GetHapFilesFromBundlePath(const std::string& currentBundlePath, std::vector<std::string>& hapFileList)
67 {
68     return true;
69 }
70 
GetCurrentTime()71 int64_t BundleUtil::GetCurrentTime()
72 {
73     int64_t time = 0;
74     return time;
75 }
76 
GetCurrentTimeMs()77 int64_t BundleUtil::GetCurrentTimeMs()
78 {
79     int64_t time = 1000 * 60 * 30 + 10;
80     return time;
81 }
82 
GetCurrentTimeNs()83 int64_t BundleUtil::GetCurrentTimeNs()
84 {
85     int64_t time = 0;
86     return time;
87 }
88 
DeviceAndNameToKey(const std::string & deviceId,const std::string & bundleName,std::string & key)89 void BundleUtil::DeviceAndNameToKey(
90     const std::string &deviceId, const std::string &bundleName, std::string &key)
91 {
92 }
93 
KeyToDeviceAndName(const std::string & key,std::string & deviceId,std::string & bundleName)94 bool BundleUtil::KeyToDeviceAndName(
95     const std::string &key, std::string &deviceId, std::string &bundleName)
96 {
97     return true;
98 }
99 
GetUserIdByCallingUid()100 int32_t BundleUtil::GetUserIdByCallingUid()
101 {
102     return 0;
103 }
104 
GetUserIdByUid(int32_t uid)105 int32_t BundleUtil::GetUserIdByUid(int32_t uid)
106 {
107     return 0;
108 }
109 
MakeFsConfig(const std::string & bundleName,int32_t bundleId,const std::string & configPath)110 void BundleUtil::MakeFsConfig(const std::string &bundleName, int32_t bundleId, const std::string &configPath)
111 {
112 }
113 
RemoveFsConfig(const std::string & bundleName,const std::string & configPath)114 void BundleUtil::RemoveFsConfig(const std::string &bundleName, const std::string &configPath)
115 {
116 }
117 
CreateTempDir(const std::string & tempDir)118 std::string BundleUtil::CreateTempDir(const std::string &tempDir)
119 {
120     return "";
121 }
122 
CreateInstallTempDir(uint32_t installerId,const DirType & type)123 std::string BundleUtil::CreateInstallTempDir(uint32_t installerId, const DirType &type)
124 {
125     return "";
126 }
127 
CreateSharedBundleTempDir(uint32_t installerId,uint32_t index)128 std::string BundleUtil::CreateSharedBundleTempDir(uint32_t installerId, uint32_t index)
129 {
130     return "";
131 }
132 
CreateFileDescriptor(const std::string & bundlePath,long long offset)133 int32_t BundleUtil::CreateFileDescriptor(const std::string &bundlePath, long long offset)
134 {
135     return 0;
136 }
137 
CreateFileDescriptorForReadOnly(const std::string & bundlePath,long long offset)138 int32_t BundleUtil::CreateFileDescriptorForReadOnly(const std::string &bundlePath, long long offset)
139 {
140     return 0;
141 }
142 
CloseFileDescriptor(std::vector<int32_t> & fdVec)143 void BundleUtil::CloseFileDescriptor(std::vector<int32_t> &fdVec)
144 {
145 }
146 
IsExistFile(const std::string & path)147 bool BundleUtil::IsExistFile(const std::string &path)
148 {
149     return true;
150 }
151 
IsExistFileNoLog(const std::string & path)152 bool BundleUtil::IsExistFileNoLog(const std::string &path)
153 {
154     return true;
155 }
156 
IsExistDir(const std::string & path)157 bool BundleUtil::IsExistDir(const std::string &path)
158 {
159     return true;
160 }
161 
IsExistDirNoLog(const std::string & path)162 bool BundleUtil::IsExistDirNoLog(const std::string &path)
163 {
164     return true;
165 }
166 
IsPathInformationConsistent(const std::string & path,int32_t uid,int32_t gid)167 bool BundleUtil::IsPathInformationConsistent(const std::string &path, int32_t uid, int32_t gid)
168 {
169     return true;
170 }
171 
CalculateFileSize(const std::string & bundlePath)172 int64_t BundleUtil::CalculateFileSize(const std::string &bundlePath)
173 {
174     int64_t res = 0;
175     return res;
176 }
177 
RenameFile(const std::string & oldPath,const std::string & newPath)178 bool BundleUtil::RenameFile(const std::string &oldPath, const std::string &newPath)
179 {
180     return true;
181 }
182 
DeleteDir(const std::string & path)183 bool BundleUtil::DeleteDir(const std::string &path)
184 {
185     return true;
186 }
187 
IsUtd(const std::string & param)188 bool BundleUtil::IsUtd(const std::string &param)
189 {
190     return true;
191 }
192 
IsSpecificUtd(const std::string & param)193 bool BundleUtil::IsSpecificUtd(const std::string &param)
194 {
195     return true;
196 }
197 
GetUtdVectorByMimeType(const std::string & mimeType)198 std::vector<std::string> BundleUtil::GetUtdVectorByMimeType(const std::string &mimeType)
199 {
200     std::vector<std::string> utdVector;
201     return utdVector;
202 }
203 
GetBoolStrVal(bool val)204 std::string BundleUtil::GetBoolStrVal(bool val)
205 {
206     return val ? "true" : "false";
207 }
208 
CopyFile(const std::string & sourceFile,const std::string & destinationFile)209 bool BundleUtil::CopyFile(
210     const std::string &sourceFile, const std::string &destinationFile)
211 {
212     return true;
213 }
214 
CopyFileFast(const std::string & sourcePath,const std::string & destPath,const bool needFsync)215 bool BundleUtil::CopyFileFast(const std::string &sourcePath, const std::string &destPath, const bool needFsync)
216 {
217     return true;
218 }
219 
GetResource(const std::string & bundleName,const std::string & moduleName,uint32_t resId)220 Resource BundleUtil::GetResource(const std::string &bundleName, const std::string &moduleName, uint32_t resId)
221 {
222     Resource resource;
223     resource.bundleName = bundleName;
224     resource.moduleName = moduleName;
225     resource.id = resId;
226     return resource;
227 }
228 
CreateDir(const std::string & dir)229 bool BundleUtil::CreateDir(const std::string &dir)
230 {
231     return true;
232 }
233 
RevertToRealPath(const std::string & sandBoxPath,const std::string & bundleName,std::string & realPath)234 bool BundleUtil::RevertToRealPath(const std::string &sandBoxPath, const std::string &bundleName, std::string &realPath)
235 {
236     return true;
237 }
238 
IsSandBoxPath(const std::string & path)239 bool BundleUtil::IsSandBoxPath(const std::string &path)
240 {
241     return true;
242 }
243 
StartWith(const std::string & source,const std::string & prefix)244 bool BundleUtil::StartWith(const std::string &source, const std::string &prefix)
245 {
246     return true;
247 }
248 
EndWith(const std::string & source,const std::string & suffix)249 bool BundleUtil::EndWith(const std::string &source, const std::string &suffix)
250 {
251     return true;
252 }
253 
GetFileSize(const std::string & filePath)254 int64_t BundleUtil::GetFileSize(const std::string &filePath)
255 {
256     int64_t res = 0;
257     return res;
258 }
259 
CopyFileToSecurityDir(const std::string & filePath,const DirType & dirType,std::vector<std::string> & toDeletePaths,bool rename)260 std::string BundleUtil::CopyFileToSecurityDir(const std::string &filePath, const DirType &dirType,
261     std::vector<std::string> &toDeletePaths, bool rename)
262 {
263     return "";
264 }
265 
GetAppInstallPrefix(const std::string & filePath,bool rename)266 std::string BundleUtil::GetAppInstallPrefix(const std::string &filePath, bool rename)
267 {
268     return "";
269 }
270 
RestoreAppInstallHaps()271 void BundleUtil::RestoreAppInstallHaps()
272 {
273 }
274 
RestoreHaps(const std::string & sourcePath,const std::string & bundleName,const std::string & userId)275 void BundleUtil::RestoreHaps(const std::string &sourcePath, const std::string &bundleName, const std::string &userId)
276 {
277 }
278 
DeleteTempDirs(const std::vector<std::string> & tempDirs)279 void BundleUtil::DeleteTempDirs(const std::vector<std::string> &tempDirs)
280 {
281 }
282 
GenerateRandomNumbers(uint8_t size,uint8_t lRange,uint8_t rRange)283 std::vector<uint8_t> BundleUtil::GenerateRandomNumbers(uint8_t size, uint8_t lRange, uint8_t rRange)
284 {
285     std::vector<uint8_t> rangeV;
286     return rangeV;
287 }
288 
ExtractGroupIdByDevelopId(const std::string & developerId)289 std::string BundleUtil::ExtractGroupIdByDevelopId(const std::string &developerId)
290 {
291     return "";
292 }
293 
ToString(const std::vector<std::string> & vector)294 std::string BundleUtil::ToString(const std::vector<std::string> &vector)
295 {
296     return "";
297 }
298 
GetNoDisablingConfigPath()299 std::string BundleUtil::GetNoDisablingConfigPath()
300 {
301     return "";
302 }
303 
ExtractNumberFromString(nlohmann::json & jsonObject,const std::string & key)304 uint32_t BundleUtil::ExtractNumberFromString(nlohmann::json &jsonObject, const std::string &key)
305 {
306     return 0;
307 }
308 
StrToUint32(const std::string & str,uint32_t & value)309 bool BundleUtil::StrToUint32(const std::string &str, uint32_t &value)
310 {
311     return true;
312 }
313 
ExtractStringFromJson(nlohmann::json & jsonObject,const std::string & key)314 std::string BundleUtil::ExtractStringFromJson(nlohmann::json &jsonObject, const std::string &key)
315 {
316     return "";
317 }
318 
ParseMapFromJson(const std::string & jsonStr)319 std::unordered_map<std::string, std::string> BundleUtil::ParseMapFromJson(const std::string &jsonStr)
320 {
321     std::unordered_map<std::string, std::string> result;
322     return result;
323 }
324 
SetBit(const uint8_t pos,uint8_t & num)325 void BundleUtil::SetBit(const uint8_t pos, uint8_t &num)
326 {}
327 
ResetBit(const uint8_t pos,uint8_t & num)328 void BundleUtil::ResetBit(const uint8_t pos, uint8_t &num)
329 {}
330 
GetBitValue(const uint8_t num,const uint8_t pos)331 bool BundleUtil::GetBitValue(const uint8_t num, const uint8_t pos)
332 {
333     return false;
334 }
335 #endif
336 #ifdef BUNDLE_FRAMEWORK_BUNDLE_UTIL_RETURN_FALSE
CheckFilePath(const std::string & bundlePath,std::string & realPath)337 ErrCode BundleUtil::CheckFilePath(const std::string &bundlePath, std::string &realPath)
338 {
339     return -1;
340 }
341 
CheckFilePath(const std::vector<std::string> & bundlePaths,std::vector<std::string> & realPaths)342 ErrCode BundleUtil::CheckFilePath(const std::vector<std::string> &bundlePaths, std::vector<std::string> &realPaths)
343 {
344     return -1;
345 }
346 
CheckFileType(const std::string & fileName,const std::string & extensionName)347 bool BundleUtil::CheckFileType(const std::string &fileName, const std::string &extensionName)
348 {
349     return false;
350 }
351 
CheckFileName(const std::string & fileName)352 bool BundleUtil::CheckFileName(const std::string &fileName)
353 {
354     return false;
355 }
356 
CheckFileSize(const std::string & bundlePath,const int64_t fileSize)357 bool BundleUtil::CheckFileSize(const std::string &bundlePath, const int64_t fileSize)
358 {
359     return false;
360 }
361 
CheckSystemSize(const std::string & bundlePath,const std::string & diskPath)362 bool BundleUtil::CheckSystemSize(const std::string &bundlePath, const std::string &diskPath)
363 {
364     return false;
365 }
366 
CheckSystemFreeSize(const std::string & path,int64_t size)367 bool BundleUtil::CheckSystemFreeSize(const std::string &path, int64_t size)
368 {
369     return false;
370 }
371 
CheckSystemSizeAndHisysEvent(const std::string & path,const std::string & fileName)372 bool BundleUtil::CheckSystemSizeAndHisysEvent(const std::string &path, const std::string &fileName)
373 {
374     return false;
375 }
376 
GetHapFilesFromBundlePath(const std::string & currentBundlePath,std::vector<std::string> & hapFileList)377 bool BundleUtil::GetHapFilesFromBundlePath(const std::string& currentBundlePath, std::vector<std::string>& hapFileList)
378 {
379     return false;
380 }
381 
GetCurrentTime()382 int64_t BundleUtil::GetCurrentTime()
383 {
384     int64_t time = 0;
385     return time;
386 }
387 
GetCurrentTimeMs()388 int64_t BundleUtil::GetCurrentTimeMs()
389 {
390     int64_t time = 1000 * 60 * 30 + 10;
391     return time;
392 }
393 
GetCurrentTimeNs()394 int64_t BundleUtil::GetCurrentTimeNs()
395 {
396     int64_t time = 0;
397     return time;
398 }
399 
DeviceAndNameToKey(const std::string & deviceId,const std::string & bundleName,std::string & key)400 void BundleUtil::DeviceAndNameToKey(
401     const std::string &deviceId, const std::string &bundleName, std::string &key)
402 {
403 }
404 
KeyToDeviceAndName(const std::string & key,std::string & deviceId,std::string & bundleName)405 bool BundleUtil::KeyToDeviceAndName(
406     const std::string &key, std::string &deviceId, std::string &bundleName)
407 {
408     return false;
409 }
410 
GetUserIdByCallingUid()411 int32_t BundleUtil::GetUserIdByCallingUid()
412 {
413     return 0;
414 }
415 
GetUserIdByUid(int32_t uid)416 int32_t BundleUtil::GetUserIdByUid(int32_t uid)
417 {
418     return 0;
419 }
420 
MakeFsConfig(const std::string & bundleName,int32_t bundleId,const std::string & configPath)421 void BundleUtil::MakeFsConfig(const std::string &bundleName, int32_t bundleId, const std::string &configPath)
422 {
423 }
424 
RemoveFsConfig(const std::string & bundleName,const std::string & configPath)425 void BundleUtil::RemoveFsConfig(const std::string &bundleName, const std::string &configPath)
426 {
427 }
428 
CreateTempDir(const std::string & tempDir)429 std::string BundleUtil::CreateTempDir(const std::string &tempDir)
430 {
431     return "";
432 }
433 
CreateInstallTempDir(uint32_t installerId,const DirType & type)434 std::string BundleUtil::CreateInstallTempDir(uint32_t installerId, const DirType &type)
435 {
436     return "";
437 }
438 
CreateSharedBundleTempDir(uint32_t installerId,uint32_t index)439 std::string BundleUtil::CreateSharedBundleTempDir(uint32_t installerId, uint32_t index)
440 {
441     return "";
442 }
443 
CreateFileDescriptor(const std::string & bundlePath,long long offset)444 int32_t BundleUtil::CreateFileDescriptor(const std::string &bundlePath, long long offset)
445 {
446     return 0;
447 }
448 
CreateFileDescriptorForReadOnly(const std::string & bundlePath,long long offset)449 int32_t BundleUtil::CreateFileDescriptorForReadOnly(const std::string &bundlePath, long long offset)
450 {
451     return 0;
452 }
453 
CloseFileDescriptor(std::vector<int32_t> & fdVec)454 void BundleUtil::CloseFileDescriptor(std::vector<int32_t> &fdVec)
455 {
456 }
457 
IsExistFile(const std::string & path)458 bool BundleUtil::IsExistFile(const std::string &path)
459 {
460     return false;
461 }
462 
IsExistFileNoLog(const std::string & path)463 bool BundleUtil::IsExistFileNoLog(const std::string &path)
464 {
465     return false;
466 }
467 
IsExistDir(const std::string & path)468 bool BundleUtil::IsExistDir(const std::string &path)
469 {
470     return false;
471 }
472 
IsExistDirNoLog(const std::string & path)473 bool BundleUtil::IsExistDirNoLog(const std::string &path)
474 {
475     return false;
476 }
477 
IsPathInformationConsistent(const std::string & path,int32_t uid,int32_t gid)478 bool BundleUtil::IsPathInformationConsistent(const std::string &path, int32_t uid, int32_t gid)
479 {
480     return false;
481 }
482 
CalculateFileSize(const std::string & bundlePath)483 int64_t BundleUtil::CalculateFileSize(const std::string &bundlePath)
484 {
485     int64_t res = 0;
486     return res;
487 }
488 
RenameFile(const std::string & oldPath,const std::string & newPath)489 bool BundleUtil::RenameFile(const std::string &oldPath, const std::string &newPath)
490 {
491     return false;
492 }
493 
DeleteDir(const std::string & path)494 bool BundleUtil::DeleteDir(const std::string &path)
495 {
496     return false;
497 }
498 
IsUtd(const std::string & param)499 bool BundleUtil::IsUtd(const std::string &param)
500 {
501     return false;
502 }
503 
IsSpecificUtd(const std::string & param)504 bool BundleUtil::IsSpecificUtd(const std::string &param)
505 {
506     return false;
507 }
508 
GetUtdVectorByMimeType(const std::string & mimeType)509 std::vector<std::string> BundleUtil::GetUtdVectorByMimeType(const std::string &mimeType)
510 {
511     std::vector<std::string> utdVector;
512     return utdVector;
513 }
514 
GetBoolStrVal(bool val)515 std::string BundleUtil::GetBoolStrVal(bool val)
516 {
517     return val ? "true" : "false";
518 }
519 
CopyFile(const std::string & sourceFile,const std::string & destinationFile)520 bool BundleUtil::CopyFile(
521     const std::string &sourceFile, const std::string &destinationFile)
522 {
523     return false;
524 }
525 
CopyFileFast(const std::string & sourcePath,const std::string & destPath)526 bool BundleUtil::CopyFileFast(const std::string &sourcePath, const std::string &destPath)
527 {
528     return false;
529 }
530 
GetResource(const std::string & bundleName,const std::string & moduleName,uint32_t resId)531 Resource BundleUtil::GetResource(const std::string &bundleName, const std::string &moduleName, uint32_t resId)
532 {
533     Resource resource;
534     resource.bundleName = bundleName;
535     resource.moduleName = moduleName;
536     resource.id = resId;
537     return resource;
538 }
539 
CreateDir(const std::string & dir)540 bool BundleUtil::CreateDir(const std::string &dir)
541 {
542     return false;
543 }
544 
RevertToRealPath(const std::string & sandBoxPath,const std::string & bundleName,std::string & realPath)545 bool BundleUtil::RevertToRealPath(const std::string &sandBoxPath, const std::string &bundleName, std::string &realPath)
546 {
547     return false;
548 }
549 
IsSandBoxPath(const std::string & path)550 bool BundleUtil::IsSandBoxPath(const std::string &path)
551 {
552     return false;
553 }
554 
StartWith(const std::string & source,const std::string & prefix)555 bool BundleUtil::StartWith(const std::string &source, const std::string &prefix)
556 {
557     return false;
558 }
559 
EndWith(const std::string & source,const std::string & suffix)560 bool BundleUtil::EndWith(const std::string &source, const std::string &suffix)
561 {
562     return false;
563 }
564 
GetFileSize(const std::string & filePath)565 int64_t BundleUtil::GetFileSize(const std::string &filePath)
566 {
567     int64_t res = 0;
568     return res;
569 }
570 
CopyFileToSecurityDir(const std::string & filePath,const DirType & dirType,std::vector<std::string> & toDeletePaths,bool rename)571 std::string BundleUtil::CopyFileToSecurityDir(const std::string &filePath, const DirType &dirType,
572     std::vector<std::string> &toDeletePaths, bool rename)
573 {
574     return "";
575 }
576 
GetAppInstallPrefix(const std::string & filePath,bool rename)577 std::string BundleUtil::GetAppInstallPrefix(const std::string &filePath, bool rename)
578 {
579     return "";
580 }
581 
RestoreAppInstallHaps()582 void BundleUtil::RestoreAppInstallHaps()
583 {
584 }
585 
RestoreHaps(const std::string & sourcePath,const std::string & bundleName,const std::string & userId)586 void BundleUtil::RestoreHaps(const std::string &sourcePath, const std::string &bundleName, const std::string &userId)
587 {
588 }
589 
DeleteTempDirs(const std::vector<std::string> & tempDirs)590 void BundleUtil::DeleteTempDirs(const std::vector<std::string> &tempDirs)
591 {
592 }
593 
GenerateRandomNumbers(uint8_t size,uint8_t lRange,uint8_t rRange)594 std::vector<uint8_t> BundleUtil::GenerateRandomNumbers(uint8_t size, uint8_t lRange, uint8_t rRange)
595 {
596     std::vector<uint8_t> rangeV;
597     return rangeV;
598 }
599 
ExtractGroupIdByDevelopId(const std::string & developerId)600 std::string BundleUtil::ExtractGroupIdByDevelopId(const std::string &developerId)
601 {
602     return "";
603 }
604 
ToString(const std::vector<std::string> & vector)605 std::string BundleUtil::ToString(const std::vector<std::string> &vector)
606 {
607     return "";
608 }
609 
GetNoDisablingConfigPath()610 std::string BundleUtil::GetNoDisablingConfigPath()
611 {
612     return "";
613 }
614 
ExtractNumberFromString(nlohmann::json & jsonObject,const std::string & key)615 uint32_t BundleUtil::ExtractNumberFromString(nlohmann::json &jsonObject, const std::string &key)
616 {
617     return 0;
618 }
619 
StrToUint32(const std::string & str,uint32_t & value)620 bool BundleUtil::StrToUint32(const std::string &str, uint32_t &value)
621 {
622     return true;
623 }
624 
ExtractStringFromJson(nlohmann::json & jsonObject,const std::string & key)625 std::string BundleUtil::ExtractStringFromJson(nlohmann::json &jsonObject, const std::string &key)
626 {
627     return "";
628 }
629 
ParseMapFromJson(const std::string & jsonStr)630 std::unordered_map<std::string, std::string> BundleUtil::ParseMapFromJson(const std::string &jsonStr)
631 {
632     std::unordered_map<std::string, std::string> result;
633     return result;
634 }
635 
SetBit(const uint8_t pos,uint8_t & num)636 void BundleUtil::SetBit(const uint8_t pos, uint8_t &num)
637 {}
638 
ResetBit(const uint8_t pos,uint8_t & num)639 void BundleUtil::ResetBit(const uint8_t pos, uint8_t &num)
640 {}
641 
GetBitValue(const uint8_t num,const uint8_t pos)642 bool BundleUtil::GetBitValue(const uint8_t num, const uint8_t pos)
643 {
644     return false;
645 }
646 #endif
647 }  // namespace AppExecFwk
648 }  // namespace OHOS
649