From af924f3dc6d71163018b773d65ff52b92ea1fa1a Mon Sep 17 00:00:00 2001 From: shilei Date: Thu, 21 Jul 2022 22:18:08 +0800 Subject: [PATCH] fixed 60bbaf3 from https://gitee.com/shilei91/bundlemanager_bundle_framework_lite/pulls/183 fix ipc problem Signed-off-by: shilei Change-Id: I9da7aae99efdb0f384fb0455cbf6522334f2bcc7 --- frameworks/bundle_lite/include/bundlems_slite_client.h | 1 - frameworks/bundle_lite/include/element_name_utils.h | 4 ++++ frameworks/bundle_lite/src/element_name.cpp | 4 ++++ .../inner_api/bundlemgr_lite/bundle_service_interface.h | 4 ++++ interfaces/kits/bundle_lite/element_name.h | 4 ++++ interfaces/kits/bundle_lite/slite/bundle_manager.h | 1 - services/bundlemgr_lite/include/bundle_util.h | 2 ++ services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp | 1 - 8 files changed, 18 insertions(+), 3 deletions(-) diff --git a/frameworks/bundle_lite/include/bundlems_slite_client.h b/frameworks/bundle_lite/include/bundlems_slite_client.h index c0c0eb8..bf1f518 100755 --- a/frameworks/bundle_lite/include/bundlems_slite_client.h +++ b/frameworks/bundle_lite/include/bundlems_slite_client.h @@ -16,7 +16,6 @@ #ifndef OHOS_BUNDLEMS_SLITE_CLIENT_H #define OHOS_BUNDLEMS_SLITE_CLIENT_H -#include "iproxy_client.h" #include "nocopyable.h" #include "want.h" #include "bundle_install_msg.h" diff --git a/frameworks/bundle_lite/include/element_name_utils.h b/frameworks/bundle_lite/include/element_name_utils.h index 083beb6..f7af093 100755 --- a/frameworks/bundle_lite/include/element_name_utils.h +++ b/frameworks/bundle_lite/include/element_name_utils.h @@ -16,7 +16,9 @@ #ifndef OHOS_ELEMENT_NAME_UTILS_H #define OHOS_ELEMENT_NAME_UTILS_H +#ifndef __LITEOS_M__ #include +#endif #include "element_name.h" #ifdef __cplusplus @@ -25,11 +27,13 @@ extern "C" { #endif #endif // __cplusplus +#ifndef __LITEOS_M__ #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER bool SerializeElement(IpcIo *io, const ElementName *element); bool DeserializeElement(ElementName *element, IpcIo *io); #endif +#endif #ifdef __cplusplus #if __cplusplus diff --git a/frameworks/bundle_lite/src/element_name.cpp b/frameworks/bundle_lite/src/element_name.cpp index e4bff9b..704b3d8 100644 --- a/frameworks/bundle_lite/src/element_name.cpp +++ b/frameworks/bundle_lite/src/element_name.cpp @@ -19,6 +19,7 @@ #include "utils.h" +#ifndef __LITEOS_M__ #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER namespace { constexpr int VALUE_NULL = 0; @@ -28,6 +29,7 @@ namespace { constexpr int MAX_DEVICE_ID = 1024; } #endif +#endif void ClearElement(ElementName *element) { @@ -73,6 +75,7 @@ bool SetElementAbilityName(ElementName *element, const char *abilityName) return element->abilityName != nullptr; } +#ifndef __LITEOS_M__ #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER bool SerializeElement(IpcIo *io, const ElementName *element) { @@ -133,4 +136,5 @@ bool DeserializeElement(ElementName *element, IpcIo *io) } return true; } +#endif #endif \ No newline at end of file diff --git a/interfaces/inner_api/bundlemgr_lite/bundle_service_interface.h b/interfaces/inner_api/bundlemgr_lite/bundle_service_interface.h index f385265..8275af3 100755 --- a/interfaces/inner_api/bundlemgr_lite/bundle_service_interface.h +++ b/interfaces/inner_api/bundlemgr_lite/bundle_service_interface.h @@ -17,7 +17,11 @@ #define OHOS_BMS_INTERFACE_H #include "feature.h" +#ifndef __LITEOS_M__ #include "iproxy_server.h" +#else +#include "iunknown.h" +#endif #include "want.h" #include "install_param.h" #include "bundle_manager.h" diff --git a/interfaces/kits/bundle_lite/element_name.h b/interfaces/kits/bundle_lite/element_name.h index 8feb4ab..5b0ee7e 100644 --- a/interfaces/kits/bundle_lite/element_name.h +++ b/interfaces/kits/bundle_lite/element_name.h @@ -42,9 +42,11 @@ #ifndef OHOS_ELEMENT_NAME_H #define OHOS_ELEMENT_NAME_H +#ifndef __LITEOS_M__ #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER #include #endif +#endif #include /** @@ -110,10 +112,12 @@ bool SetElementBundleName(ElementName *element, const char *bundleName); */ bool SetElementAbilityName(ElementName *element, const char *abilityName); +#ifndef __LITEOS_M__ #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER bool SerializeElement(IpcIo *io, const ElementName *element); bool DeserializeElement(ElementName *element, IpcIo *io); #endif +#endif #ifdef __cplusplus #if __cplusplus } diff --git a/interfaces/kits/bundle_lite/slite/bundle_manager.h b/interfaces/kits/bundle_lite/slite/bundle_manager.h index 54db94d..c56df30 100755 --- a/interfaces/kits/bundle_lite/slite/bundle_manager.h +++ b/interfaces/kits/bundle_lite/slite/bundle_manager.h @@ -40,7 +40,6 @@ #include "ability_info.h" #include "bundle_info.h" -#include "bundle_status_callback.h" #include "install_param.h" #include "stdint.h" #include "want.h" diff --git a/services/bundlemgr_lite/include/bundle_util.h b/services/bundlemgr_lite/include/bundle_util.h index b73bf2a..76c45fc 100755 --- a/services/bundlemgr_lite/include/bundle_util.h +++ b/services/bundlemgr_lite/include/bundle_util.h @@ -20,10 +20,12 @@ #include "bundle_info.h" #include "utils_list.h" #include "stdint.h" +#ifndef __LITEOS_M__ #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER #include #include #endif +#endif #include "cJSON.h" #ifdef __LITEOS_M__ diff --git a/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp b/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp index 9864e38..2e1d201 100755 --- a/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp +++ b/services/bundlemgr_lite/src/bundle_mgr_slite_feature.cpp @@ -15,7 +15,6 @@ #include "bundle_mgr_slite_feature.h" -#include "bundle_service_interface.h" #include "bundlems_log.h" #include "ohos_init.h" #include "samgr_lite.h" -- Gitee