From 86622dd88aba61597a031df6677d9100a1aca66d Mon Sep 17 00:00:00 2001 From: shilei Date: Tue, 12 Jul 2022 10:50:00 +0800 Subject: [PATCH] support iccarm Signed-off-by: shilei Change-Id: I923bd866ab285450102f750b21e0a09194cbd42d --- frameworks/bundle_lite/BUILD.gn | 14 ++++++++------ .../include/gt_bundle_manager_service.h | 2 +- services/bundlemgr_lite/src/bundle_mgr_service.cpp | 1 - .../src/bundle_mgr_slite_feature.cpp | 3 --- .../src/gt_bundle_manager_service.cpp | 8 +++++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frameworks/bundle_lite/BUILD.gn b/frameworks/bundle_lite/BUILD.gn index bb9d388..23222a7 100644 --- a/frameworks/bundle_lite/BUILD.gn +++ b/frameworks/bundle_lite/BUILD.gn @@ -115,12 +115,14 @@ lite_library("bundle") { defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] } - cflags = [ - "-fPIC", - "-Wall", - "-Wno-format", - ] - cflags_cc = cflags + if (board_toolchain_type != "iccarm") { + cflags = [ + "-fPIC", + "-Wall", + "-Wno-format", + ] + cflags_cc = cflags + } } ndk_lib("bundle_notes") { diff --git a/services/bundlemgr_lite/include/gt_bundle_manager_service.h b/services/bundlemgr_lite/include/gt_bundle_manager_service.h index a381438..3a93712 100755 --- a/services/bundlemgr_lite/include/gt_bundle_manager_service.h +++ b/services/bundlemgr_lite/include/gt_bundle_manager_service.h @@ -105,7 +105,7 @@ private: AppInfoList *APP_InitAllAppInfo(void); void APP_QueryAppInfo(const char *appDir, AppInfoList *list); void APP_InsertAppInfo(char *filePath, AppInfoList *list); - void APP_FreeAllAppInfo(const AppInfoList *list); + void APP_FreeAllAppInfo(AppInfoList *list); void InstallPreBundle(List systemPathList, InstallerCallback installerCallback); GtBundleInstaller *installer_; diff --git a/services/bundlemgr_lite/src/bundle_mgr_service.cpp b/services/bundlemgr_lite/src/bundle_mgr_service.cpp index 086ec2d..72c9676 100755 --- a/services/bundlemgr_lite/src/bundle_mgr_service.cpp +++ b/services/bundlemgr_lite/src/bundle_mgr_service.cpp @@ -49,7 +49,6 @@ SYSEX_SERVICE_INIT(Init); const char *BundleMgrService::GetServiceName(Service *service) { - (void)service; return BMS_SERVICE; } diff --git a/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp b/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp index 7fc5cf5..9864e38 100755 --- a/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp +++ b/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp @@ -67,7 +67,6 @@ BundleMgrSliteFeature::BundleMgrSliteFeature() : Feature(), identity_() const char *BundleMgrSliteFeature::GetFeatureName(Feature *feature) { - (void) feature; return BMS_SLITE_FEATURE; } @@ -84,8 +83,6 @@ void BundleMgrSliteFeature::OnFeatureInitialize(Feature *feature, Service *paren void BundleMgrSliteFeature::OnFeatureStop(Feature *feature, Identity identity) { - (void) feature; - (void) identity; } BOOL BundleMgrSliteFeature::OnFeatureMessage(Feature *feature, Request *request) diff --git a/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp b/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp index 9794067..d5bb5fc 100755 --- a/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp +++ b/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp @@ -31,7 +31,6 @@ #include "gt_bundle_parser.h" #include "gt_extractor_util.h" #include "jerryscript_adapter.h" -#include "los_tick.h" #include "sys/stat.h" #include "unistd.h" #include "utils.h" @@ -41,10 +40,13 @@ using namespace OHOS::ACELite; namespace OHOS { const uint8_t OPERATION_DOING = 200; -const uint8_t BMS_INSTALLATION_START = 101; const uint8_t BMS_UNINSTALLATION_START = 104; const uint8_t BMS_INSTALLATION_COMPLETED = 100; +#ifndef __LITEOS_M__ +const uint8_t BMS_INSTALLATION_START = 101; +#endif + GtManagerService::GtManagerService() { installer_ = new GtBundleInstaller(); @@ -1055,7 +1057,7 @@ void GtManagerService::APP_InsertAppInfo(char *filePath, AppInfoList *list) return; } -void GtManagerService::APP_FreeAllAppInfo(const AppInfoList *list) +void GtManagerService::APP_FreeAllAppInfo(AppInfoList *list) { if (list == nullptr) { return;