mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-20 23:55:24 -04:00
!261 修复安装失败问题
Merge pull request !261 from shilei91/master Signed-off-by: wangdengjia <wangdengjia@huawei.com> Change-Id: I25295644502658f908c168999ac05f57ebdae4ba Signed-off-by: wangdengjia <wangdengjia@huawei.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2020-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -17,10 +17,16 @@
|
||||
#define OHOS_ABILITYINFO_UTILS_H
|
||||
|
||||
#include "ability_info.h"
|
||||
#ifdef _MINI_BMS_PARSE_METADATA_
|
||||
#include "bundle_common.h"
|
||||
#endif
|
||||
|
||||
namespace OHOS {
|
||||
struct AbilityInfoUtils {
|
||||
static void CopyAbilityInfo(AbilityInfo *des, AbilityInfo src);
|
||||
#ifdef _MINI_BMS_PARSE_METADATA_
|
||||
static void CopyBundleProfileToAbilityInfo(AbilityInfo *des, const BundleProfile &src);
|
||||
#endif
|
||||
static bool SetAbilityInfoBundleName(AbilityInfo *abilityInfo, const char *bundleName);
|
||||
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
|
||||
static bool SetAbilityInfoModuleName(AbilityInfo *abilityInfo, const char *moduleName);
|
||||
@@ -31,6 +37,12 @@ struct AbilityInfoUtils {
|
||||
static bool SetAbilityInfoLabel(AbilityInfo *abilityInfo, const char *label);
|
||||
#else
|
||||
static bool SetAbilityInfoSrcPath(AbilityInfo *abilityInfo, const char *srcPath);
|
||||
static bool SetAbilityInfoMetaData(AbilityInfo *abilityInfo, MetaData **metaData, uint32_t numOfMetaData);
|
||||
static bool SetAbilityInfoSkill(AbilityInfo *abilityInfo, Skill * const skills[]);
|
||||
static void ClearStringArray(char *array[], int count);
|
||||
static void CopyStringArray(char *dst[], char * const src[], int count);
|
||||
static void ClearExtendedInfo(AbilityInfo *abilityInfo);
|
||||
static void ClearAbilityInfoMetaData(MetaData **metaData, uint32_t numOfMetaData);
|
||||
#endif
|
||||
private:
|
||||
AbilityInfoUtils() = default;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2020-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -17,6 +17,9 @@
|
||||
#define OHOS_BUNDLEINFO_UTILS_H
|
||||
|
||||
#include "bundle_info.h"
|
||||
#ifdef _MINI_BMS_PARSE_METADATA_
|
||||
#include "bundle_common.h"
|
||||
#endif
|
||||
|
||||
namespace OHOS {
|
||||
struct BundleInfoUtils {
|
||||
@@ -40,7 +43,11 @@ struct BundleInfoUtils {
|
||||
static void ClearAbilityInfos(AbilityInfo *abilityInfos, uint32_t numOfAbility);
|
||||
#else
|
||||
static bool SetBundleInfoSmallIconPath(BundleInfo *bundleInfo, const char *smallIconPath);
|
||||
static bool SetBundleInfoAbilityInfo(BundleInfo *bundleInfo, AbilityInfo abilityInfo);
|
||||
static bool SetBundleInfoAbilityInfo(BundleInfo *bundleInfo, const AbilityInfo &abilityInfo);
|
||||
#ifdef _MINI_BMS_PARSE_METADATA_
|
||||
static bool SetBundleInfoAbilityInfo(BundleInfo *bundleInfo, const AbilityInfo &abilityInfo,
|
||||
const BundleProfile &bundleProfile);
|
||||
#endif
|
||||
#endif
|
||||
private:
|
||||
BundleInfoUtils() = default;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -54,12 +54,18 @@ public:
|
||||
|
||||
uint8_t GetBundleInfosNoReplication(const int flags, BundleInfo **bundleInfos, int32_t *len) const;
|
||||
|
||||
uint8_t QueryAbilityInfos(const Want *want, AbilityInfo **abilityInfo, int32_t *len) const;
|
||||
|
||||
PreAppList *InitPreAppInfo(void) const;
|
||||
|
||||
void InsertPreAppInfo(const char *filePath, PreAppList *list) const;
|
||||
|
||||
void SetPreAppInfo(PreAppList *list) const;
|
||||
|
||||
bool RegisterEvent(InstallerCallback installerCallback) const;
|
||||
|
||||
bool UnregisterEvent(InstallerCallback installerCallback) const;
|
||||
|
||||
private:
|
||||
BundleMsClient() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user