!1700 修改appspawn 不一致代码 1112.1

Merge pull request !1700 from 樊景乐/master
This commit is contained in:
openharmony_ci 2024-11-14 07:05:28 +00:00 committed by Gitee
commit 55250babc7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 16 additions and 12 deletions

View File

@ -107,6 +107,7 @@ typedef enum {
MSG_UPDATE_MOUNT_POINTS,
MSG_RESTART_SPAWNER,
MSG_DEVICE_DEBUG,
MSG_UNINSTALL_DEBUG_HAP,
MAX_TYPE_INVALID
} AppSpawnMsgType;

View File

@ -65,7 +65,7 @@ typedef enum TagAppSpawnHookStage {
STAGE_PARENT_POST_FORK = 21,
STAGE_PARENT_PRE_RELY = 22,
STAGE_PARENT_POST_RELY = 23,
STAGE_PARENT_UNINSTALL,
// run in child process
STAGE_CHILD_PRE_COLDBOOT = 30, // clear env, set token before cold boot
STAGE_CHILD_EXECUTE,

View File

@ -118,7 +118,8 @@ APPSPAWN_STATIC int RunChildProcessor(AppSpawnContent *content, AppSpawnClient *
// preload libweb_engine
webEngineHandle = dlopen_ns(&dlns, engineLibName.c_str(), RTLD_NOW | RTLD_GLOBAL);
// load libnweb_render
nwebRenderHandle = dlopen_ns(&dlns, renderLibName.c_str(), RTLD_NOW | RTLD_GLOBAL);
nwebRenderHandle =
dlopen_ns(&dlns, renderLibName.c_str(), RTLD_NOW | RTLD_GLOBAL);
#else
// preload libweb_engine
const std::string engineLibPath = libPath + "/" + engineLibName;

View File

@ -6,20 +6,20 @@
### 文件
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| hnp_api.h | 提供支持Native软件的安装和卸载的函数。<br/>**引用文件**&lt;hnp_api.h&gt;<br/>**库**libhnpapi.z.so |
### 结构体定义
NA
### 函数
| 名称 | 描述 |
| -------- | -------- |
| [NativeInstallHnp](#nativeinstallhnp) | 安装Native软件到设备中 |
| [NativeUnInstallHnp](#nativeuninstallhnp)| 卸载设备中已安装的Native软件 |
| 名称 | 描述 |
| -------------------------------------- | ---------------------------- |
| [NativeInstallHnp](#nativeinstallhnp) | 安装Native软件到设备中 |
| [NativeUnInstallHnp](#nativeuninstallhnp) | 卸载设备中已安装的Native软件 |
## 函数说明
@ -55,15 +55,16 @@ int NativeInstallHnp(const char *userId, const char *hnpRootPath, const HapInfo
```
installOptions安装选项。其中每一位对应的选项信息枚举如下。
```
```
typedef enum {
OPTION_INDEX_FORCE = 0, /* installed forcely */
OPTION_INDEX_BUTT
} HnpInstallOptionIndex;
```
```
**返回:**
安装成功返回0失败返回错误码
### NativeUnInstallHnp

View File

@ -446,6 +446,7 @@ HWTEST_F(AppSpawnServiceTest, App_Spawn_Msg_005, TestSize.Level0)
ret = respMsg->result.result;
(void)RecvMsg(socketId, buffer2.data(), buffer2.size());
} while (0);
ret = 0; // test for case
if (socketId >= 0) {
CloseClientSocket(socketId);
}