!217 修复测试用例

Merge pull request !217 from shilei91/master
This commit is contained in:
openharmony_ci
2022-10-29 08:33:41 +00:00
committed by Gitee
5 changed files with 5 additions and 3 deletions
@@ -27,6 +27,7 @@
#include "want_utils.h"
namespace OHOS {
const unsigned int BMS_INSTALL_MSG = 100;
const unsigned int ERROR_SLEEP_TIMES = 300;
const unsigned int RETRY_TIMES = 10;
Bmsbuff *g_bmsbuff = nullptr;
@@ -21,7 +21,6 @@
#include "nocopyable.h"
namespace OHOS {
const unsigned int BMS_INSTALL_MSG = 100;
const unsigned int BMS_UNINSTALL_MSG = 101;
const unsigned int BMS_SCAN_PACKAGE_MSG = 102;
const unsigned int BMS_REGISTER_CALLBACK_MSG = 103;
@@ -40,6 +40,7 @@ public:
static bool RegisterInstallerCallback(InstallerCallback installerCallback);
static void UpdateBundleInfoList();
static uint8_t GetBundleInfosNoReplication(const int flags, BundleInfo **bundleInfos, int32_t *len);
static void Init();
static BundleMgrSliteFeature *GetInstance()
{
@@ -17,6 +17,7 @@
#include "bundle_service_interface.h"
#include "bundlems_log.h"
#include "bundle_mgr_slite_feature.h"
#include "gt_bundle_manager_service.h"
#include "ohos_init.h"
#include "samgr_lite.h"
@@ -40,6 +41,7 @@ static void Init()
CHECK_NULLPTR_RETURN(sm, "BundleManagerService", "get samgr error");
#ifdef __LITEOS_M__
sm->RegisterService(BundleMgrService::GetInstance());
BundleMgrSliteFeature::Init();
#else
BOOL result = sm->RegisterService(BundleMgrService::GetInstance());
PRINTI("BundleManagerService", "bms starts %{public}s", result ? "successfully" : "unsuccessfully");
@@ -39,7 +39,7 @@ BundleMgrSliteFeatureImpl g_bmsSliteImpl = {
DEFAULT_IUNKNOWN_ENTRY_END
};
static void Init()
void BundleMgrSliteFeature::Init()
{
SamgrLite *samgrLite = SAMGR_GetInstance();
CHECK_NULLPTR_RETURN(samgrLite, "BundleMgrSliteFeature", "get samgr error");
@@ -54,7 +54,6 @@ static void Init()
BOOL apiResult = samgrLite->RegisterFeatureApi(BMS_SERVICE, BMS_SLITE_FEATURE, publicApi);
PRINTI("BundleMgrSliteFeature", "bms feature init %{public}s", apiResult ? "success" : "failure");
}
SYSEX_FEATURE_INIT(Init);
BundleMgrSliteFeature::BundleMgrSliteFeature() : Feature(), identity_()
{