提交 ac314c24 编写于 作者: G Gloria

Update docs against 16152

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 49ff07d4
# Bundle Manager Subsystem Changelog
## cl.bundlemanager.1 Deleted the atomicService Tag from the app.json File
The **atomicService** tag is deleted from the **app.json** file.
**Change Impact**<br>
If this tag is used, an error is reported during compilation on DevEco Studio.
**Adaptation Guide**<br>
Delete the **atomicService** tag from your code.
## cl.bundlemanager.2 Added the bundleType Tag to the app.json File
The **bundleType** tag is added to the **app.json** file.
**Change Impact**<br>
For an existing ability with [installationFree](../../../application-dev/quick-start/module-configuration-file.md) set to **true**, **bundleType** must be set to **atomicService** in the **app.json** file. Otherwise, the packaging fails.
**Adaptation Guide**<br>
Add the [bundleType](../../../application-dev/quick-start/app-configuration-file.md) tag. This tag can be left blank. The default value is **app**. The setting of this tag and the [installationFree](../../../application-dev/quick-start/module-configuration-file.md) field in the **module.json** file must meet the following rules:
- If **bundleType** is **app**, **installationFree** must be set to **false**.
- If **bundleType** is **atomicService**, **installationFree** must be set to **true**.
## cl.bundlemanager.3 Deleted the split Field from the ApplicationInfo Struct
The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct.
**Change Impact**<br>
If the **split** field is used in your code, the compilation fails.
**Key API/Component Changes**<br>
The **split** field is deleted from the [ApplicationInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ApplicationInfo.d.ts) struct.
**Adaptation Guide**<br>
Delete the **split** field from the **ApplicationInfo** struct of your code. The stage model always forcibly splits bundles.
## cl.bundlemanager.4 Deleted the atomicServiceModuleType Field from the HapModuleInfo Struct
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Change Impact**<br>
If the **atomicServiceModuleType** field is used in your code, the compilation fails.
**Key API/Component Changes**<br>
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Adaptation Guide**<br>
Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value.
## cl.bundlemanager.5 Deleted the AtomicServiceModuleType Enumerated Value
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Change Impact**<br>
If the **atomicServiceModuleType** field is used in your code, the compilation fails.
**Key API/Component Changes**<br>
The **atomicServiceModuleType** field is deleted from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct.
**Adaptation Guide**<br>
Record the setting of the **atomicServiceModuleType** field, delete it from the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct, and set the **moduleType** field in the [HapModuleInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/HapModuleInfo.d.ts) struct to the recorded value.
# Window Subsystem ChangeLog
## cl.window.1 Change of Window Stage Lifecycle Listener Types
Changed the enumerated listener types of the window stage lifecycle in version 4.0.1.1 and later.
**Change Impacts**
Application lifecycle listeners developed using **FOREGROUND** and **BACKGROUND** in versions earlier than 4.0.1.1 will be invalidated in version 4.0.1.1 and later.
**Key API/Component Changes**
## WindowStageEventType<sup>9+</sup>
Before change:
| Name | Value | Description |
| ---------- | ---- | ---------- |
| FOREGROUND | 1 | The window stage is running in the foreground.|
| BACKGROUND | 4 | The window stage is running in the background.|
After change:
| Name | Value | Description |
| ------ | ---- | ---------- |
| SHOWN | 1 | The window stage is running in the foreground.|
| HIDDEN | 4 | The window stage is running in the background.|
**Adaptation Guide**
When registering lifecycle listeners, change the foreground and background event types to **SHOWN** and **HIDDEN**, respectively.
```
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
try {
windowStage.on('windowStageEvent', (stageEventType) => {
switch (stageEventType) {
case window.WindowStageEventType.SHOWN:
console.log("windowStage shown");
break;
case window.WindowStageEventType.ACTIVE:
console.log("windowStage active");
break;
case window.WindowStageEventType.INACTIVE:
console.log("windowStage inActive");
break;
case window.WindowStageEventType.HIDDEN:
console.log("windowStage hidden");
break;
default:
break;
}
} )
} catch (exception) {
console.error('Failed to enable the listener for window stage event changes. Cause:' +
JSON.stringify(exception));
};
}
};
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册