diff --git a/en/release-notes/OpenHarmony-v3.2-beta5.md b/en/release-notes/OpenHarmony-v3.2-beta5.md index 3dd8c303fa230e852ccb018b17dd0edf0fc63056..97d2b1e77fbe06c0d477a315e9354b06c0aa944a 100644 --- a/en/release-notes/OpenHarmony-v3.2-beta5.md +++ b/en/release-notes/OpenHarmony-v3.2-beta5.md @@ -139,7 +139,7 @@ This version has the following updates to OpenHarmony 3.2 Beta4. From this version on, only the public SDK is released. You can obtain the public SDK from the mirror or download it from DevEco Studio for your application development. -To use the full SDK that contains system APIs, you must download the full code, compile and build an SDK file, and switch to the full SDK on DevEco Studio. For details about how to compile the full SDK using the source code, see [Full SDK Compilation Guide](../application-dev/quick-start/full-sdk-compile-guide.md). +To use the full SDK that contains system APIs, you must download the full code, compile and build an SDK file, and switch to the full SDK on DevEco Studio. For details about how to compile the full SDK using the source code, see [Full SDK Compilation Guide](../application-dev/faqs/full-sdk-compile-guide.md). ### Feature Updates diff --git a/en/release-notes/Readme.md b/en/release-notes/Readme.md index e743516aad3642f7c9bb36e152304979d8f7281e..4a49ce72f79cb4ee7879ac8ac9eaa38332dbf977 100644 --- a/en/release-notes/Readme.md +++ b/en/release-notes/Readme.md @@ -1,30 +1,35 @@ # OpenHarmony Release Notes + +## OpenHarmony 4.x Releases + +- [OpenHarmony v4.0 Beta1 (2023-06-03)](OpenHarmony-v4.0-beta1.md) + ## OpenHarmony 3.x Releases - [OpenHarmony v3.2 Release (2023-04-09)](OpenHarmony-v3.2-release.md) -- [OpenHarmony v3.2.1 Release (2023-05-22)](OpenHarmony-v3.2.1-release.md) + - [OpenHarmony v3.2.1 Release (2023-05-22)](OpenHarmony-v3.2.1-release.md) - [OpenHarmony v3.2 Beta5 (2023-01-31)](OpenHarmony-v3.2-beta5.md) - [OpenHarmony v3.2 Beta4 (2022-11-30)](OpenHarmony-v3.2-beta4.md) - [OpenHarmony v3.2 Beta3 (2022-09-30)](OpenHarmony-v3.2-beta3.md) - [OpenHarmony v3.2 Beta2 (2022-07-30)](OpenHarmony-v3.2-beta2.md) - [OpenHarmony v3.2 Beta1 (2022-05-31)](OpenHarmony-v3.2-beta1.md) - [OpenHarmony v3.1 Release (2022-03-30)](OpenHarmony-v3.1-release.md) -- [OpenHarmony v3.1.7 Release (2023-04-04)](OpenHarmony-v3.1.7-release.md) -- [OpenHarmony v3.1.6 Release (2023-02-06)](OpenHarmony-v3.1.6-release.md) -- [OpenHarmony v3.1.5 Release (2023-01-10)](OpenHarmony-v3.1.5-release.md) -- [OpenHarmony v3.1.4 Release (2022-11-02)](OpenHarmony-v3.1.4-release.md) -- [OpenHarmony v3.1.3 Release (2022-09-30)](OpenHarmony-v3.1.3-release.md) -- [OpenHarmony v3.1.2 Release (2022-08-24)](OpenHarmony-v3.1.2-release.md) -- [OpenHarmony v3.1.1 Release (2022-05-31)](OpenHarmony-v3.1.1-release.md) + - [OpenHarmony v3.1.7 Release (2023-04-04)](OpenHarmony-v3.1.7-release.md) + - [OpenHarmony v3.1.6 Release (2023-02-06)](OpenHarmony-v3.1.6-release.md) + - [OpenHarmony v3.1.5 Release (2023-01-10)](OpenHarmony-v3.1.5-release.md) + - [OpenHarmony v3.1.4 Release (2022-11-02)](OpenHarmony-v3.1.4-release.md) + - [OpenHarmony v3.1.3 Release (2022-09-30)](OpenHarmony-v3.1.3-release.md) + - [OpenHarmony v3.1.2 Release (2022-08-24)](OpenHarmony-v3.1.2-release.md) + - [OpenHarmony v3.1.1 Release (2022-05-31)](OpenHarmony-v3.1.1-release.md) - [OpenHarmony v3.1 Beta (2021-12-31)](OpenHarmony-v3.1-beta.md) - [OpenHarmony v3.0 LTS (2021-09-30)](OpenHarmony-v3.0-LTS.md) -- [OpenHarmony v3.0.8 LTS (2022-03-03)](OpenHarmony-v3.0.8-LTS.md) -- [OpenHarmony v3.0.7 LTS (2022-12-05)](OpenHarmony-v3.0.7-LTS.md) -- [OpenHarmony v3.0.6 LTS (2022-09-15)](OpenHarmony-v3.0.6-LTS.md) -- [OpenHarmony v3.0.5 LTS (2022-07-01)](OpenHarmony-v3.0.5-LTS.md) -- [OpenHarmony v3.0.3 LTS (2022-04-08)](OpenHarmony-v3.0.3-LTS.md) -- [OpenHarmony v3.0.2 LTS (2022-03-18)](OpenHarmony-v3.0.2-LTS.md) -- [OpenHarmony v3.0.1 LTS (2022-01-12)](OpenHarmony-v3.0.1-LTS.md) + - [OpenHarmony v3.0.8 LTS (2022-03-03)](OpenHarmony-v3.0.8-LTS.md) + - [OpenHarmony v3.0.7 LTS (2022-12-05)](OpenHarmony-v3.0.7-LTS.md) + - [OpenHarmony v3.0.6 LTS (2022-09-15)](OpenHarmony-v3.0.6-LTS.md) + - [OpenHarmony v3.0.5 LTS (2022-07-01)](OpenHarmony-v3.0.5-LTS.md) + - [OpenHarmony v3.0.3 LTS (2022-04-08)](OpenHarmony-v3.0.3-LTS.md) + - [OpenHarmony v3.0.2 LTS (2022-03-18)](OpenHarmony-v3.0.2-LTS.md) + - [OpenHarmony v3.0.1 LTS (2022-01-12)](OpenHarmony-v3.0.1-LTS.md) ## OpenHarmony 2.x Releases diff --git a/en/release-notes/changelogs/v3.2-Release/Readme-EN.md b/en/release-notes/changelogs/v3.2-Release/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..5f58f851ac1b397530a0b4fc96256232eb22d8e7 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/Readme-EN.md @@ -0,0 +1,13 @@ +# Readme + +- [Ability Framework](changelogs-ability.md) +- [ArkUI](changelogs-arkui.md) +- [Bundle Manager Subsystem](changelogs-bundlemanager.md) +- [Input Method Framework](changelogs-imf.md) +- [Resource Scheduler Subsystem](changelogs-resourceschedule.md) +- [Theme Framework Subsystem - Screenlock](changelogs-screenlock.md) +- [Telephony Subsystem](changelogs-telephony.md) +- [Util Subsystem](changelogs-util.md) +- [Theme Framework Subsystem - Wallpaper](changelogs-wallpaper.md) +- [Web Subsystem](changelogs-web.md) + diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-ability.md b/en/release-notes/changelogs/v3.2-Release/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..b9367b4ce12ae9e48d0dbef5c628e4c0b7400b36 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-ability.md @@ -0,0 +1,283 @@ +# Ability Framework Changelog + +## cl.ability.1 AreaMode APIs Changed + +Duplicate **AreaMode** APIs are deleted. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.common.d.ts | common.AreaMode | | Deleted | +| application/Context.d.ts | AreaMode | | Deleted | + + +**Adaptation Guide** + +Use **AreaMode** in **@ohos.app.ability.contextConstant.d.ts**. + +```ts +import contextConstant from '@ohos.app.ability.contextConstant'; +let area: contextConstant.AreaMode = contextConstant.AreaMode.EL1; +``` + +## cl.ability.2 killProcessesBySelf Renamed + +The **killProcessesBySelf** API is renamed **killAllProcesses**. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------------ | ------------------ | ----------------------------------------------------- | -------- | +| application/ApplicationContext | ApplicationContext | killProcessesBySelf(): Promise\; | Deleted | +| application/ApplicationContext | ApplicationContext | killProcessesBySelf(callback: AsyncCallback\); | Deleted | +| application/ApplicationContext | ApplicationContext | killAllProcesses(): Promise\; | Added | +| application/ApplicationContext | ApplicationContext | killAllProcesses(callback: AsyncCallback\); | Added | + + +**Adaptation Guide** + +The following code snippet shows how to call **killProcessesBySelf** in an application. + +Code before the change: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.killProcessesBySelf() +``` + +Code after the change: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.killAllProcesses() +``` + +## cl.ability.3 getProcessRunningInformation Renamed + +The **getProcessRunningInformation** API is renamed **getRunningProcessInformation**. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ----------------------------------- | ------------------ | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.appManager.d.ts | appManager | function getProcessRunningInformation(): Promise\\>; | Deleted | +| @ohos.app.ability.appManager.d.ts | appManager | function getProcessRunningInformation(callback: AsyncCallback\\>): void; | Deleted | +| @ohos.app.ability.appManager.d.ts | appManager | function getRunningProcessInformation(): Promise\\>; | Added | +| @ohos.app.ability.appManager.d.ts | appManager | function getRunningProcessInformation(callback: AsyncCallback\\>): void; | Added | +| application/ApplicationContext.d.ts | ApplicationContext | getProcessRunningInformation(): Promise\\>; | Deleted | +| application/ApplicationContext.d.ts | ApplicationContext | getProcessRunningInformation(callback: AsyncCallback\\>): void; | Deleted | +| application/ApplicationContext.d.ts | ApplicationContext | getRunningProcessInformation(): Promise\\>; | Added | +| application/ApplicationContext.d.ts | ApplicationContext | getRunningProcessInformation(callback: AsyncCallback\\>): void; | Added | + +**Adaptation Guide** + +The following code snippet shows how to call **getProcessRunningInformation** in an application. + +Code before the change: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.getProcessRunningInformation() +``` + +Code after the change: + +```ts +let context: common.UIAbilityContext = globalThis.abilityContext; +let appContext = context.getApplicationContext(); +appContext.getRunningProcessInformation() +``` + +## cl.ability.4 WantConstant.Flags API Changed + +**WantConstant.Flags** has multiple invalid flag definitions. These invalid flags are deleted. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_FORWARD_RESULT | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_CONTINUATION | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_NOT_OHOS_COMPONENT | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_FORM_ENABLED | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_AUTH_PERSISTABLE_URI_PERMISSION | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_AUTH_PREFIX_URI_PERMISSION | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITYSLICE_MULTI_DEVICE | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_START_FOREGROUND_ABILITY | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_CONTINUATION_REVERSIBLE | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_INSTALL_WITH_BACKGROUND_MODE | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_CLEAR_MISSION | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_NEW_MISSION | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Flags | FLAG_ABILITY_MISSION_TOP | Deleted | + +## cl.ability.5 WantConstant.Action API Changed + +**WantConstant.Action** has multiple invalid action definitions. These invalid actions are deleted. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | ACTION_APP_ACCOUNT_AUTH | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | ACTION_MARKET_DOWNLOAD | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | ACTION_MARKET_CROWDTEST | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_SANDBOX | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_BUNDLE_NAME | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_MODULE_NAME | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Action | DLP_PARAMS_ABILITY_NAME | Deleted | + +## cl.ability.6 Caller APIs Changed + +Caller APIs use the **Parcelable** and **MessageSequence** objects provided by RPC in API version 9 to replace the deprecated **Sequenceable** and **MessageParcel** object. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| api/@ohos.app.ability.UIAbility.d.ts | CalleeCallback | (indata: rpc.MessageParcel): rpc.Sequenceable; | Changed to **(indata: rpc.MessageSequence): rpc.Parcelable;**. | +| api/@ohos.app.ability.UIAbility.d.ts | Caller | call(method: string, data: rpc.Sequenceable): Promise; | Changed to **call(method: string, data: rpc.Parcelable): Promise;**. | +| api/@ohos.app.ability.UIAbility.d.ts | Caller | callWithResult(method: string, data: rpc.Sequenceable): Promise; | Changed to **callWithResult(method: string, data: rpc.Parcelable): Promise;**. | + +**Adaptation Guide** + +The following illustrates how to call the caller APIs in your application. + +Code before the change: + +```ts + class MyMessageAble{ + name:"" + str:"" + num: 1 + constructor(name, str) { + this.name = name; + this.str = str; + } + marshalling(messageParcel) { + messageParcel.writeInt(this.num); + messageParcel.writeString(this.str); + console.log('MyMessageAble marshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + unmarshalling(messageParcel) { + this.num = messageParcel.readInt(); + this.str = messageParcel.readString(); + console.log('MyMessageAble unmarshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + }; + let method = 'call_Function'; + function funcCallBack(pdata) { + console.log('Callee funcCallBack is called ' + pdata); + let msg = new MyMessageAble("test", ""); + pdata.readSequenceable(msg); + return new MyMessageAble("test1", "Callee test"); + } + export default class MainUIAbility extends UIAbility { + onCreate(want, launchParam) { + console.log('Callee onCreate is called'); + try { + this.callee.on(method, funcCallBack); + } catch (error) { + console.log('Callee.on catch error, error.code: ' + error.code + + ' error.message: ' + error.message); + } + } + } +``` + +Code after the change: + +```ts + class MyMessageAble{ + name:"" + str:"" + num: 1 + constructor(name, str) { + this.name = name; + this.str = str; + } + marshalling(messageSequence) { + messageSequence.writeInt(this.num); + messageSequence.writeString(this.str); + console.log('MyMessageAble marshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + unmarshalling(messageSequence) { + this.num = messageSequence.readInt(); + this.str = messageSequence.readString(); + console.log('MyMessageAble unmarshalling num[' + this.num + '] str[' + this.str + ']'); + return true; + } + }; + let method = 'call_Function'; + function funcCallBack(pdata) { + console.log('Callee funcCallBack is called ' + pdata); + let msg = new MyMessageAble("test", ""); + pdata.readParcelable(msg); + return new MyMessageAble("test1", "Callee test"); + } + export default class MainUIAbility extends UIAbility { + onCreate(want, launchParam) { + console.log('Callee onCreate is called'); + try { + this.callee.on(method, funcCallBack); + } catch (error) { + console.log('Callee.on catch error, error.code: ' + error.code + + ' error.message: ' + error.message); + } + } + } +``` + +## cl.ability.7 WantConstant.Flags API Changed + +The **wantConstant** API had two similar enums. Now the two enums are combined into one. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ----------------------------------- | ---------------------- | ----------------------------------- | -------- | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Parameter | ABILITY_BACK_TO_OTHER_MISSION_STACK | Deleted | +| @ohos.app.ability.wantConstant.d.ts | wantConstant.Params | ABILITY_BACK_TO_OTHER_MISSION_STACK | Added | + +**Adaptation Guide** + +Use **ABILITY_BACK_TO_OTHER_MISSION_STACK** in **@ohos.app.ability.wantConstant.d.ts**. + +```ts +import wantConstant from '@ohos.app.ability.wantConstant'; +let backToOtherMissionStack: wantConstant.Params = wantParam.Params.ABILITY_BACK_TO_OTHER_MISSION_STACK; +``` diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md b/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..0a2bf8673fefe00b6736d5cd299e24e5f5acddf2 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-arkui.md @@ -0,0 +1,308 @@ +# ArkUI Subsystem Changelog + +## cl.arkui.1 Return Value Type Change of getInspectorTree + +**Change Impact** + +The code that uses the **getInspectorTree** API in versions earlier than OpenHarmony 3.2.10.7 must be adapted. + +**Key API/Component Changes** + +The return value of the **getInspectorTree** API is changed from the string type to the Object type. + +**Adaptation Guide** + +Adapt the code that takes the return value of **getInspectorTree** as a string.The sample code is as follows: + +- Before change: + +```typescript +console.info(getInspectorTree()) +``` + +- After change: + +```typescript +console.info(JSON.stringify(getInspectorTree())) +``` + +## cl.arkui.2 Deprecation the forceRebuild Attribute of \ + +**Change Impact** + +None. The attribute has no effect. + +**Key API/Component Changes** + +Deprecate the **forceRebuild** attribute of the **\** component. + +**Adaptation Guide** + +Delete the code that uses the **forceRebuild** attribute. This will not affect the functionality of the **\** component. + +## cl.arkui.3 Plugin Module API Changes + + +### 1. API Change in the **PluginComponentTemplate** Module + +Renamed the **ability** parameter **bundleName** to more clearly indicate the intended meaning. + +You need to adapt your application. + + + +**Change Impact** + +The application developed based on earlier versions must be adapted to the change. Otherwise, build errors will occur. + + + +**Key API/Component Changes** + +- Involved APIs: + + interface PluginComponentTemplate { + source: string; + bundleName: string; + } + + interface PluginComponentInterface { + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; +} + +- Before change: + +```js + interface PluginComponentTemplate { source: string; ability: string; } + interface PluginComponentInterface { + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; + } +``` + +- After change: + +```js + interface PluginComponentTemplate { source: string; bundleName: string; } + interface PluginComponentInterface { + (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; + } +``` + +**Adaptation Guide** + +Use the new API. The sample code is as follows: + +- Before change: +```js +PluginComponent({ + template: { source: 'plugincomponent1', ability: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } +}).size({ width: 500, height: 100 }) +``` + +- After change: +```js +PluginComponent({ + template: { source: 'plugincomponent1', bundleName: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } +}).size({ width: 500, height: 100 }) +``` + +### 2. API Change in the **pluginComponentManager** Module + +Renamed the **want** parameter **target** to more clearly indicate the intended meaning. + +You need to adapt your application. + + + +**Change Impact** + +The application developed based on earlier versions must be adapted to the change. Otherwise, alarms will arise. Though the build may be successful, the API will not work as intended. + + + +**Key API/Component Changes** + +- Involved APIs: + + interface PushParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + extraData: KVObject; + jsonPath?: string; + } + + function push(param: PushParameterForStage, callback: AsyncCallback\): void; + + interface RequestParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + jsonPath?: string; + } + + function request(param: RequestParameterForStage, callback: AsyncCallback\): void; + +- Before change: + +```js + interface PushParameterForStage { + owner: Want; + want: Want; + name: string; + data: KVObject; + extraData: KVObject; + jsonPath?: string; + } + + function push(param: PushParameterForStage, callback: AsyncCallback): void; + + interface RequestParameterForStage { + owner: Want; + want: Want; + name: string; + data: KVObject; + jsonPath?: string; + } + + function request(param: RequestParameterForStage, callback: AsyncCallback): void; +``` + +- After change: + +```js + interface PushParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + extraData: KVObject; + jsonPath?: string; + } + + function push(param: PushParameterForStage, callback: AsyncCallback): void; + + interface RequestParameterForStage { + owner: Want; + target: Want; + name: string; + data: KVObject; + jsonPath?: string; + } + + function request(param: RequestParameterForStage, callback: AsyncCallback): void; +``` + +**Adaptation Guide** + +Use the new API. The sample code is as follows: + +- Before change: +```js +import pluginComponentManager from '@ohos.pluginComponent' + +pluginComponentManager.push({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + want: { + bundleName: "com.example.provider", + abilityName: "com.example.provider.MainAbility", + }, + name: "ets/pages/plugin2.js", + data: { + "js": "ets/pages/plugin.js", + "key_1": 1111, + }, + extraData: { + "extra_str": "this is push event" + }, + jsonPath: "", + }, + (err, data) => { + console.log("push_callback:err: " ,JSON.stringify(err)); + console.log("push_callback:data: " , JSON.stringify(data)); + console.log("push_callback: push ok!"); + } +) + +pluginComponentManager.request({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + want: { + bundleName: "com.example.provider", + abilityName: "ets/pages/plugin2.js", + }, + name: "plugintemplate", + data: { + "key_1": " myapplication plugin component test", + "key_2": 123456 + }, + jsonPath: "", +}, + (err, data) => { + console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) + console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) + } +) +``` + +- After change: +```js +import pluginComponentManager from '@ohos.pluginComponent' + +pluginComponentManager.push({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + target: { + bundleName: "com.example.provider", + abilityName: "com.example.provider.MainAbility", + }, + name: "ets/pages/plugin2.js", + data: { + "js": "ets/pages/plugin.js", + "key_1": 1111, + }, + extraData: { + "extra_str": "this is push event" + }, + jsonPath: "", + }, + (err, data) => { + console.log("push_callback:err: " ,JSON.stringify(err)); + console.log("push_callback:data: " , JSON.stringify(data)); + console.log("push_callback: push ok!"); + } +) + +pluginComponentManager.request({ + owner:{ + bundleName:"com.example.provider", + abilityName:"com.example.provider.MainAbility" + }, + target: { + bundleName: "com.example.provider", + abilityName: "ets/pages/plugin2.js", + }, + name: "plugintemplate", + data: { + "key_1": " myapplication plugin component test", + "key_2": 123456 + }, + jsonPath: "", +}, + (err, data) => { + console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) + console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) + } +) +``` diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md b/en/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md new file mode 100644 index 0000000000000000000000000000000000000000..2aa79ad27454a6277da0bb106de84c3529593d58 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-bundlemanager.md @@ -0,0 +1,298 @@ +# Bundle Manager Subsystem Changelog + +## cl.bundlemanager.1 Deleted getAbilityIcon + +The **getAbilityIcon** API in [@ohos.bundle.bundleManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) is deleted. The **getMediaContent** API in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) can be used instead. + +**Change Impact**
+The **getAbilityIcon** API does not take effect. + +**Key API/Component Changes**
+The **getAbilityIcon** API is deleted from **@ohos.bundle.bundleManager.d.ts**. + +**Adaptation Guide**
+If your application uses **getAbilityIcon** in **@ohos.bundle.bundleManager.d.ts**, replace it with **getMediaContent** in **@ohos.resourceManager.d.ts**. You need to obtain the icon ID in advance. For details, see [Usage Guide](../../../application-dev/reference/apis/js-apis-resource-manager.md#getmediacontent9). + +## cl.bundlemanager.2 Bottom-Layer Capability Changed So That Only the System Resource HAP Supports Custom Permissions + +Only the system resource HAP supports custom permissions. During HAP parsing, the bundle manager module parses the **definePermissions** field only in the configuration file of the resource HAP (bundle name: **ohos.global.systemres**), but not this field in other HAPs. This field is used to define permissions. +If an application requires custom permissions, add the permissions under the **definePermissions** field in the [configuration file](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) of the system resource HAP. For details about the permission format, see [Defining Permissions](../../../application-dev/quick-start/module-structure.md#internal-structure-of-the-definepermissions-attribute). + + +**Change Impact**
+After an upgrade to the new version image, the custom permission of the application does not take effect, and the authorization fails. + +**Key API/Component Changes**
+The bottom-layer capability of the bundle manager module is changed. Only the system resource HAP supports custom permissions. + +**Adaptation Guide**
+If an application requires custom permissions, add the permissions under the **definePermissions** field in the [configuration file](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) of the system resource HAP. For details about the permission format, see [Defining Permissions](../../../application-dev/quick-start/module-structure.md#internal-structure-of-the-definepermissions-attribute). + +## cl.bundlemanager.3 Level-2 Module File Names Changed + +The level-2 module file names of the bundle manager module are changed to their respective API names in the file, as listed below. + +| Original File Name|New File Name| +|----|----| +| bundleManager/abilityInfo.d.ts | bundleManager/AbilityInfo.d.ts | +| bundleManager/applicationInfo.d.ts | bundleManager/ApplicationInfo.d.ts | +| bundleManager/bundleInfo.d.ts | bundleManager/BundleInfo.d.ts | +| bundleManager/dispatchInfo.d.ts | bundleManager/DispatchInfo.d.ts | +| bundleManager/elementName.d.ts | bundleManager/ElementName.d.ts | +| bundleManager/extensionAbilityInfo.d.ts | bundleManager/ExtensionAbilityInfo.d.ts | +| bundleManager/hapModuleInfo.d.ts | bundleManager/HapModuleInfo.d.ts | +| bundleManager/launcherAbilityInfo.d.ts | bundleManager/LauncherAbilityInfo.d.ts | +| bundleManager/metadata.d.ts | bundleManager/Metadata.d.ts | +| bundleManager/packInfo.d.ts | bundleManager/BundlePackInfo.d.ts | +| bundleManager/permissionDef.d.ts | bundleManager/PermissionDef.d.ts | +| bundleManager/remoteAbilityInfo.d.ts | bundleManager/RemoteAbilityInfo.d.ts | +| bundleManager/shortcutInfo.d.ts | bundleManager/ShortcutInfo.d.ts | + +To sum up, except **packInfo**, which is changed to **BundlePackInfo**, the other file names are changed to start with uppercase letters. + +**Change Impact**
+The change of the level-2 module file names does not affect the use of the level-1 module. If a level-2 module interface under **bundleManager** is directly imported to the .ts file and an error is reported during compilation on DevEco Studio, you must change the name of the imported file. + +**Key API/Component Changes**
+The .d.ts file names in the **bundleManager** folder are changed to their respective API names in the file. + +**Adaptation Guide**
+Generally, no adaptation is required. If a file in the **bundleManager** folder is directly imported to the application, you must change the imported file name as follows: + +**Before change:** +```ts +import {AbilityInfo} from 'bundleManger/abilityInfo'; +import {ExtensionAbilityInfo} from 'bundleManger/extensionAbilityInfo'; +import {BundlePackInfo} from 'bundleManger/packInfo'; +``` +**After change:** +```ts +import {AbilityInfo} from 'bundleManger/AbilityInfo'; +import {ExtensionAbilityInfo} from 'bundleManger/ExtensionAbilityInfo'; +import {BundlePackInfo} from 'bundleManger/BundlePackInfo'; +``` + +## cl.bundlemanager.4 LaunchType Enum Type Name Changed from STANDARD to MULTITON + +The enum type name of [LaunchType](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.bundle.bundleManager.d.ts) is changed from **STANDARD** to **MULTITON**. The enum value remains unchanged, indicating the multi-instance type. + +**Change Impact**
+The **LaunchType.STANDARD** type does not take effect. + +**Key API/Component Changes**
+The enum type name of **LaunchType** is changed from **STANDARD** to **MULTITON**. + +**Adaptation Guide**
+Change **LaunchType.STANDARD** to **LaunchType.MULTITON** for your application. + +## cl.bundlemanager.5 Changed the isVisible Field in the AbilityInfo Struct to exported + +The **isVisible** field in the [AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities. + +**Change Impact**
+The **isVisible** field does not take effect. + +**Key API/Component Changes**
+The **isVisible** field in the [AbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/AbilityInfo.d.ts) struct is changed to **exported**, and the type remains unchanged. + +**Adaptation Guide**
+Change **isVisible** to **exported** for your application. + +## cl.bundlemanager.6 Changed the isVisible Field in the ExtensionAbilityInfo Struct to exported + +The **isVisible** field in the [ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities. + +**Change Impact**
+The **isVisible** field does not take effect. + +**Key API/Component Changes**
+The **isVisible** field in the [ExtensionAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/ExtensionAbilityInfo.d.ts) struct is changed to **exported**, and the type remains unchanged. + +**Adaptation Guide**
+Change **isVisible** to **exported** for your application. + +## cl.bundlemanager.7 Changed the visible Field in the ModuleAbilityInfo Struct to exported + +The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts) struct is changed to **exported**. The type remains unchanged, indicating whether the ability can be exported and used by other abilities. + +**Change Impact**
+The **visible** field does not take effect. + +**Key API/Component Changes**
+The **visible** field in the [ModuleAbilityInfo](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/bundleManager/BundlePackInfo.d.ts) struct is changed to **exported**, and the type remains unchanged. + +**Adaptation Guide**
+Change **visible** to **exported** for your application. + +## cl.bundlemanager.8 Deleted the distributedNotificationEnabled Tag from the app.json Configuration File +The [distributedNotificationEnabled](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.9 Deleted the entityType Tag from the app.json Configuration File +The [entityType](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.10 Deleted the keepAlive Tag from the app.json Configuration File +The [keepAlive](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.11 Deleted the removable Tag from the app.json Configuration File +The [removable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.12 Deleted the singleton Tag from the app.json Configuration File +The [singleton](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.13 Deleted the userDataClearable Tag from the app.json Configuration File +The [userDataClearable](../../../application-dev/quick-start/app-configuration-file.md) tag is deleted from the **app.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.14 No Longer Chinese Characters for the name Tag under module in the module.json Configuration File +The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **module** in the **module.json** configuration file does not support Chinese characters. + +**Change Impact**
+If the tag is set to Chinese, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Set this tag to English. + +## cl.bundlemanager.15 No Longer Chinese Characters for the name Tag under ability in the module.json Configuration File +The value of [name](../../../application-dev/quick-start/module-configuration-file.md) under **ability** in the **module.json** configuration file does not support Chinese characters. + +**Change Impact**
+If the tag is set to Chinese, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Set this tag to English. + +## cl.bundlemanager.16 Deleted the uiSyntax Tag from the module.json Configuration File +The [uiSyntax](../../../application-dev/quick-start/module-configuration-file.md) tag is deleted from the **module.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.17 Changed srcEntrance to srcEntry in the module.json Configuration File +The [srcEntrance](../../../application-dev/quick-start/module-configuration-file.md) tag under **module** and **ability** in the **module.json** configuration file is changed to **srcEntry**. + +**Change Impact**
+If the **srcEntrance** tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Replace the **srcEntrance** tag with **srcEntry** in the configuration file. + +## cl.bundlemanager.18 Deleted the apiVersion Tag Under distroFilter from the module.json Configuration File +The **apiVersion** tag under [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) is deleted from the **module.json** configuration file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete this tag from the configuration file. + +## cl.bundlemanager.19 Changed distroFilter to distributionFilter in the module.json Configuration File +The [distroFilter](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** configuration file is changed to **distributionFilter**. + +**Change Impact**
+If the **distroFilter** tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Replace **distroFilter** with **distributionFilter** in the configuration file. + +## cl.bundlemanager.20 Changed standard of launchType to multiton in the module.json Configuration File +The **standard** mode of the [launchType](../../../application-dev/quick-start/module-configuration-file.md) tag in the **module.json** file is changed to **multiton**. + +**Adaptation Guide**
+Replace **standard** of **launchType** to **multiton** in the configuration file. + +## cl.bundlemanager.21 Deleted the atomicService Tag from the app.json File +The **atomicService** tag is deleted from the **app.json** file. + +**Change Impact**
+If this tag is used, an error is reported during compilation on DevEco Studio. + +**Adaptation Guide**
+Delete the **atomicService** tag from your code. + +## cl.bundlemanager.22 Added the bundleType Tag to the app.json File +The **bundleType** tag is added to the **app.json** file. + +**Change Impact**
+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**
+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.23 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**
+If the **split** field is used in your code, the compilation fails. + +**Key API/Component Changes**
+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**
+Delete the **split** field from the **ApplicationInfo** struct of your code. The stage model always forcibly splits bundles. + +## cl.bundlemanager.24 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**
+If the **atomicServiceModuleType** field is used in your code, the compilation fails. + +**Key API/Component Changes**
+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**
+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.25 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**
+If the **atomicServiceModuleType** field is used in your code, the compilation fails. + +**Key API/Component Changes**
+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**
+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. diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-imf.md b/en/release-notes/changelogs/v3.2-Release/changelogs-imf.md new file mode 100644 index 0000000000000000000000000000000000000000..f158d99d9a0023c67ad982fc6b687563121f4dac --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-imf.md @@ -0,0 +1,19 @@ +# Input Method Framework Subsystem – Input Method Framework Service Changelog + + +## @ohos.InputMethodSubtype Change of name, label, and id +Changed the **name**, **label**, and **id** attributes since API version 9. + +**Change Impact** + +Applications must be adapted to the following changes. + +| Name| Before Change| After Change| +| -------- | -------- | -------- | +| label | (1) Value: ID of the input method subtype.| (1) Value: Label of the input method subtype.| +| name | (1) Description: Name of the input method subtype. (2) Value: Label of the input method subtype.| (1) Description: Bundle name of the input method; (2) Value: Bundle name of the input method.| +| id | (1) Value: Bundle name of the input method.| (1) Value: ID of the input method subtype.| + +**Adaptation Guide** + +Update the code to adapt to the preceding changes. diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md b/en/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md new file mode 100644 index 0000000000000000000000000000000000000000..283f2796178e294f68f755ea2570f7cc1a24a634 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-resourceschedule.md @@ -0,0 +1,21 @@ +# Resource Scheduler Subsystem Changelog + +## cl.resourceschedule.workScheduler +The data type of the **parameters** attribute value is changed. Specifically, the number, string, and boolean types are supported, but the any type is not. + +**Change Impact** + +For applications developed based on OpenHarmony3.2.10.7 and later SDK versions, the **parameters** attribute value can use the number, string, and boolean types only. If it uses the any type, a compilation error is reported. + +**Key API/Component Changes** + +The **parameters** attribute in @ohos.resourceschedule.workScheduler.d.ts is changed. + +| Class| API Type| Statement Before the Change| Statement After the Change| +| -- | -- | -- | -- | +| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | parameters?: {[key: string]: number | string | boolean} | + + +**Adaptation Guide** + +The **parameters** attribute uses the {[key: string]: number | string | boolean} data type. diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-screenlock.md b/en/release-notes/changelogs/v3.2-Release/changelogs-screenlock.md new file mode 100644 index 0000000000000000000000000000000000000000..deeaac319aecfd4ba2824b8f23370d6fe2601adc --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-screenlock.md @@ -0,0 +1,157 @@ +# Theme Framework Subsystem – Screenlock Management Service Changelog + + +## cl.screenlock.1 Permission Change of isLocked and unlock +Changed the **isLocked** and **unlock** APIs to system APIs since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. + +- Involved APIs: + +```js + function isLocked(): boolean; + function unlock(callback: AsyncCallback): void; + function unlock():Promise; +``` + +- Before change: + +```js + * Checks whether the screen is currently locked. + * + * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. + * @syscap SystemCapability.MiscServices.ScreenLock + * @since 9 + */ + function isLocked(): boolean; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @systemapi Hide this for inner system use. + * @since 9 + */ + function unlock(callback: AsyncCallback): void; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @systemapi Hide this for inner system use. + * @since 9 + */ + function unlock():Promise; +``` + +- After change: + +```js + * Checks whether the screen is currently locked. + * + * @returns Returns {@code true} if the screen is currently locked; returns {@code false} otherwise. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.ScreenLock + * @systemapi Hide this for inner system use. + * @since 9 + */ + function isLocked(): boolean; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @since 9 + */ + function unlock(callback: AsyncCallback): void; + + /** + * Unlock the screen. + * + * @returns Returns {@code true} if the screen is unlocked successfully; returns {@code false} otherwise. + * @throws {BusinessError} 13200002 - the screenlock management service is abnormal. + * @syscap SystemCapability.MiscServices.ScreenLock + * @since 9 + */ + function unlock():Promise; +``` + + +**Adaptation Guide** + +Make sure the APIs are only invoked by system applications. + +The code snippet is as follows: + +```js + try { + let ret = screenLock.isLocked(); + console.error(`Obtain whether the screen is locked successfully , ret is: ${ret}`); + } catch (error) { + console.error(`Failed to obtain whether the screen is locked, error is : ${error.code}, ${error.message}`); + } +``` + +```js + screenlock.unlock((err, data) => { + if (err) { + console.error(`Failed to unlock the screen, because: ${err.message}`); + return; + } + console.info(`unlock the screen successfully. result: ${data}`); + }); +``` + +```js + screenlock.unlock().then((data) => { + console.info(`unlock the screen successfully. result: ${data}`); + }).catch((err) => { + console.error(`Failed to unlock the screen, because: ${err.message}`); + }); +``` + + +## cl.screenlock.2 Deprecation of isSecure +Deprecated the **isSecure** API since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The API can no longer be used after being deleted. + +- Involved APIs: + +```js + function isSecure(): boolean; +``` + +- Before change: + +```js + function isSecure(): boolean; +``` + +- After change: + + The API is deleted. + + +**Adaptation Guide** + +Update the code so that the deprecated API is not used. diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-telephony.md b/en/release-notes/changelogs/v3.2-Release/changelogs-telephony.md new file mode 100644 index 0000000000000000000000000000000000000000..b39b2012c1a52d6bce9bf7f3f2955fd6e49e4ce7 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-telephony.md @@ -0,0 +1,223 @@ +# Telephony Subsystem Changelog + + + +## cl.telephony.1 Call Module reject API Change +Changed the `reject` API to the `rejectCall` API in the call module of the telephony subsystem since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The `reject` API is deprecated and cannot be used anymore. Use the `rejectCall` API instead. Otherwise, relevant functions will be affected. + +- Involved APIs: + +```js + function reject(callId: number, callback: AsyncCallback): void; + function reject(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void; + function reject(callId?: number, options?: RejectMessageOptions): Promise; + function reject(callback: AsyncCallback): void; + function reject(options: RejectMessageOptions, callback: AsyncCallback): void; +``` + +- Before change: + +```js + function reject(callId: number, callback: AsyncCallback): void; + function reject(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void; + function reject(callId?: number, options?: RejectMessageOptions): Promise; + function reject(callback: AsyncCallback): void; + function reject(options: RejectMessageOptions, callback: AsyncCallback): void; +``` + +- After change: + +```js + function rejectCall(callId: number, callback: AsyncCallback): void; + function rejectCall(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void; + function rejectCall(callId?: number, options?: RejectMessageOptions): Promise; + function rejectCall(callback: AsyncCallback): void; + function rejectCall(options: RejectMessageOptions, callback: AsyncCallback): void; +``` + + +**Adaptation Guide** + +The `reject` API is deprecated and cannot be used anymore. Use the `rejectCall` API instead. +Use the new API. The sample code is as follows: + +```js +call.rejectCall("138xxxxxxxx", (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let rejectMessageOptions={ + messageContent: "Unknown number blocked" +} +let promise = call.rejectCall(1, rejectMessageOptions); +promise.then(data => { + console.log(`rejectCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`rejectCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +let rejectMessageOptions={ + messageContent: "Unknown number blocked" +} +let promise = call.rejectCall(1, rejectMessageOptions); +promise.then(data => { + console.log(`rejectCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`rejectCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +call.rejectCall((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let rejectMessageOptions={ + messageContent: "Unknown number blocked" +} +call.rejectCall(rejectMessageOptions, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## cl.telephony.2 Call Module answer API Change +Changed the `answer` API to the `answerCall` API in the call module of the telephony subsystem since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The `answer` API is deprecated and cannot be used anymore. Use the `answerCall` API instead. Otherwise, relevant functions will be affected. + +- Involved APIs: + +```js + function answer(callId: number, callback: AsyncCallback): void; + function answer(callId?: number): Promise; + function answer(callback: AsyncCallback): void; +``` + +- Before change: + +```js + function answer(callId: number, callback: AsyncCallback): void; + function answer(callId?: number): Promise; + function answer(callback: AsyncCallback): void; +``` + +- After change: + +```js + function answerCall(callId: number, callback: AsyncCallback): void; + function answerCall(callId?: number): Promise; + function answerCall(callback: AsyncCallback): void; +``` + + +**Adaptation Guide** + +The `answer` API is deprecated and cannot be used anymore. Use the `answerCall` API instead. +Use the new API. The sample code is as follows: + +```js +call.answerCall(1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let promise = call.answerCall(1); +promise.then(data => { + console.log(`answerCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`answerCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +call.answerCall((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## cl.telephony.1 Call Module hangup API Change +Changed the `hangup` API to the `hangUpCall` API in the call module of the telephony subsystem since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The `hangup` API is deprecated and cannot be used anymore. Use the `hangUpCall` API instead. Otherwise, relevant functions will be affected. + +- Involved APIs: + +```js + function hangup(callId: number, callback: AsyncCallback): void; + function hangup(callId?: number): Promise; + function hangup(callback: AsyncCallback): void; +``` + +- Before change: + +```js + function hangup(callId: number, callback: AsyncCallback): void; + function hangup(callId?: number): Promise; + function hangup(callback: AsyncCallback): void; +``` + +- After change: + +```js + function hangUpCall(callId: number, callback: AsyncCallback): void; + function hangUpCall(callId?: number): Promise; + function hangUpCall(callback: AsyncCallback): void; +``` + + +**Adaptation Guide** + +The `hangup` API is deprecated and cannot be used anymore. Use the `hangUpCall` API instead. +Use the new API. The sample code is as follows: + +```js +call.hangUpCall(1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +let promise = call.hangUpCall(1); +promise.then(data => { + console.log(`hangUpCall success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`hangUpCall fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +```js +call.hangUpCall((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-util.md b/en/release-notes/changelogs/v3.2-Release/changelogs-util.md new file mode 100644 index 0000000000000000000000000000000000000000..52035aa2be49e1f11d72e91ec65f413112f5f13a --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-util.md @@ -0,0 +1,99 @@ +# Util Subsystem Changelog + +Compared with OpenHarmony 3.2 Beta4, OpenHarmony 3.2.10.7(MR) has the following API changes in the util subsystem. + +## cl.util.1. randomUUID Name Changed +The **randomUUID** function name is changed to **generateRandomUUID**. + +Before change: function randomUUID(entropyCache?: boolean): string
After change: function generateRandomUUID(entropyCache?: boolean): string + +You need to adapt your application. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Method/Attribute/Enum/Constant | Change Type| +| :---------- | ------------------- | ------- | +| @ohos.util | function randomUUID(entropyCache?: boolean): string | Deleted | +| @ohos.util | function generateRandomUUID(entropyCache?: boolean): string| Added | + +**Adaptation Guide** + +Refer to the code snippet below to call **generateRandomUUID** in your application. + +Example: + +```ts +import util from '@ohos.util' +let uuid = util.generateRandomUUID(true); +console.log("RFC 4122 Version 4 UUID:" + uuid); +// Output: +// RFC 4122 Version 4 UUID:88368f2a-d5db-47d8-a05f-534fab0a0045 +``` + +## cl.util.2 randomBinaryUUID Name Changed +The **randomBinaryUUID** function name is changed to **generateRandomBinaryUUID**. + +Before change: function randomBinaryUUID(entropyCache?: boolean): Uint8Array
After change: function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array + +You need to adapt your application. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Method/Attribute/Enum/Constant | Change Type| +| :---------- | ------------------- | ------- | +| @ohos.util | function randomBinaryUUID(entropyCache?: boolean): Uint8Array; | Deleted | +| @ohos.util | function generateRandomBinaryUUID(entropyCache?: boolean): Uint8Array| Added | + +**Adaptation Guide** + +Refer to the code snippet below to call **generateRandomBinaryUUID** in your application. + +Example: + +```ts +import util from '@ohos.util' +let uuid = util.generateRandomBinaryUUID(true); +console.log(JSON.stringify(uuid)); +// Output: +// 138,188,43,243,62,254,70,119,130,20,235,222,199,164,140,150 +``` + +## cl.util.3. contains Parameter Type in the LRUCache Class Changed +The **contains** parameter type in the LRUCache class is changed from **object** to **K**. + +Before change: contains(key: object): boolean
After change: contains(key: K): boolean + +You need to adapt your application. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| :-------- | ---------| -------------------------------- | -------- | +| @ohos.util | LRUCache | contains(key: object): boolean | Deleted | +| @ohos.util | LRUCache | contains(key: K): boolean | Added | + +**Adaptation Guide** + +Follow the code snippet to use the **contains** function in your application. + +Example: + +```ts +import util from '@ohos.util' +let pro = new util.LRUCache(); +pro.put(2,10); +let obj = {1:"key"}; +let result = pro.contains(obj); +``` diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-wallpaper.md b/en/release-notes/changelogs/v3.2-Release/changelogs-wallpaper.md new file mode 100644 index 0000000000000000000000000000000000000000..18fff418c0723c7508f6c7eacdb318b95758402b --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-wallpaper.md @@ -0,0 +1,306 @@ +# Theme Framework Subsystem – Wallpaper Management Service Changelog + + +## cl.wallpaper.1 Permission Change of getColorsSync, getMinHeightSync, getMinWidthSync, restore, and setImage +Changed the **getColorsSync**, **getMinHeightSync**, **getMinWidthSync**, restore, and **setImage** APIs to system APIs since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. + +- Involved APIs: + +```js + function getColorsSync(wallpaperType: WallpaperType): Array; + function getMinHeightSync(): number; + function getMinWidthSync(): number; + function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; + function restore(wallpaperType: WallpaperType): Promise; + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; +``` + +- Before change: + +```js + /** + * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. + * @param wallpaperType Indicates the wallpaper type. + * @returns { Array } the Array returned by the function. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getColorsSync(wallpaperType: WallpaperType): Array; + + /** + * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getMinHeightSync(): number; + + /** + * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function getMinWidthSync(): number; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function restore(wallpaperType: WallpaperType): Promise; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @throws {BusinessError} 202 - permission verification failed, application which is not a system application uses system API. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @systemapi Hide this for inner system use. + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; +``` + +- After change: + +```js + /** + * Obtains the wallpaper colors for the wallpaper of the specified type. Returns rgbaColor type of array callback function. + * @param wallpaperType Indicates the wallpaper type. + * @returns { Array } the Array returned by the function. + * @throws {BusinessError} 401 - parameter error. + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function getColorsSync(wallpaperType: WallpaperType): Array; + + /** + * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function getMinHeightSync(): number; + + /** + * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. + * @returns { number } the number returned by the function. + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function getMinWidthSync(): number; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Removes a wallpaper of the specified type and restores the default one. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function restore(wallpaperType: WallpaperType): Promise; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; + + /** + * Sets a wallpaper of the specified type based on the uri path from a JPEG or PNG file or the pixel map of a PNG file. + * @param source Indicates the uri path from a JPEG or PNG file or the pixel map of the PNG file. + * @param wallpaperType Indicates the wallpaper type. + * @throws {BusinessError} 401 - parameter error. + * @throws {BusinessError} 201 - permission denied. + * @permission ohos.permission.SET_WALLPAPER + * @syscap SystemCapability.MiscServices.Wallpaper + * @since 9 + */ + function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; +``` + + +**Adaptation Guide** + +Make sure the APIs are only invoked by system applications. + +The code snippet is as follows: + +```js + try { + let colors = wallpaper.getColorsSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM); + console.log(`success to getColorsSync: ${JSON.stringify(colors)}`); + } catch (error) { + console.error(`failed to getColorsSync because: ${JSON.stringify(error)}`); + } +``` + +```js + let minHeight = wallpaper.getMinHeightSync(); +``` + +```js + let minWidth = wallpaper.getMinWidthSync(); +``` + +```js + wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { + if (error) { + console.error(`failed to restore because: ${JSON.stringify(error)}`); + return; + } + console.log(`success to restore.`); + }); +``` + +```js + wallpaper.restore(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { + console.log(`success to restore.`); + }).catch((error) => { + console.error(`failed to restore because: ${JSON.stringify(error)}`); + }); +``` + +```js + // The source type is string. + let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; + wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { + if (error) { + console.error(`failed to setImage because: ${JSON.stringify(error)}`); + return; + } + console.log(`success to setImage.`); + }); +``` + +```js + // The source type is string. + let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; + wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { + console.log(`success to setImage.`); + }).catch((error) => { + console.error(`failed to setImage because: ${JSON.stringify(error)}`); + }); +``` + + +## cl.wallpaper.2 Deprecation of getIdSync, getFileSync, isChangeAllowed, isUserChangeAllowed, on, off, and RgbaColor +Deprecated the **getIdSync**, **getFileSync**, **isChangeAllowed**, **isUserChangeAllowed**, **on**, **off**, and **RgbaColor** APIs since API version 9. + +You need to adapt your application based on the following information. + +**Change Impact** + +The APIs can no longer be used after being deleted. + +- Involved APIs: + +```js + function getIdSync(wallpaperType: WallpaperType): number; + function getFileSync(wallpaperType: WallpaperType): number; + function isChangeAllowed(): boolean; + function isUserChangeAllowed(): boolean; + function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; + function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; + interface RgbaColor { + red: number; + green: number; + blue: number; + alpha: number; + } +``` + +- Before change: + +```js + function getIdSync(wallpaperType: WallpaperType): number; + function getFileSync(wallpaperType: WallpaperType): number; + function isChangeAllowed(): boolean; + function isUserChangeAllowed(): boolean; + function on(type: 'colorChange', callback: (colors: Array, wallpaperType: WallpaperType) => void): void; + function off(type: 'colorChange', callback?: (colors: Array, wallpaperType: WallpaperType) => void): void; + interface RgbaColor { + red: number; + green: number; + blue: number; + alpha: number; + } +``` + +- After change: + + The APIs are deleted. + + +**Adaptation Guide** + +Update the code so that the deprecated APIs are not used. diff --git a/en/release-notes/changelogs/v3.2-Release/changelogs-web.md b/en/release-notes/changelogs/v3.2-Release/changelogs-web.md new file mode 100644 index 0000000000000000000000000000000000000000..806f1270619d8aec7e7efcf95f41b7a45cc602e8 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-Release/changelogs-web.md @@ -0,0 +1,467 @@ +# Web Subsystem Changelog + +Compared with earlier versions, OpenHarmony 3.2.10.7 has the following API changes in its web subsystem: + +## cl.web.1 HitTestTypeV9 Name Change + +Renamed the enum class **HitTestTypeV9** **WebHitTestType** to meet the naming conventions. + +**Change Impact** + +The enum class **HitTestTypeV9** and APIs that use **HitTestTypeV9** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions. + +**Key API/Component Changes** + +- Involved APIs: + + enum HitTestTypeV9 + +- Before change: + + ```ts + enum HitTestTypeV9 + ``` + +- After change: + + ```ts + enum WebHitTestType + ``` + +**Adaptation Guide** + +Replace **HitTestTypeV9** with **WebHitTestType**. + +## cl.web.2 HeaderV9 Name Change + +Renamed the struct **HeaderV9** **WebHeader** to meet the naming conventions. + +**Change Impact** + +The struct **HeaderV9** and APIs that use **HeaderV9** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions. + +**Key API/Component Changes** + +- Involved APIs: + + interface HeaderV9 + +- Before change: + + ```ts + interface HeaderV9 + ``` + +- After change: + + ```ts + interface WebHeader + ``` + +**Adaptation Guide** + +Replace **HeaderV9** with **WebHeader**. + +## cl.web.3 Member Change of HitTestValue + +Rename the member variable **HitTestTypeV9** in the **HitTestValue** struct **WebHitTestType** to meet the naming conventions. + +**Change Impact** + +The struct **HitTestValue** and APIs that use **HitTestValue** as a parameter or return value cannot be used in OpenHarmony 3.2.10.7 and later versions. + +**Key API/Component Changes** + +- Involved APIs: + + interface HitTestValue + +- Before change: + + ```ts + interface HitTestValue { + + /** + * Get the hit test type. + * + * @since 9 + */ + type: HitTestTypeV9; + + /** + * Get the hit test extra data. + * + * @since 9 + */ + extra: string; + } + ``` + +- After change: + + ```ts + interface HitTestValue { + + /** + * Get the hit test type. + * + * @since 9 + */ + type: WebHitTestType; + + /** + * Get the hit test extra data. + * + * @since 9 + */ + extra: string; + } + ``` + +**Adaptation Guide** + +Replace **HitTestTypeV9** with **WebHitTestType**. + +## cl.web.4 Parameter Type Change of loadUrl + +Changed the type of the **headers** parameter in **loadUrl** to **WebHeader** to meet the naming conventions. + +**Change Impact** + +The **loadUrl** API that uses the **headers** parameter cannot be used in OpenHarmony 3.2.10.7 and later versions. + +**Key API/Component Changes** + +- Involved APIs: + + loadUrl(url: string | Resource, headers?: Array\): void + +- Before change: + + ```ts + loadUrl(url: string | Resource, headers?: Array): void + ``` + +- After change: + + ```ts + loadUrl(url: string | Resource, headers?: Array): void + ``` + +**Adaptation Guide** + +Change the type of the **headers** parameter in **loadUrl** from **HeaderV9** to **WebHeader**. + +## cl.web.5 Return Value Type Change of getHitTest + +Changed the return value type of the **getHitTest** API to **WebHitTest** to meet the naming conventions. + +**Change Impact** + +The **getHitTest** API cannot be used in OpenHarmony 3.2.10.7 and later versions. + +**Key API/Component Changes** + +- Involved APIs: + + getHitTest(): HitTestTypeV9 + +- Before change: + + ```ts + getHitTest(): HitTestTypeV9 + ``` + +- After change: + + ```ts + getHitTest(): WebHitTestType + ``` + +**Adaptation Guide** + +Change the return value type of the **getHitTest** API from **HitTestTypeV9** to **WebHitTestType**. + +## cl.web.6 Moving of the WebMessagePort Class + +Moved the **WebMessagePort** class to **@ohos.web.webview.d.ts** and added error throwing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. + +**Key API/Component Changes** + +- Involved APIs: + + postMessageEvent(message: WebMessageEvent): void; + onMessageEvent(callback: (result: string) => void): void; + +- Before change: + + ```ts + postMessageEvent(message: WebMessageEvent): void; + onMessageEvent(callback: (result: string) => void): void; + ``` + +- After change: + + ```ts + postMessageEvent(message: WebMessage): void; + onMessageEvent(callback: (result: WebMessage) => void): void; + ``` + +**Adaptation Guide** + +Instead of importing APIs from the original **WebMessagePort** class, import APIs from **@ohos.web.webview** as follows: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.7 Moving of the HitTestValue Class + +Moved the **HitTestValue** class to **@ohos.web.webview.d.ts**; changed **HitTestValue** from a class to an API; changed the **getType** and **getExtra** from APIs to attributes. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. + +**Key API/Component Changes** + +- Involved APIs: + + getType(): HitTestType; + getExtra(): string; + +- Before change: + + ```ts + getType(): HitTestType; + getExtra(): string; + ``` + +- After change: + + ```ts + type: WebHitTestType; + extra: string; + ``` + +**Adaptation Guide** + +Instead of importing APIs from the original **HitTestValue** class, import APIs from **@ohos.web.webview** as follows: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.8 Moving of API Version 9 APIs Under WebCookie + +Moved APIs of API version 9 in the **WebCookie** class to **web.webview.webview.WebCookieManager** +and added error throwing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. +The APIs in the class are static. + +**Key API/Component Changes** + +- Involved APIs: + + isCookieAllowed(): boolean; + isThirdPartyCookieAllowed(): boolean; + putAcceptCookieEnabled(accept: boolean): void; + putAcceptThirdPartyCookieEnabled(accept: boolean): void; + setCookie(url: string, value: string): boolean; + saveCookieSync(): boolean; + getCookie(url: string): string; + existCookie(): boolean; + deleteEntireCookie(): void; + deleteSessionCookie(): void; + +- Before change: + + ```ts + isCookieAllowed(): boolean; + isThirdPartyCookieAllowed(): boolean; + putAcceptCookieEnabled(accept: boolean): void; + putAcceptThirdPartyCookieEnabled(accept: boolean): void; + setCookie(url: string, value: string): boolean; + saveCookieSync(): boolean; + getCookie(url: string): string; + existCookie(): boolean; + deleteEntireCookie(): void; + deleteSessionCookie(): void; + ``` + +- After change: + + ```ts + static isCookieAllowed(): boolean; + static isThirdPartyCookieAllowed(): boolean; + static putAcceptCookieEnabled(accept: boolean): void; + static putAcceptThirdPartyCookieEnabled(accept: boolean): void; + static setCookie(url: string, value: string): void; + static saveCookieAsync(): Promise; + static saveCookieAsync(callback: AsyncCallback): void; + static getCookie(url: string): string; + static existCookie(): boolean; + static deleteEntireCookie(): void; + static deleteSessionCookie(): void; + ``` + +**Adaptation Guide** + +Instead of importing APIs from the original **WebCookie** class, import APIs from **@ohos.web.webview** as follows: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.9 Moving of API Version 9 APIs Under WebController + +Moved APIs of API version 9 in the **WebController** class to **web.webview.webview.WebviewController** and added error throwing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing. +The **getDefaultUserAgent** API is renamed **getUserAgent**. + +**Key API/Component Changes** + +- Involved APIs: + + zoomIn(): boolean; + zoomOut(): boolean; + createWebMessagePorts(): Array\; + postMessage(options: { message: WebMessageEvent, uri: string}): void; + getHitTestValue(): HitTestValue; + getWebId(): number; + getDefaultUserAgent(): string; + getTitle(): string; + getPageHeight(): number; + backOrForward(step: number): void; + searchAllAsync(searchString: string): void; + clearMatches(): void; + searchNext(forward: boolean): void; + clearSslCache(): void; + clearClientAuthenticationCache(): void; + getUrl(): string; + +- Before change: + + ```ts + zoomIn(): boolean; + zoomOut(): boolean; + createWebMessagePorts(): Array; + postMessage(options: { message: WebMessageEvent, uri: string}): void; + getHitTestValue(): HitTestValue; + getWebId(): number; + getDefaultUserAgent(): string; + getTitle(): string; + getPageHeight(): number; + backOrForward(step: number): void; + searchAllAsync(searchString: string): void; + clearMatches(): void; + searchNext(forward: boolean): void; + clearSslCache(): void; + clearClientAuthenticationCache(): void; + getUrl(): string; + ``` + +- After change: + + ```ts + zoomIn(): void; + zoomOut(): void; + createWebMessagePorts(): Array; + postMessage(name: string, ports: Array, uri: string): void; + getHitTestValue(): HitTestValue; + getWebId(): number; + getUserAgent(): string; + getTitle(): string; + getPageHeight(): number; + backOrForward(step: number): void; + searchAllAsync(searchString: string): void; + clearMatches(): void; + searchNext(forward: boolean): void; + clearSslCache(): void; + clearClientAuthenticationCache(): void; + getUrl(): string; + ``` + +**Adaptation Guide** + +Instead of importing APIs from the original **WebController** class, import APIs from **@ohos.web.webview** as follows: + + ```ts + import web_webview from '@ohos.web.webview'; + ``` + +## cl.web.10 Moving of the WebAsyncController Class + +Moved the APIs in the **WebAsyncController** class to the **web.webview.webview.WebviewController** class and added error throwing. + +**Change Impact** + +If your application is developed based on earlier versions, pay attention to error code processing. + +**Key API/Component Changes** + +- Involved APIs: + + storeWebArchive(baseName: string, autoName: boolean): Promise\; + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback\): void; + +- Before change: + + ```ts + storeWebArchive(baseName: string, autoName: boolean): Promise; + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; + ``` + +- After change: + + ```ts + storeWebArchive(baseName: string, autoName: boolean): Promise; + storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback): void; + ``` + +**Adaptation Guide** + +Example: + + ```ts + // xxx.ets + import web_webview from '@ohos.web.webview' + + @Entry + @Component + struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + + build() { + Column() { + Button('saveWebArchive') + .onClick(() => { + try { + this.controller.storeWebArchive("/data/storage/el2/base/", true, (error, filename) => { + if (error) { + console.info(`save web archive error: ` + JSON.stringify(error)) + return; + } + if (filename != null) { + console.info(`save web archive success: ${filename}`) + } + }); + } catch (error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + }) + Web({ src: 'www.example.com', controller: this.controller }) + } + } + } + ``` diff --git a/en/release-notes/changelogs/v3.2-beta5/Readme-EN.md b/en/release-notes/changelogs/v3.2-beta5/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..2fdd6c9746c9137e136e52db2beef59377494c6b --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/Readme-EN.md @@ -0,0 +1,26 @@ +# Readme + +- [Ability framework](changelogs-ability.md) +- [Account subsystem](changelogs-account_os_account.md) +- [ArkUI development framework](changelogs-arkui.md) +- [Multimedia subsystem - camera](changelogs-camera-sync.md) +- [Common library subsystem - container](changelogs-container.md) +- [Distributed data management](changelogs-distributeddatamgr.md) +- [File management subsystem](changelogs-filemanagement.md) +- [Input method framework](changelogs-inputmethod-framworks.md) +- [File management subsystem - MediaLibrary](changelogs-mediaLibrary.md) +- [Multimedia subsystem](changelogs-multimedia.md) +- [Communication subsystem - NFC](changelogs-nfc.md) +- [Common event and notification subsystem](changelogs-notification.md) +- Location subsystem + - [ohos.geoLocationManager](changelogs-ohos-geoLocationManager.md) + - [ohos.geoLocation](changelogs-ohos-geolocation.md) + - [system.geolocation](changelogs-system-geolocation.md) +- [Upload and download](changelogs-request.md) +- [Resource scheduler subsystem](changelogs-resourceschedule.md) +- [Security subsystem](changelogs-security.md) +- [Telephony subsystem](changelogs-telephony.md) +- [Time service](changelogs-time.md) +- [Common library subsystem - URL](changelogs-url.md) +- [User IAM subsystem](changelogs-useriam.md) +- [Window manager subsystem](changelogs-window.md) diff --git a/en/release-notes/changelogs/v3.2-beta5/changelog-x-x.md b/en/release-notes/changelogs/v3.2-beta5/changelog-x-x.md new file mode 100644 index 0000000000000000000000000000000000000000..dcc7cd9aabb636ed248b5a37383410d4218b346f --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelog-x-x.md @@ -0,0 +1,28 @@ +# *Example* Subsystem Changelog + +Changes that affect contract compatibility of the last version should be described in the changelog. The changes include but are not limited to those related to API names, parameters, return values, required permissions, call sequence, enumerated values, configuration parameters, and paths. The last version can be an LTS, release, beta, or monthly version, or the like. Contract compatibility, also called semantic compatibility, means that the original program behavior should remain consistent over versions. + +## cl.subsystemname.x xxx Function Change (Example: DeviceType Attribute Change or Camera Permission Change. Use a short description.) + +Add the number **cl.*subsystemname*.*x*** before each change title, where **cl** is the abbreviation of changelog, *subsystemname* is the standard English name of the subsystem, and *x* indicates the change sequence number (starting from 1 in ascending order). +Describe the changes in terms of functions. Example: *n* and *m* of the *a* function are changed. Developers need to adapt their applications based on the change description. +If there is a requirement or design document corresponding to the change, attach the requirement number or design document number in the description. + +**Change Impact** + +Describe whether released APIs (JS or native APIs) are affected or API behavior is changed. +Describe whether available applications are affected, that is, whether an adaptation is required for building the application code in the SDK environment of the new version. + +**Key API/Component Changes** + +List the API/component changes involved in the function change. + +**Adaptation Guide** + +Provide guidance for developers on how to adapt their application to the changes to be compatible with the new version. +Example: +Change parameter *n* to *m* in the *a* file. + +``` +sample code +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-ability.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..6117462498c03b872b83d1cde479be6b2f094a01 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-ability.md @@ -0,0 +1,168 @@ +# Ability Framework Changelog + +## cl.ability.1 API Migration +The **requestPermissionsFromUser** API of **UIAbilityContext** is migrated from the ability subsystem to the security subsystem. + +Previously, the permission popup was implemented based on **UIAbility**, which used the **startAbilityForResult** API of **UIAbilityContext** to return the permission authorization result to the caller. Therefore, **requestPermissionsFromUser** was temporarily placed in **UIAbilityContext**. The permission popup is now implemented based on **ServiceExtensionAbility**, which no longer requires **startAbilityForResult** of **UIAbilityContext**. Therefore, **requestPermissionsFromUser** is migrated to the security subsystem. + +You need to adapt your application based on the following information. + + **Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| application/UIAbilityContext | UIAbilityContext | requestPermissionsFromUser(permissions: Array, requestCallback: AsyncCallback): void; | Deleted | +| application/UIAbilityContext | UIAbilityContext | requestPermissionsFromUser(permissions: Array): Promise; | Deleted | +| @ohos.abilityAccessCtrl | AtManager | requestPermissionsFromUser(context: Context, permissions: Array, requestCallback: AsyncCallback) : void; | Added | +| @ohos.abilityAccessCtrl | AtManager | requestPermissionsFromUser(context: Context, permissions: Array) : Promise; | Added | + + +**Adaptation Guide** + +The following illustrates how **requestPermissionsFromUser** is called to show a permission popup. + +Stage model: + +```ts +import abilityAccessCtrl from '@ohos.abilityAccessCtrl.d.ts'; +// onWindowStageCreate lifecycle of UIAbility. +onWindowStageCreate() { + let AtManager = abilityAccessCtrl.createAtManager(); + // requestPermissionsFromUser determines whether to display a popup based on the permission authorization status. + AtManager.requestPermissionsFromUser(this.context, ["ohos.permission.MANAGE_DISPOSED_APP_STATUS"]).then((data) => { + console.log("data type:" + typeof(data)); + console.log("data:" + data); + console.log("data permissions:" + data.permissions); + console.log("data result:" + data.authResults); + }).catch((err) => { + console.error('Failed to start ability', err.code); + }) +} +``` + + + +## cl.ability.2 Deletion of Deprecated APIs in API Version 9 + +In the **Ability Exception Rectification** document, some APIs in API version 9 have been marked as deprecated. According to API specifications of OpenHarmony, these APIs should be deleted. + +**Change Impact** + +The application developed based on earlier versions needs to use new APIs to replace the deleted ones. Otherwise, the application compilation will be affected. + +**Key API/Component Changes** + +API files are deleted. + +| Deleted API | New API | +| ----------------------------------------------- | ----------------------------------------------- | +| @ohos.application.Ability.d.ts | @ohos.app.ability.UIAbility.d.ts | +| @ohos.application.AbilityConstant.d.ts | @ohos.app.ability.AbilityConstant.d.ts | +| @ohos.application.AbilityLifecycleCallback.d.ts | @ohos.app.ability.AbilityLifecycleCallback.d.ts | +| @ohos.application.AbilityStage.d.ts | @ohos.app.ability.AbilityStage.d.ts | +| @ohos.application.EnvironmentCallback.d.ts | @ohos.app.ability.EnvironmentCallback.d.ts | +| @ohos.application.ExtensionAbility.d.ts | @ohos.app.ability.ExtensionAbility.d.ts | +| @ohos.application.FormExtension.d.ts | @ohos.app.form.FormExtensionAbility.d.ts | +| @ohos.application.ServiceExtensionAbility.d.ts | @ohos.app.ability.ServiceExtensionAbility.d.ts | +| @ohos.application.StartOptions.d.ts | @ohos.app.ability.StartOptions.d.ts | +| @ohos.application.context.d.ts | @ohos.app.ability.common.d.ts | +| @ohos.application.errorManager.d.ts | @ohos.app.ability.errorManager.d.ts | + +APIs or attributes are deleted: + +- @ohos.application.Configuration.d.ts + - **direction**, **screenDensity**, **displayId**, and **hasPointerDevice** of **Configuration** are deleted. Use **Configuration** of **@ohos.app.ability.Configuration.d.ts**. +- @ohos.application.ConfigurationConstant.d.ts + - **Direction** and **ScreenDensity** are deleted. Use **Direction** and **ScreenDensity** of **@ohos.app.ability.ConfigurationConstant.d.ts**. +- @ohos.application.abilityManager.d.ts + - **getExtensionRunningInfos** and **getTopAbility** are deleted. Use the APIs with the same name in **@ohos.app.ability.abilityManager.d.ts**. +- @ohos.application.appManager.d.ts + - **ApplicationState** and **ProcessState** are deleted. Use **ApplicationState** and **ProcessState** of **@ohos.app.ability.appManager.d.ts**. + - **registerApplicationStateObserver** and **getProcessRunningInformation** are deleted. Use the APIs with the same name in **@ohos.app.ability.appManager.d.ts**. +- @ohos.application.formHost.d.ts + - **shareForm** and **notifyFormsPrivacyProtected** are deleted. Use the APIs with the same name in **@ohos.app.form.formHost.d.ts**. +- @ohos.application.formInfo.d.ts + - **eTS** of **FormType** is deleted. Use **eTS** of **FormType** in **@ohos.app.form.formInfo.d.ts**. + - **IDENTITY_KEY**, **BUNDLE_NAME_KEY**, **ABILITY_NAME_KEY**, and **DEVICE_ID_KEY** of **FormParam** are deleted. Use the enums with the same name in **@ohos.app.form.formInfo.d.ts**. + - **FormInfoFilter** is deleted. Use **FormInfoFilter** of **@ohos.app.form.formInfo.d.ts**. + - **FormDimension** is deleted. Use **FormDimension** of **@ohos.app.form.formInfo.d.ts**. + - **VisibilityType** is deleted. Use **VisibilityType** of **@ohos.app.form.formInfo.d.ts**. +- @ohos.wantAgent.d.ts + - **trigger** and **getOperationType** are deleted. Use the APIs with the same name in **@ohos.app.ability.wantAgent.d.ts**. +- application/ApplicationContext.d.ts + - **registerAbilityLifecycleCallback**, **unregisterAbilityLifecycleCallback**, **registerEnvironmentCallback**, and **unregisterEnvironmentCallback** are deleted. Use **on** and **off**. +- application/ServiceExtensionContext.d.ts + - **connectAbility**, **connectAbilityWithAccount**, and **disconnectAbility** are deleted. Use **connectServiceExtensionAbility**, **connectServiceExtensionAbilityWithAccount**, and **disconnectServiceExtensionAbility**. +- @ohos.application.FormExtension.d.ts + - **onCreate**, **onCastToNormal**, **onUpdate**, **onVisibilityChange**, **onEvent**, **onDestroy**, **onAcquireFormState**, and **onShare** are deleted. Use the following lifecycle methods of **@ohos.app.form.FormExtensionAbility.d.ts**: **onAddForm**, **onCastToNormalForm**, **onUpdateForm**, **onChangeFormVisibility**, **onFormEvent**, **onRemoveForm**, **onAcquireFormState**, and **onShareForm**. +- @ohos.application.abilityDelegatorRegistry.d.ts + - **AbilityDelegator**, **AbilityDelegatorArgs**, **AbilityMonitor**, and **ShellCmdResult** are deleted. Use the classes with the same name in **@ohos.app.ability.abilityDelegatorRegistry.d.ts**. +- @ohos.application.abilityManager.d.ts + - **AbilityRunningInfo** and **ExtensionRunningInfo** are deleted. Use the classes with the same name in **@ohos.app.ability.abilityManager.d.ts**. +- @ohos.application.appManager.d.ts + - **AbilityStateData**, **AppStateData**, **ApplicationStateObserver**, **ProcessRunningInfo**, and **ProcessRunningInformation** are deleted. Use the classes with the same name in **@ohos.app.ability.appManager.d.ts**. +- @ohos.application.missionManager.d.ts + - **MissionInfo**, **MissionListener**, and **MissionSnapshot** are deleted. Use the classes with the same name in **@ohos.app.ability.missionManager.d.ts**. +- @ohos.wantAgent.d.ts + - **TriggerInfo** and **WantAgentInfo** are deleted. Use the classes with the same name in **@ohos.app.ability.wantAgent.d.ts**. + +**Adaptation Guide** + +As mentioned above, only several APIs have their names changed in terms of, for example, the registration callbacks (**registerAbilityLifecycleCallback**, **unregisterAbilityLifecycleCallback**, **registerEnvironmentCallback**, and **unregisterEnvironmentCallback**) and connection and disconnection **ServiceExtensionAbility** (**connectAbility**, **connectAbilityWithAccount**, and **disconnectAbility**). For such APIs, replace their names with those of their corresponding new APIs in the lifecycle callbacks. + +Most APIs are moved to the new namespace. Therefore, you can modify **import** for adaptation. + +For example, the original API uses **@ohos.application.Ability**: + +```js +import Ability from '@ohos.application.Ability'; +``` + +You can directly modify **import** to switch to the new namespace: + +```js +import Ability from '@ohos.app.ability.UIAbility'; +``` + +In addition, exception handling is needed. For details, see the API reference for the new APIs. + +## cl.ability.3 RestartFlag Attribute Names Changed and Unsupported Attribute Deleted in appRecovery + +In the **appRecovery** API, the enum names of **RestartFlag** are changed from **NO_RESTART** upon a specific fault to **RESTART** upon a specific fault. +The **CPP_CRASH_NO_RESTART** enum is deleted. + +**Change Impact** + +If your application uses the **CPP_CRASH_NO_RESTART**, **JS_CRASH_NO_RESTART**, or **APP_FREEZE_NO_RESTART** attribute in versions earlier than 3.2.10.6, its behavior will change after an upgrade to 3.2.10.6. + +**Key API/Component Changes** + +**RestartFlag** 9+ + +Before change + +| Name | Value | Description | +| --------------------- | ------ | -------------------------------- | +| ALWAYS_RESTART | 0 | The application is restarted in all cases. | +| CPP_CRASH_NO_RESTART | 0x0001 | The application is **not restarted** in the case of CPP_CRASH. | +| JS_CRASH_NO_RESTART | 0x0002 | The application is **not restarted** in the case of JS_CRASH. | +| APP_FREEZE_NO_RESTART | 0x0004 | The application is **not restarted** in the case of APP_FREEZE.| +| NO_RESTART | 0xFFFF | The application is not restarted in any case. | + +After change + +| Name | Value | Description | +| ----------------------- | ------ | ------------------------------ | +| ALWAYS_RESTART | 0 | The application is restarted in all cases. | +| CPP_CRASH_NO_RESTART | NA | **Deleted.** The restart in this scenario is not supported.| +| RESTART_WHEN_JS_CRASH | 0x0001 | The application is **restarted** in the case of JS_CRASH. | +| RESTART_WHEN_APP_FREEZE | 0x0002 | The application is **restarted** in the case of APP_FREEZE.| +| NO_RESTART | 0xFFFF | The application is not restarted in any case. | + +**Adaptation Guide** + +Perform adaptation based on the new semantics. diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md new file mode 100644 index 0000000000000000000000000000000000000000..e4b1955ff7fdcd16e8fe9946dc899c16657ffdc8 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-account_os_account.md @@ -0,0 +1,96 @@ +# Account Subsystem Changelog + +## cl.account_os_account.1 createOsAccountForDomain Error Code Change + +Changed the error code returned when the domain account created by **createOsAccountForDomain()** already exists from **12300001** to **12300004**. +Changed the error information from "common system error" to "The account already exists". + +**Change Impact** + +The application developed based on earlier versions needs to adapt the new error code. Otherwise, the original service logic will be affected. + +**Key API/Component Changes** +- AccountManager + - createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo, callback: AsyncCallback<OsAccountInfo>); + - createOsAccountForDomain(type: OsAccountType, domainInfo: DomainAccountInfo): Promise<OsAccountInfo>; + +**Adaptation Guide** + +The sample code is as follows: + +```ts +import account_osAccount from "@ohos.account.osAccount" + +let accountMgr = account_osAccount.getAccountManager(); +let domainInfo = { + accountName: "zhangsan", + domain: "china.example.com" +}; +try { + await accountMgr.createOsAccountForDomain(account_osAccount.OsAccountType.NORMAL, domainInfo); + await accountMgr.createOsAccountForDomain(account_osAccount.OsAccountType.NORMAL, domainInfo); +} catch (err) { + console.log("activateOsAccount err: " + JSON.stringify(err)); // error.code = 12300004; +} +``` + +## cl.account_os_account.2 Application Account getAllAccounts() Permission Change + +Removed the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission that is originally required for an application to call **getAllAccounts()** to obtain accessible accounts. + +**Change Impact** + +From this version, applications do not need the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission when calling **getAllAccounts()**. + +**Key API/Component Changes** +- AccountManager + - getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void; + - getAllAccounts(): Promise<Array<AppAccountInfo>>; + +**Adaptation Guide** + +The following is the sample code for an application to obtain the accessible accounts without the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission: + +```ts +import account_appAccount from "@ohos.account.appAccount" + +let accountMgr = account_appAccount.createAppAccountManager(); +try { + await accountMgr.addAccount("accessibleAccount_promise_nopermission"); + var data = await accountMgr.getAllAccounts(); + if (data[0].name == "accessibleAccount_promise_nopermission") { + console.log("getAllAccounts successfully"); + } +} catch (err) { + console.log("getAllAccounts err: " + JSON.stringify(err)); +} +``` + +## cl.account_os_account.3 Application Account getAccountsByOwner() Permission Change + +Removed the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission that is originally required for an application to call **getAccountsByOwner()** to obtain the accessible accounts based on the account owner . + +**Change Impact** + +From this version, applications do not need the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission when calling **getAccountsByOwner()**. + +**Key API/Component Changes** +- AccountManager + - getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void; + - getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>>; + +**Adaptation Guide** + +The following is the sample code for an application to obtain the accessible accounts based on the account owner without the **ohos.permission.GET_ALL_APP_ACCOUNTS** permission: + +```ts +import account_appAccount from "@ohos.account.appAccount" + +let accountMgr = account_appAccount.createAppAccountManager(); +try { + var ownerName = "com.example.owner"; + var data = await accountMgr.getAllAccounts(ownerName); +} catch (err) { + console.log("getAllAccounts err: " + JSON.stringify(err)); +} +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md new file mode 100644 index 0000000000000000000000000000000000000000..f4262ae286c279a79b30a657e24faea35b3c7fac --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-arkui.md @@ -0,0 +1,334 @@ +# ArkUI Subsystem ChangeLog + +## cl.arkui.1 Restrictions on Data Type Declarations of State Variables + +1. The data types of state variables decorated by state decorators must be explicitly declared. They cannot be declared as **any** or **Date**. + + Example: + + ```ts + // xxx.ets + @Entry + @Component + struct DatePickerExample { + // Incorrect: @State isLunar: any = false + @State isLunar: boolean = false + // Incorrect: @State selectedDate: Date = new Date('2021-08-08') + private selectedDate: Date = new Date('2021-08-08') + + build() { + Column() { + Button('Switch Calendar') + .margin({ top: 30 }) + .onClick(() => { + this.isLunar = !this.isLunar + }) + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2100-1-1'), + selected: this.selectedDate + }) + .lunar(this.isLunar) + .onChange((value: DatePickerResult) => { + this.selectedDate.setFullYear(value.year, value.month, value.day) + console.info('select current date is: ' + JSON.stringify(value)) + }) + + }.width('100%') + } + } + ``` + + ![datePicker](../../../application-dev/reference/arkui-ts/figures/datePicker.gif) + +2. The data type declaration of the **@State**, **@Provide**, **@Link**, or **@Consume** decorated state variables can consist of only one of the primitive data types or reference data types. + + The **Length**, **ResourceStr**, and **ResourceColor** types are combinations of primitive data types or reference data types. Therefore, they cannot be used by the aforementioned types of state variables. + For details about the definitions of **Length**, **ResourceStr**, and **ResourceColor**, see [Types](../../../application-dev/reference/arkui-ts/ts-types.md). + + Example: + + ```ts + // xxx.ets + @Entry + @Component + struct IndexPage { + // Incorrect: @State message: string | Resource = 'Hello World' + @State message: string = 'Hello World' + // Incorrect: @State message: ResourceStr = $r('app.string.hello') + @State resourceStr: Resource = $r('app.string.hello') + + build() { + Row() { + Column() { + Text(`${this.message}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } + } + ``` + + ![hello](../../../application-dev/quick-start/figures/hello.PNG) + +**Change Impacts** + +1. If the data type of a state variable decorated by a state decorator is declared as **any**, a build error will occur. + ```ts + // ArkTS:ERROR Please define an explicit type, not any. + @State isLunar: any = false + ``` +2. If the data type of a state variable decorated by a state decorator is declared as **Date**, a build error will occur. + ```ts + // ArkTS:ERROR The @State property 'selectedDate' cannot be a 'Date' object. + @State selectedDate: Date = new Date('2021-08-08') + ``` +3. If the data type of a **@State**, **@Provide**, **@Link**, and or **@Consume** decorated state variable is Length, **ResourceStr**, or **ResourceColor**, a build error will occur. + ```ts + /* ArkTS:ERROR The state variable type here is 'ResourceStr', it contains both a simple type and an object type, + which are not allowed to be defined for state variable of a struct.*/ + @State message: ResourceStr = $r('app.string.hello') + ``` + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** + +1. Explicitly declare the data type for state variables decorated by state decorators. +2. If a state variable decorated by a state decorator uses the **Date** object, change it to a regular variable – a variable not decorated by any decorator. +3. Adapt the **@State**, **@Provide**, **@Link**, and **@Consume** decorated variables based on the following code snippet so that they do not use the **Length(string|number|Resource)**, **ResourceStr(string|Resource)**, and **ResourceColor(string|number|Color|Resource)** types: + + ```ts + // Incorrect: + @State message: ResourceStr = $r('app.string.hello') + // Corrected: + @State resourceStr: Resource = $r('app.string.hello') + ``` + +## cl.arkui.2 Initialization Rules and Restrictions of Custom Components' Member Variables + +Comply with the following rules when using constructors to initialize member variables: + +| **From the Variable in the Parent Component (Right) to the Variable in the Child Component (Below)**| **regular** | **@State** | **@Link** | **@Prop** | **@Provide** | **@Consume** | **@ObjectLink** | +|---------------------------------|----------------------------|------------|-----------|-----------|--------------|--------------|------------------| +| **regular** | Supported | Supported | Supported | Supported | Not supported | Not supported | Supported | +| **@State** | Supported | Supported | Supported | Supported | Supported | Supported | Supported | +| **@Link** | Not supported | Supported (1) | Supported (1) | Supported (1) | Supported (1) | Supported (1) | Supported (1) | +| **@Prop** | Supported | Supported | Supported | Supported | Supported | Supported | Supported | +| **@Provide** | Supported | Supported | Supported | Supported | Supported | Supported | Supported | +| **@Consume** | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | +| **@ObjectLink** | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | Not supported | + +| **From the Variable in the Parent Component (Right) to the Variable in the Child Component (Below)**| **@StorageLink** | **@StorageProp** | **@LocalStorageLink** | **@LocalStorageProp** | +|------------------|------------------|------------------|-----------------------|------------------------| +| **regular** | Supported | Not supported | Not supported | Not supported | +| **@State** | Supported | Supported | Supported | Supported | +| **@Link** | Supported (1) | Supported (1) | Supported (1) | Supported (1) | +| **@Prop** | Supported | Supported | Supported | Supported | +| **@Provide** | Supported | Supported | Supported | Supported | +| **@Consume** | Not supported | Not supported | Not supported | Not supported | +| **@ObjectLink** | Not supported | Not supported | Not supported | Not supported | + +> **NOTE** +> +> **Supported (1)**: The dollar sign ($) must be used, for example, **this.$varA**. +> +> **regular**: refers to a regular variable that is not decorated by any decorator. + +**@StorageLink**, **@StorageProp**, **@LocalStorageLink**, and **@LocalStorageProp** variables cannot be initialized from the parent component. + +**Change Impacts** + +1. Variables decorated by **@LocalStorageLink** and **@LocalStorageProp** cannot be initialized from the parent component. + ```ts + @Entry + @Component + struct LocalStorageComponent { + build() { + Column() { + Child({ + /* ArkTS:ERROR Property 'simpleVarName' in the custom component 'Child' cannot + initialize here (forbidden to specify). */ + simpleVarName: 1, + /* ArkTS:ERROR Property 'objectName' in the custom component 'Child' cannot + initialize here (forbidden to specify). */ + objectName: new ClassA("x") + }) + } + } + } + @Component + struct Child { + @LocalStorageLink("storageSimpleProp") simpleVarName: number = 0; + @LocalStorageProp("storageObjectProp") objectName: ClassA = new ClassA("x"); + build() {} + } + ``` +2. The **@ObjectLink** decorated variable cannot be directly initialized from a decorated variable in the parent component. The source of the parent component must be an array item or object attribute decorated by **@State**, **@Link**, **@Provide**, **@Consume**, or **@ObjectLink**. + ```ts + let NextID : number = 0; + + @Observed class ClassA { + public id : number; + public c: number; + constructor(c: number) { + this.id = NextID++; + this.c = c; + } + } + + @Component + struct Child { + @ObjectLink varA : ClassA; + build() { + Row() { + Text('ViewA-' + this.varA.id) + } + } + } + + @Component + struct Parent { + @Link linkValue: ClassA + build() { + Column() { + /* ArkTS:ERROR The @Link property 'linkValue' cannot be assigned to + the @ObjectLink property 'varA'.*/ + Child({ varA: this.linkValue }) + } + } + } + ``` + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** +1. When building a child component, do not perform the build on the variables decorated by **@LocalStorageLink** and **@LocalStorageProp** in the child component. + + To change these variables from the parent component, use the API provided by the **LocalStorage** (such as the **set** API) to assign values to them. + +2. For details about how to use **@ObjectLink**, see @ObjectLink. + +## cl.LocalStorage.1 Return Type Change of the get API + +Changed the return type from **get\(propName: string): T** to **get\(propName: string): T | undefined**. + +**Change Impact** + + +None + +## cl.arkui.LocalStorage.2 Mandatory/Optional Change of the newValue Parameter in setOrCreate +**Change Impact** + +API declaration before change: +```js +setOrCreate(propName: string, newValue?: T): boolean +``` +API declaration after change: +```js +setOrCreate(propName: string, newValue: T): boolean +``` +The **newValue** parameter becomes mandatory. +If it is not specified when an application calls the API, the build will fail after the SDK is replaced. + +**Adaptation Guide** + +```js +let storage = new LocalStorage(); +storage.setOrCreate('propA', 'hello'); +``` +## cl.arkui.LocalStorage.3 link Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +link(propName: string, linkUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +link(propName: string): SubscribedAbstractProperty +``` +1. The second and third parameters of the **link** API are reserved for internal use by the framework. Therefore, the API is changed to contain only one parameter. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let linA = storage.link("PropA"); +linA.set(50); +``` + +## cl.arkui.LocalStorage.4 setAndLink Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +setAndLink(propName: string, defaultValue: T, linkUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +setAndLink(propName: string, defaultValue: T): SubscribedAbstractProperty +``` +1. The third and fourth parameters of the **setAndLink** API are reserved for internal use by the framework. Therefore, the API is changed to contain two parameters. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let linA = storage.setAndLink("PropA", "48") +linA.set(50); +``` + +## cl.arkui.LocalStorage.5 prop Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +prop(propName: string, propUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +prop(propName: string): SubscribedAbstractProperty +``` +1. The second and third parameters of the **prop** API are reserved for internal use by the framework. Therefore, the API is changed to contain only one parameter. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let propA = storage.prop("PropA"); +propA.set(51); // one-way sync +``` + +## cl.arkui.LocalStorage.6 setAndProp Parameter and Return Type Changes +**Change Impact** + +API declaration before change: +```js +setAndProp(propName: string, defaultValue: T, propUser?: T, subscribersName?: string): T +``` +API declaration after change: +```js +setAndProp(propName: string, defaultValue: S): SubscribedAbstractProperty +``` +1. The third and fourth parameters of the **setAndProp** API are reserved for internal use by the framework. Therefore, the API is changed to contain two parameters. +2. The return type **T** is changed to **SubscribedAbstractProperty**. + +**Adaptation Guide** + +```js +let storage = new LocalStorage({"PropA": "47"}); +let propA = storage.setAndProp("PropA", "48"); +propA.set(51); // one-way sync +``` \ No newline at end of file diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md new file mode 100644 index 0000000000000000000000000000000000000000..ef66b7500c4b5fccde024c10c95beeca5b6cbd5d --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-camera-sync.md @@ -0,0 +1,520 @@ +# Multimedia Subsystem Changelog + +## cl.subsystemname.1 Camera API Changed +1. All the APIs of the camera component are changed to system APIs in the API version 9. +2. Some functional APIs are added and some others are deprecated to: + +Improve the usability of camera APIs. +Help you quickly understand camera APIs and use them for development. +Facilitate expansion of framework functions in later versions, and reduce coupling between framework modules. + +You need to refer to the following change description to adapt your application. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Is System API| Change Type| +| ---------------------- | ----------------------- | ------------------------------------------------------------ | --------------- | -------- | +| ohos.multimedia.camera | camera | function getCameraManager(context: Context): CameraManager; | Yes | Added | +| ohos.multimedia.camera | camera | function getCameraManager(context: Context, callback: AsyncCallback): void;
function getCameraManager(context: Context): Promise; | Yes | Deprecated | +| ohos.multimedia.camera | CameraErrorCode | INVALID_ARGUMENT = 7400101,
OPERATION_NOT_ALLOWED = 7400102,
SESSION_NOT_CONFIG = 7400103,
SESSION_NOT_RUNNING = 7400104,
SESSION_CONFIG_LOCKED = 7400105,
DEVICE_SETTING_LOCKED = 7400106,
CONFILICT_CAMERA = 7400107,
DEVICE_DISABLED = 7400108,
SERVICE_FATAL_ERROR = 7400201 | Yes | Added | +| ohos.multimedia.camera | CameraManager | getSupportedCameras(): Array;
getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability;
createCameraInput(camera: CameraDevice): CameraInput;
createCameraInput(position: CameraPosition, type: CameraType): CameraInput;
createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput;
createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput;
createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput;
createMetadataOutput(metadataObjectTypes: Array): MetadataOutput;
createCaptureSession(): CaptureSession; | Yes | Added | +| ohos.multimedia.camera | CameraManager | getSupportedCameras(callback: AsyncCallback>): void;
getSupportedCameras(): Promise>;
getSupportedOutputCapability(camera: CameraDevice, callback: AsyncCallback): void;
getSupportedOutputCapability(camera: CameraDevice): Promise;
createCameraInput(camera: CameraDevice, callback: AsyncCallback): void;
createCameraInput(camera: CameraDevice): Promise;
createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback): void;
createCameraInput(position: CameraPosition, type: CameraType): Promise;
createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void;
createPreviewOutput(profile: Profile, surfaceId: string): Promise;
createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void;
createPhotoOutput(profile: Profile, surfaceId: string): Promise;
createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallback): void;
createVideoOutput(profile: VideoProfile, surfaceId: string): Promise;
createMetadataOutput(metadataObjectTypes: Array, callback: AsyncCallback): void;
createMetadataOutput(metadataObjectTypes: Array): Promise;
createCaptureSession(callback: AsyncCallback): void;
createCaptureSession(): Promise; | Yes | Deprecated | +| ohos.multimedia.camera | CameraType | CAMERA_TYPE_DEFAULT = 0 | Yes | Added | +| ohos.multimedia.camera | CameraType | CAMERA_TYPE_UNSPECIFIED = 0 | Yes | Deprecated | +| ohos.multimedia.camera | CameraInput | on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; | Yes | Added | +| ohos.multimedia.camera | CameraInput | release(callback: AsyncCallback): void;
release(): Promise;
on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; | Yes | Deprecated | +| ohos.multimedia.camera | CameraInputErrorCode | ERROR_UNKNOWN = -1
ERROR_NO_PERMISSION = 0
ERROR_DEVICE_PREEMPTED = 1
ERROR_DEVICE_DISCONNECTED = 2
ERROR_DEVICE_IN_USE = 3
ERROR_DRIVER_ERROR = 4 | Yes | Deprecated | +| ohos.multimedia.camera | CameraInputError | code: CameraInputErrorCode | Yes | Deprecated | +| ohos.multimedia.camera | CaptureSession | beginConfig(): void;
addInput(cameraInput: CameraInput): void;
removeInput(cameraInput: CameraInput): void;
addOutput(cameraOutput: CameraOutput): void;
removeOutput(cameraOutput: CameraOutput): void;
hasFlash(): boolean;
isFlashModeSupported(flashMode: FlashMode): boolean;
getFlashMode(): FlashMode;
setFlashMode(flashMode: FlashMode): void;
isExposureModeSupported(aeMode: ExposureMode): boolean;
getExposureMode(): ExposureMode;
setExposureMode(aeMode: ExposureMode): void;
getMeteringPoint(): Point;
setMeteringPoint(point: Point): void;
getExposureBiasRange(): Array;
setExposureBias(exposureBias: number): void;
getExposureValue(): number;
isFocusModeSupported(afMode: FocusMode): boolean;
getFocusMode(): FocusMode;
setFocusMode(afMode: FocusMode): void;
setFocusPoint(point: Point): void;
getFocusPoint(): Point;
getFocalLength(): number;
getZoomRatioRange(): Array;
getZoomRatio(): number;
setZoomRatio(zoomRatio: number): void;
isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean;
getActiveVideoStabilizationMode(): VideoStabilizationMode;
setVideoStabilizationMode(mode: VideoStabilizationMode): void;
on(type: 'error', callback: ErrorCallback): void; | Yes | Added | +| ohos.multimedia.camera | CaptureSession | beginConfig(callback: AsyncCallback): void;
beginConfig(): Promise;
addInput(cameraInput: CameraInput, callback: AsyncCallback): void;
addInput(cameraInput: CameraInput): Promise;
removeInput(cameraInput: CameraInput, callback: AsyncCallback): void;
removeInput(cameraInput: CameraInput): Promise;
addOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void;
addOutput(cameraOutput: CameraOutput): Promise;
removeOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void;
removeOutput(cameraOutput: CameraOutput): Promise;
hasFlash(callback: AsyncCallback): void;
hasFlash(): Promise;
isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback): void;
isFlashModeSupported(flashMode: FlashMode): Promise;
getFlashMode(callback: AsyncCallback): void;
getFlashMode(): Promise;
setFlashMode(flashMode: FlashMode, callback: AsyncCallback): void;
setFlashMode(flashMode: FlashMode): Promise;
isExposureModeSupported(aeMode: ExposureMode, callback: AsyncCallback): void;
isExposureModeSupported(aeMode: ExposureMode): Promise;
getExposureMode(callback: AsyncCallback): void;
getExposureMode(): Promise;
setExposureMode(aeMode: ExposureMode, callback: AsyncCallback): void;
setExposureMode(aeMode: ExposureMode): Promise;
getMeteringPoint(callback: AsyncCallback): void;
getMeteringPoint(): Promise;
setMeteringPoint(point: Point, callback: AsyncCallback): void;
setMeteringPoint(point: Point): Promise;
getExposureBiasRange(callback: AsyncCallback>): void;
getExposureBiasRange(): Promise>;
setExposureBias(exposureBias: number, callback: AsyncCallback): void;
setExposureBias(exposureBias: number): Promise;
getExposureValue(callback: AsyncCallback): void;
getExposureValue(): Promise;
isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback): void;
isFocusModeSupported(afMode: FocusMode): Promise;
getFocusMode(callback: AsyncCallback): void;
getFocusMode(): Promise;
setFocusMode(afMode: FocusMode, callback: AsyncCallback): void;
setFocusMode(afMode: FocusMode): Promise;
setFocusPoint(point: Point, callback: AsyncCallback): void;
setFocusPoint(point: Point): Promise;
getFocusPoint(callback: AsyncCallback): void;
getFocusPoint(): Promise;
getFocalLength(callback: AsyncCallback): void;
getFocalLength(): Promise;
getZoomRatioRange(callback: AsyncCallback>): void;
getZoomRatioRange(): Promise>;
getZoomRatio(callback: AsyncCallback): void;
getZoomRatio(): Promise;
setZoomRatio(zoomRatio: number, callback: AsyncCallback): void;
setZoomRatio(zoomRatio: number): Promise;
isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback): void;
isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): Promise;
getActiveVideoStabilizationMode(callback: AsyncCallback): void;
getActiveVideoStabilizationMode(): Promise;
setVideoStabilizationMode(mode: VideoStabilizationMode, callback: AsyncCallback): void;
setVideoStabilizationMode(mode: VideoStabilizationMode): Promise;
on(type: 'error', callback: ErrorCallback): void; | Yes | Deprecated | +| ohos.multimedia.camera | CaptureSessionErrorCode | ERROR_UNKNOWN = -1
ERROR_INSUFFICIENT_RESOURCES = 0
ERROR_TIMEOUT = 1 | Yes | Deprecated | +| ohos.multimedia.camera | CaptureSessionError | code: CaptureSessionErrorCode | Yes | Deprecated | +| ohos.multimedia.camera | PreviewOutput | on(type: 'error', callback: ErrorCallback): void; | Yes | Added | +| ohos.multimedia.camera | PreviewOutput | on(type: 'error', callback: ErrorCallback): void; | Yes | Deprecated | +| ohos.multimedia.camera | PreviewOutputErrorCode | ERROR_UNKNOWN = -1 | Yes | Deprecated | +| ohos.multimedia.camera | PreviewOutputError | code: PreviewOutputErrorCode | Yes | Deprecated | +| ohos.multimedia.camera | PhotoOutput | capture(): Promise;
isMirrorSupported(): boolean;
on(type: 'error', callback: ErrorCallback): void; | Yes | Added | +| ohos.multimedia.camera | PhotoOutput | isMirrorSupported(callback: AsyncCallback): void;
isMirrorSupported(): Promise;
on(type: 'error', callback: ErrorCallback): void; | Yes | Deprecated | +| ohos.multimedia.camera | PhotoOutputErrorCode | ERROR_UNKNOWN = -1
ERROR_DRIVER_ERROR = 0
ERROR_INSUFFICIENT_RESOURCES = 1
ERROR_TIMEOUT = 2 | Yes | Deprecated | +| ohos.multimedia.camera | PhotoOutputError | code: PhotoOutputErrorCode | Yes | Deprecated | +| ohos.multimedia.camera | VideoOutput | on(type: 'error', callback: ErrorCallback): void; | Yes | Added | +| ohos.multimedia.camera | VideoOutput | on(type: 'error', callback: ErrorCallback): void; | Yes | Deprecated | +| ohos.multimedia.camera | VideoOutputErrorCode | ERROR_UNKNOWN = -1
ERROR_DRIVER_ERROR = 0 | Yes | Deprecated | +| ohos.multimedia.camera | VideoOutputError | code: VideoOutputErrorCode | Yes | Deprecated | +| ohos.multimedia.camera | MetadataObject | readonly type: MetadataObjectType;
readonly timestamp: number; | Yes | Added | +| ohos.multimedia.camera | MetadataObject | getType(callback: AsyncCallback): void;
getType(): Promise;
getTimestamp(callback: AsyncCallback): void;
getTimestamp(): Promise;
getBoundingBox(callback: AsyncCallback): void;
getBoundingBox(): Promise; | Yes | Deprecated | +| ohos.multimedia.camera | MetadataFaceObject | readonly boundingBox: Rect | Yes | Added | +| ohos.multimedia.camera | MetadataOutput | on(type: 'error', callback: ErrorCallback): void; | Yes | Added | +| ohos.multimedia.camera | MetadataOutput | on(type: 'error', callback: ErrorCallback): void; | Yes | Deprecated | +| ohos.multimedia.camera | MetadataOutputErrorCode | ERROR_UNKNOWN = -1
ERROR_INSUFFICIENT_RESOURCES = 0 | Yes | Deprecated | +| ohos.multimedia.camera | MetadataOutputError | code: MetadataOutputErrorCode | Yes | Deprecated | + +**Adaptation Guide** + +In addition to new APIs and deprecated APIs, you need to adapt your application to changed APIs. + +In Beta4 and later versions, the following APIs are changed. + +**New APIs** + +1. **CameraErrorCode** enums + + Enum: INVALID_ARGUMENT; value: 7400101 + + Enum: OPERATION_NOT_ALLOWED; value: 7400102 + + Enum: SESSION_NOT_CONFIG; value: 7400103 + + Enum: SESSION_NOT_RUNNING; value: 7400104 + + Enum: SESSION_CONFIG_LOCKED; value: 7400105 + + Enum: DEVICE_SETTING_LOCKED; value: 7400106 + + Enum: CONFILICT_CAMERA; value: 7400107 + + Enum: DEVICE_DISABLED; value: 7400108 + + Enum: SERVICE_FATAL_ERROR; value: 7400201 + +2. Added **capture(): Promise** to the **PhotoOutput** API. + +3. Added the readonly type **MetadataObjectType** to the **MetadataObject** API. + +4. Added **readonly timestamp: number** to the **MetadataObject** API. + +5. Added **readonly boundingBox: Rect** to the **MetadataObject** API. + +**Deprecated APIs** + +1. Deprecated the **release(callback: AsyncCallback): void** and **release(): Promise** APIs in **CameraInput**. + +2. Deprecated the **CameraInputErrorCode** enums and all their values: **ERROR_UNKNOWN** = **-1**, **ERROR_NO_PERMISSION** = **0**, **ERROR_DEVICE_PREEMPTED** = **1**, **ERROR_DEVICE_DISCONNECTED** = **2**, **ERROR_DEVICE_IN_USE** = **3**, **ERROR_DRIVER_ERROR** = **4** + +3. Deprecated the **CameraInputError** API and its attribute **CameraInputErrorCode**. + +4. Deprecated the **CaptureSessionErrorCode** enums and all their values: **ERROR_UNKNOWN** = **-1**, **ERROR_INSUFFICIENT_RESOURCES** = **0**, **ERROR_TIMEOUT** = **1** + +5. Deprecated the **CaptureSessionError** API and its attribute **CaptureSessionErrorCode**. + +6. Deprecated the **PreviewOutputErrorCode** enum and its value: **ERROR_UNKNOWN** = **-1** + +7. Deprecated the **PreviewOutputError** API and its attribute **PreviewOutputErrorCode**. + +8. Deprecated the **PhotoOutputErrorCode** enums and all their values: **ERROR_UNKNOWN** = **-1**, **ERROR_DRIVER_ERROR** = **0**, **ERROR_INSUFFICIENT_RESOURCES** = **1**, **ERROR_TIMEOUT** = **2** + +9. Deprecated the **PhotoOutputError** API and its attribute **PhotoOutputErrorCode**. + +10. Deprecated the **VideoOutputErrorCode** enums and all their values: **ERROR_UNKNOWN** = **-1**, **ERROR_DRIVER_ERROR** = **0** + +11. Deprecated the **VideoOutputError** API and its attribute **VideoOutputErrorCode**. + +12. Deprecated **getType(callback: AsyncCallback): void** in the **MetadataObject** API. + +13. Deprecated **getType(): Promise** in the **MetadataObject** API. + +14. Deprecated **getTimestamp(callback: AsyncCallback): void** in the **MetadataObject** API. + +15. Deprecated **getTimestamp(): Promise** in the **MetadataObject** API. + +16. Deprecated **getBoundingBox(callback: AsyncCallback): void** in the **MetadataObject** API. + +17. Deprecated **getBoundingBox(): Promise** in the **MetadataObject** API. + +18. Deprecated the **MetadataOutputErrorCode** enums and all their values: **ERROR_UNKNOWN** = **-1**, **ERROR_INSUFFICIENT_RESOURCES** = **0** + +19. Deprecated the **MetadataOutputError** API and its attribute **MetadataOutputErrorCode**. + +**Changed APIs** + +1. Changed the return modes of the **getCameraManager** API in the camera module from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getCameraManager(context: Context, callback: AsyncCallback): void** and **getCameraManager(context: Context): Promise** are changed to **getCameraManager(context: Context): CameraManager**. + + The code snippet is as follows: + + ``` + let cameraManager = camera.getCameraManager(context); + ``` + +2. Changed the return modes of the **getSupportedCameras** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getSupportedCameras(callback: AsyncCallback>): void** and **getSupportedCameras(): Promise>** are changed to **getSupportedCameras(): Array**. + + The code snippet is as follows: + + ``` + let cameras = cameraManager.getSupportedCameras(); + ``` + +3. Changed the return modes of the **getSupportedOutputCapability** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getSupportedOutputCapability(camera: CameraDevice, callback: AsyncCallback): void** and **getSupportedOutputCapability(camera: CameraDevice): Promise** are changed to **getSupportedOutputCapability(camera: CameraDevice): CameraOutputCapability**. + + The code snippet is as follows: + + ``` + let cameraDevice = cameras[0]; + let CameraOutputCapability = cameraManager.getSupportedOutputCapability(cameraDevice); + ``` + +4. Changed the return modes of the **createCameraInput(camera: CameraDevice)** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createCameraInput(camera: CameraDevice, callback: AsyncCallback): void** and **createCameraInput(camera: CameraDevice): Promise** are changed to **createCameraInput(camera: CameraDevice): CameraInput**. + + The code snippet is as follows: + + ``` + let cameraDevice = cameras[0]; + let cameraInput = cameraManager.createCameraInput(cameraDevice); + ``` + +5. Changed the return modes of the **createCameraInput(position: CameraPosition, type: CameraType)** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback): void** and **createCameraInput(position: CameraPosition, type: CameraType): Promise** are changed to **createCameraInput(position: CameraPosition, type: CameraType): CameraInput**. + + The code snippet is as follows: + + ``` + let cameraDevice = cameras[0]; + let position = cameraDevice.cameraPosition; + let type = cameraDevice.cameraType; + let cameraInput = cameraManager.createCameraInput(position, type); + ``` + +6. Changed the return modes of the **createPreviewOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void** and **createPreviewOutput(profile: Profile, surfaceId: string): Promise** are changed to **createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput**. + + The code snippet is as follows: + + ``` + let profile = cameraoutputcapability.previewProfiles[0]; + let previewOutput = cameraManager.createPreviewOutput(profile, surfaceId); + ``` + +7. Changed the return modes of the **createPhotoOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback): void** and **createPhotoOutput(profile: Profile, surfaceId: string): Promise** are changed to **createPhotoOutput(profile: Profile, surfaceId: string): PhotoOutput**. + + The code snippet is as follows: + + ``` + let profile = cameraoutputcapability.photoProfiles[0]; + let photoOutput = cameraManager.createPhotoOutput(profile, surfaceId); + ``` + +8. Changed the return modes of the **createVideoOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallback): void** and **createVideoOutput(profile: VideoProfile, surfaceId: string): Promise** are changed to **createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput**. + + The code snippet is as follows: + + ``` + let profile = cameraoutputcapability.videoProfiles[0]; + let videoOutput = cameraManager.createVideoOutput(profile, surfaceId); + ``` + +9. Changed the return modes of the **createMetadataOutput** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createMetadataOutput(metadataObjectTypes: Array, callback: AsyncCallback): void** and **createMetadataOutput(metadataObjectTypes: Array): Promise** are changed to **createMetadataOutput(metadataObjectTypes: Array): MetadataOutput**. + + The code snippet is as follows: + + ``` + let metadataObjectTypes = cameraoutputcapability.supportedMetadataObjectTypes; + let metadataOutput = cameraManager.createMetadataOutput(metadataObjectTypes); + ``` + +10. Changed the return modes of the **createCaptureSession** API in CameraManager from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **createCaptureSession(callback: AsyncCallback): void** and **createCaptureSession(): Promise** are changed to **createCaptureSession(): CaptureSession**. + + The code snippet is as follows: + + ``` + let captureSession = cameraManager.createCaptureSession(); + ``` + +11. Changed the enum **CAMERA_TYPE_UNSPECIFIED** of **CameraType** to **CAMERA_TYPE_DEFAULT**. + +12. Changed the return value type of the **on** API in CameraInput from **CameraInputError** to **BusinessError**. Therefore, the original API **on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void** is changed to **on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void**. + + The code snippet is as follows: + + ``` + let cameraDevice = cameras[0]; + cameraInput.on('error', cameraDevice, (BusinessError) => { + + }) + ``` + +13. Changed the return modes of the **beginConfig** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **beginConfig(callback: AsyncCallback): void** and **beginConfig(): Promise** are changed to **beginConfig(): void**. + + The code snippet is as follows: + + ``` + captureSession.beginConfig(); + ``` + +14. Changed the return modes of the **addInput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **addInput(cameraInput: CameraInput, callback: AsyncCallback): void** and **addInput(cameraInput: CameraInput): Promise** are changed to **addInput(cameraInput: CameraInput): void**. + + The code snippet is as follows: + + ``` + captureSession.addInput(cameraInput); + ``` + +15. Changed the return modes of the **removeInput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **removeInput(cameraInput: CameraInput, callback: AsyncCallback): void** and **removeInput(cameraInput: CameraInput): Promise** are changed to **removeInput(cameraInput: CameraInput): void**. + + The code snippet is as follows: + + ``` + captureSession.removeInput(cameraInput); + ``` + +16. Changed the return modes of the **addOutput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **addOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void** and **addOutput(cameraOutput: CameraOutput): Promise** are changed to **addOutput(cameraOutput: CameraOutput): void**. + + The code snippet is as follows: + + ``` + captureSession.addOutput(previewOutput); + ``` + +17. Changed the return modes of the **removeOutput** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **removeOutput(cameraOutput: CameraOutput, callback: AsyncCallback): void** and **removeOutput(cameraOutput: CameraOutput): Promise** are changed to **removeOutput(cameraOutput: CameraOutput): void**. + + The code snippet is as follows: + + ``` + captureSession.removeOutput(previewOutput); + ``` + +18. Changed the return modes of the **hasFlash** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **hasFlash(callback: AsyncCallback): void** and **hasFlash(): Promise** are changed to **hasFlash(): boolean**. + + The code snippet is as follows: + + ``` + let status = captureSession.hasFlash(); + ``` + +19. Changed the return modes of the **isFlashModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback): void** and **isFlashModeSupported(flashMode: FlashMode): Promise** are changed to **isFlashModeSupported(flashMode: FlashMode): boolean**. + + The code snippet is as follows: + + ``` + let status = captureSession.isFlashModeSupported(camera.FlashMode.FLASH_MODE_AUTO); + ``` + +20. Changed the return modes of the **getFlashMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFlashMode(callback: AsyncCallback): void** and **getFlashMode(): Promise** are changed to **getFlashMode(): FlashMode**. + + The code snippet is as follows: + + ``` + let flashMode = captureSession.getFlashMode(); + ``` + +21. Changed the return modes of the **isExposureModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isExposureModeSupported(aeMode: ExposureMode, callback: AsyncCallback): void** and **isExposureModeSupported(aeMode: ExposureMode): Promise** are changed to **isExposureModeSupported(aeMode: ExposureMode): boolean**. + + The code snippet is as follows: + + ``` + let isSupported = captureSession.isExposureModeSupported(camera.ExposureMode.EXPOSURE_MODE_LOCKED); + ``` + +22. Changed the return modes of the **getExposureMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getExposureMode(callback: AsyncCallback): void** and **getExposureMode(): Promise** are changed to **getExposureMode(): ExposureMode**. + + The code snippet is as follows: + + ``` + let exposureMode = captureSession.getExposureMode(); + ``` + +23. Changed the return modes of the **setExposureMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setExposureMode(aeMode: ExposureMode, callback: AsyncCallback): void** and **setExposureMode(aeMode: ExposureMode): Promise** are changed to **setExposureMode(aeMode: ExposureMode): void**. + + The code snippet is as follows: + + ``` + captureSession.setExposureMode(camera.ExposureMode.EXPOSURE_MODE_LOCKED); + ``` + +24. Changed the return modes of the **getMeteringPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getMeteringPoint(callback: AsyncCallback): void** and **getMeteringPoint(): Promise** are changed to **getMeteringPoint(): Point**. + + The code snippet is as follows: + + ``` + let exposurePoint = captureSession.getMeteringPoint(); + ``` + +25. Changed the return modes of the **setMeteringPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setMeteringPoint(point: Point, callback: AsyncCallback): void** and **setMeteringPoint(point: Point): Promise** are changed to **setMeteringPoint(point: Point): void**. + + The code snippet is as follows: + + ``` + let Point2 = {x: 2, y: 2}; + captureSession.setMeteringPoint(Point2); + ``` + +26. Changed the return modes of the **getExposureBiasRange** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getExposureBiasRange(callback: AsyncCallback>): void** and **getExposureBiasRange(): Promise>** are changed to **getExposureBiasRange(): Array**. + + The code snippet is as follows: + + ``` + let biasRangeArray = captureSession.getExposureBiasRange(); + ``` + +27. Changed the return modes of the **setExposureBias** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setExposureBias(exposureBias: number, callback: AsyncCallback): void** and **setExposureBias(exposureBias: number): Promise** are changed to **setExposureBias(exposureBias: number): void**. + + The code snippet is as follows: + + ``` + let exposureBias = biasRangeArray[0]; + captureSession.setExposureBias(exposureBias); + ``` + +28. Changed the return modes of the **getExposureValue** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getExposureValue(callback: AsyncCallback): void** and **getExposureValue(): Promise** are changed to **getExposureValue(): number**. + + The code snippet is as follows: + + ``` + let exposureValue = captureSession.getExposureValue(); + ``` + +29. Changed the return modes of the **isFocusModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback): void** and **isFocusModeSupported(afMode: FocusMode): Promise** are changed to **isFocusModeSupported(afMode: FocusMode): boolean**. + + The code snippet is as follows: + + ``` + let status = captureSession.isFocusModeSupported(camera.FocusMode.FOCUS_MODE_AUTO); + ``` + +30. Changed the return modes of the **getFocusMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFocusMode(callback: AsyncCallback): void** and **getFocusMode(): Promise** are changed to **getFocusMode(): FocusMode**. + + The code snippet is as follows: + + ``` + let afMode = captureSession.getFocusMode(); + ``` + +31. Changed the return modes of the **setFocusMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setFocusMode(afMode: FocusMode, callback: AsyncCallback): void** and **setFocusMode(afMode: FocusMode): Promise** are changed to **setFocusMode(afMode: FocusMode): void**. + + The code snippet is as follows: + + ``` + captureSession.setFocusMode(camera.FocusMode.FOCUS_MODE_AUTO); + ``` + +32. Changed the return modes of the **setFocusPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setFocusPoint(point: Point, callback: AsyncCallback): void** and **setFocusPoint(point: Point): Promise** are changed to **setFocusPoint(point: Point): void**. + + The code snippet is as follows: + + ``` + let Point2 = {x: 2, y: 2}; + captureSession.setFocusPoint(Point2); + ``` + +33. Changed the return modes of the **getFocusPoint** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFocusPoint(callback: AsyncCallback): void** and **getFocusPoint(): Promise** are changed to **getFocusPoint(): Point**. + + The code snippet is as follows: + + ``` + let point = captureSession.getFocusPoint(); + ``` + +34. Changed the return modes of the **getFocalLength** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getFocalLength(callback: AsyncCallback): void** and **getFocalLength(): Promise** are changed to **getFocalLength(): number**. + + The code snippet is as follows: + + ``` + let focalLength = captureSession.getFocalLength(); + ``` + +35. Changed the return modes of the **getZoomRatioRange** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getZoomRatioRange(callback: AsyncCallback>): void** and **getZoomRatioRange(): Promise>** are changed to **getZoomRatioRange(): Array**. + + The code snippet is as follows: + + ``` + let zoomRatioRange = captureSession.getZoomRatioRange(); + ``` + +36. Changed the return modes of the **getZoomRatio** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getZoomRatio(callback: AsyncCallback): void** and **getZoomRatio(): Promise** are changed to **getZoomRatio(): number**. + + The code snippet is as follows: + + ``` + let zoomRatio = captureSession.getZoomRatio(); + ``` + +37. Changed the return modes of the **setZoomRatio** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setZoomRatio(zoomRatio: number, callback: AsyncCallback): void** and **setZoomRatio(zoomRatio: number): Promise** are changed to **setZoomRatio(zoomRatio: number): void**. + + The code snippet is as follows: + + ``` + let zoomRatio = zoomRatioRange[0]; + captureSession.setZoomRatio(zoomRatio); + ``` + +38. Changed the return modes of the **isVideoStabilizationModeSupported** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback): void** and **isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): Promise** are changed to **isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean**. + + The code snippet is as follows: + + ``` + let isSupported = captureSession.isVideoStabilizationModeSupported(camera.VideoStabilizationMode.OFF); + ``` + +39. Changed the return modes of the **getActiveVideoStabilizationMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **getActiveVideoStabilizationMode(callback: AsyncCallback): void** and **getActiveVideoStabilizationMode(): Promise** are changed to **getActiveVideoStabilizationMode(): VideoStabilizationMode**. + + The code snippet is as follows: + + ``` + let vsMode = captureSession.getActiveVideoStabilizationMode(); + ``` + +40. Changed the return modes of the **setVideoStabilizationMode** API in CaptureSession from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **setVideoStabilizationMode(mode: VideoStabilizationMode, callback: AsyncCallback): void** and **setVideoStabilizationMode(mode: VideoStabilizationMode): Promise** are changed to **setVideoStabilizationMode(mode: VideoStabilizationMode): void**. + + The code snippet is as follows: + + ``` + captureSession.setVideoStabilizationMode(camera.VideoStabilizationMode.OFF); + ``` + +41. Changed the **on(type:'error') callback** type in CaptureSession from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. + + The code snippet is as follows: + + ``` + captureSession.on('error', (BusinessError) => { + + }) + ``` + +42. Changed the **on(type:'error') callback** type in PreviewOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. + + The code snippet is as follows: + + ``` + previewOutput.on('error', (BusinessError) => { + + }) + ``` + +43. Changed the return modes of the **isMirrorSupported** API in PhotoOutput from asynchronous callback and asynchronous promise to the synchronous mode. Therefore, the original APIs **isMirrorSupported(callback: AsyncCallback): void** and **isMirrorSupported(): Promise** are changed to **isMirrorSupported(): boolean**. + + The code snippet is as follows: + + ``` + let isSupported = photoOutput.isMirrorSupported(); + ``` + +44. Changed the **on(type:'error') callback** type in PhotoOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. + + The code snippet is as follows: + + ``` + PhotoOutput.on('error', (BusinessError) => { + + }) + ``` + +45. Changed the **on(type:'error') callback** type in VideoOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. + + The code snippet is as follows: + + ``` + VideoOutput.on('error', (BusinessError) => { + + }) + ``` + +46. Changed the **on(type:'error') callback** type in MetadataOutput, from **ErrorCallback** to **ErrorCallback**. Therefore, the original API **on(type: 'error', callback: ErrorCallback): void** is changed to **on(type: 'error', callback: ErrorCallback): void**. + + The code snippet is as follows: + + ``` + MetadataOutput.on('error', (BusinessError) => { + + }) + ``` \ No newline at end of file diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-container.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-container.md new file mode 100644 index 0000000000000000000000000000000000000000..6bd06001584f34addcbec3f81a80d47d482e7ffe --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-container.md @@ -0,0 +1,21 @@ +# Common Library Subsystem Changelog + +## cl.commonlibrary.1 Error Code and Information Change +The error codes and information returned by APIs of the **ArrayList**, **List**, **LinkedList**, **Stack**, **Queue**, **Deque**, **PlainArray**, **LightWeightMap**, **LightWeightSet**, **HashMap**, **HashSet**, **TreeMap**, and **TreeSet** classes are changed. + +For details about the changed error codes, see [Utils Error Codes](../../../application-dev/reference/errorcodes/errorcode-utils.md). + +No adaptation is required for applications developed using these APIs. + +**Key API/Component Changes** +Error code information is redefined for APIs in these classes and marked using **'@throws'** in the *.d.ts file of the corresponding module. +The sample code is as follows: +**ArrayList** class before the change: +constructor(); +**ArrayList** class after the change: +@throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked. +constructor(); + +**Change Impact** + +No impact. diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md new file mode 100644 index 0000000000000000000000000000000000000000..20f6121d2cc72d776f490cafb627128dec59fb3c --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-distributeddatamgr.md @@ -0,0 +1,168 @@ +# Distributed Data Management Subsystem JS API Changelog + +## cl.distributeddatamgr.1 API Change +Changed the APIs in **kv_store** of the distributed data management subsystem: + +Changed the **createKVManager()** implementation from asynchronous mode to synchronous mode because the execution duration is fixed and short. + +Before change:
**createKVManager(config: KVManagerConfig): Promise\;**
**createKVManager(config: KVManagerConfig, callback: AsyncCallback): void;**
After change:
**createKVManager(config: KVManagerConfig): KVManager;** + +You need to adapt your application. + +**Change Impact** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): Promise\; | Deleted | +| @ohos.distributedKVStore | distributedKVStore | function createKVManager(config: KVManagerConfig): KVManager; | Changed | + + +**Adaptation Guide** + +The following illustrates how to call **createKVManager** to create a **KVManager** object. + +Stage model: + +```ts +import AbilityStage from '@ohos.application.Ability' +let kvManager; +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("MyAbilityStage onCreate") + let context = this.context + const kvManagerConfig = { + context: context, + bundleName: 'com.example.datamanagertest', + } + try { + kvManager = distributedKVStore.createKVManager(kvManagerConfig); + } catch (e) { + console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); + } + } +} +``` + +FA model: + +```ts +import featureAbility from '@ohos.ability.featureAbility' +let kvManager; +let context = featureAbility.getContext() +const kvManagerConfig = { + context: context, + bundleName: 'com.example.datamanagertest', +} +try { + kvManager = distributedKVStore.createKVManager(kvManagerConfig); +} catch (e) { + console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); +} +``` + +## cl.distributeddatamgr.2 Move of getRdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +Moved **getRdbStoreV9()** from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts, and renamed it **getRdbStore()**. + +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +APIs: + +```ts +function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number, callback: AsyncCallback): void; +function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number): Promise; +``` +Moved the above APIs from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. +``` +function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; +function getRdbStore(context: Context, config: StoreConfig): Promise; +``` + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change the names of the **getRdbStore()** APIs. + +## cl.distributeddatamgr.3 Move of deleteRdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts + +Moved **deleteRdbStoreV9()** from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts, and renamed it **deleteRdbStore()**. + +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +APIs: +```ts +function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; +function deleteRdbStoreV9(context: Context, name: string): Promise; +``` +Moved the above APIs from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. +``` +function deleteRdbStore(context: Context, name: string, callback: AsyncCallback): void; +function deleteRdbStore(context: Context, name: string): Promise; +``` + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change the names of the **deleteRdbStoreV9()** APIs. + +## cl.distributeddatamgr.4 Move of StoreConfigV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **StoreConfigV9** from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **StoreConfig**. + +**Adaptation Guide** + + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change the **StoreConfigV9** in APIs. + +## cl.distributeddatamgr.5 Move of enum SecurityLevel from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **enum SecurityLevel** from **ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts**. + +**Adaptation Guide** + +Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + +## cl.distributeddatamgr.6 Mover of RdbStoreV9 from @ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **RdbStoreV9** from **@ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **RdbStore**. + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change **RdbStoreV9** in relevant APIs. + +## cl.distributeddatamgr.7 Move of class RdbPredicatesV9 from ohos.data.rdb.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved the class **RdbPredicatesV9** from **ohos.data.rdb.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **RdbPredicates**. + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Change **RdbPredicatesV9** in the relevant APIs. + +## cl.distributeddatamgr.8 Move of ResultSetV9 from api/@ohos.data.relationalStore.d.ts to @ohos.data.relationalStore.d.ts +**Change Impact** +The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful. + +**Key API/Component Changes** +Moved **ResultSetV9** from **api/data/rdb/resultSet.d.ts** to **@ohos.data.relationalStore.d.ts** and renamed it **ResultSet**. + +**Adaptation Guide** + * Change **import rdb from "@ohos.data.rdb"** to **import rdb from "@ohos.data.relationalStore"**. + * Obtain the **ResultSetV9** instance only by using **getRdbStoreV9**. After modifications are made according to cl.distributeddatamgr.2, the code can automatically adapt to **ResultSet**. + diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md new file mode 100644 index 0000000000000000000000000000000000000000..200571e0f28b80358e87bf37d2e41a15c7b46454 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-filemanagement.md @@ -0,0 +1,145 @@ +# File Management Subsystem Changelog + +## cl.filemanagement.1 environment Module Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **environment** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **environment** module supports error code processing. + +**Key API/Component Changes** + +Before the change, **environment** was imported from **@ohos.environment**: + +```js +import environment from '@ohos.environment'; +``` + +Now, **environment** is imported from **@ohos.file.environment**: + +```js +import environment from '@ohos.file.environment'; +``` + +## cl.filemanagement.2 securityLabel Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **securityLabel** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **securityLabel** module supports error code processing. + +**Key API/Component Changes** + +Before the change, **securityLabel** was imported from **@ohos.securityLabel**: + +```js +import securityLabel from '@ohos.securityLabel'; +``` + +Now, **securityLabel** is imported from **@ohos.file.securityLabel**: + +```js +import securityLabel from '@ohos.file.securityLabel'; +``` + +## cl.filemanagement.3 fs Change + +Changed the **ino** attribute type of **Stat** under **fs**. + +**Change Impact** + +The **ino** attribute type is changed from number to BigInt, to adapt to the **inode** range of all types of files in the file system. + +**Key API/Component Changes** + +The type of the **ino** attribute of **Stat** is changed from number to BigInt. + +## cl.filemanagement.4 fileAccess Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileAccess** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **fileAccess** module supports error code processing. + +**Key API/Component Changes** + +Before the change, **fileAccess** was imported from **@ohos.data.fileAccess**: + +```js +import fileAccess from '@ohos.data.fileAccess'; +``` + +Now, **fileAccess** is imported from **@ohos.file.fileAccess**: + +```js +import fileAccess from '@ohos.file.fileAccess'; +``` + +## cl.filemanagement.5 fileExtensionInfo Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **fileExtensionInfo** module supports error code processing. + +**Key API/Component Changes** + +Before the change, **fileExtensionInfo** was imported from **@ohos.fileExtensionInfo**: + +```js +import fileExtensionInfo from '@ohos.fileExtensionInfo'; +``` + +Now, **fileExtensionInfo** is imported from **@ohos.file.fileExtensionInfo**: + +```js +import fileExtensionInfo from '@ohos.file.fileExtensionInfo'; +``` + +## cl.filemanagement.6 storageStatistics Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **storageStatistics** module supports error code processing. + +**Key API/Component Changes** + +Before the change, **storageStatistics** was imported from **@ohos.storageStatistics**: + +```js +import storageStatistics from '@ohos.storageStatistics'; +``` + +Now, **storageStatistics** is imported from **@ohos.file.storageStatistics**: + +```js +import storageStatistics from '@ohos.file.storageStatistics'; +``` + +## cl.filemanagement.7 volumeManager Change + +Moved the file management subsystem **d.ts** file to the **file** directory. The **fileExtensionInfo** module supports error code processing. + +**Change Impact** + +If your application is developed based on earlier versions, note that the **d.ts** file location and the name of the module to be imported are changed. The **volumeManager** module supports error code processing. + +**Key API/Component Changes** + +Before the change, **volumeManager** was imported from **@ohos.volumeManager**: + +```js +import volumeManager from '@ohos.volumeManager'; +``` + +Now, **volumeManager** is imported from **@ohos.file.volumeManager**: + +```js +import volumeManager from '@ohos.file.volumeManager'; +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md new file mode 100644 index 0000000000000000000000000000000000000000..b8dc285044dc94ad02ba7cc17ea70005e1f282da --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-inputmethod-framworks.md @@ -0,0 +1,30 @@ +# Input Method Framework ChangeLog + +## cl.inputmethod_frameworks.1 API Filename Change + +The following modules do not comply with the OpenHarmony API file naming rules. Therefore, they are modified in API version 9 and later. + + **Change Impacts** + + The SDK after the change is incompatible with the earlier versions. Therefore, adaptation is required for applications developed in earlier versions so that they can be properly built with the SDK in the new version. + + **Key API/Component Changes** + +| Module| File Name Before Change| File Name After Change| +|------|--------------|--------------| +| Input method framework module| @ohos.inputmethod.d.ts |@ohos.inputMethod.d.ts | +| Input method service module|@ohos.inputmethodengine.d.ts | @ohos.inputMethodEngine.d.ts | +| Input method ExtentionAbility module| @ohos.inputmethodextensionability.d.ts | @ohos.InputMethodExtensionAbility.d.ts | +| Input method ExtentionContext module|@ohos.inputmethodextensioncontext.d.ts | @ohos.InputMethodExtensionContext.d.ts | +| Input method subtype module| @ohos.inputMethodSubtype.d.ts | @ohos.InputMethodSubtype.d.ts | + + **Adaptation Guide** + + In the application code, change the name of the d.ts file following **import** to the new file name, which complies with the UpperCamelCase or lowerCamelCase style. + Example: + +```js +import inputMethodEngine from '@ohos.inputMethodEngine'; +``` + + diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md new file mode 100644 index 0000000000000000000000000000000000000000..459adbacf8a02fbb45ef82ee6bb6dba706633258 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-mediaLibrary.md @@ -0,0 +1,116 @@ +# File Management Subsystem Changelog + +## cl.file.1 mediaLibrary APIs Changed + +The **MediaLibrary** class of the multimedia component is replaced by the **FilePicker** class. + +**Change Impact** + +For applications developed based on earlier versions, pay attention to the changes of APIs. **FilePicker** is a system application preset in OpenHarmony. You can use it to select and save files. + +**Key API/Component Changes** + +The APIs of **MediaLibrary**, located in **@ohos.multimedia.medialibrary**, are deprecated. The **FilePicker** class, located in [@ohos.file.picker](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.file.picker.d.ts) is used. + +| Module | Method/Attribute/Enum/Constant | Change Type| +| ------------------------- | ------------------------------------------------------------ | -------- | +| medialibrary | **function** getMediaLibrary(): MediaLibrary; | Deprecated | +| medialibrary | **function** getMediaLibrary(context: Context): MediaLibrary; | Deprecated | +| medialibrary | **function** getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** getFileAssets(options: MediaFetchOptions): Promise\ | Deprecated | +| medialibrary | **function** on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\): void | Deprecated | +| medialibrary | **function** off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\): void | Deprecated | +| medialibrary | **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise\ | Deprecated | +| medialibrary | **function** deleteAsset(uri: string): Promise\ | Deprecated | +| medialibrary | **function** deleteAsset(uri: string, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** getPublicDirectory(type: DirectoryType, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** getPublicDirectory(type: DirectoryType): Promise\ | Deprecated | +| medialibrary | **function** getAlbums(options: MediaFetchOptions, callback: AsyncCallback\\>): void | Deprecated | +| medialibrary | **function** getAlbums(options: MediaFetchOptions): Promise\\> | Deprecated | +| medialibrary | **function** release(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** release(): Promise\ | Deprecated | +| medialibrary | **function** storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** storeMediaAsset(option: MediaAssetOption): Promise\ | Deprecated | +| medialibrary | **function** startImagePreview(images: Array\, index: number, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** startImagePreview(images: Array\, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** startImagePreview(images: Array\, index?: number): Promise\ | Deprecated | +| medialibrary | **function** startMediaSelect(option: MediaSelectOption, callback: AsyncCallback\\>): void | Deprecated | +| medialibrary | **function** startMediaSelect(option: MediaSelectOption): Promise\\> | Deprecated | +| medialibrary | **function** getActivePeers(): Promise\\>; | Deprecated | +| medialibrary | **function** getActivePeers(callback: AsyncCallback\\>): void; | Deprecated | +| medialibrary | **function** getAllPeers(): Promise\\>; | Deprecated | +| medialibrary | **function** FileAsset.isDirectory(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.isDirectory():Promise\ | Deprecated | +| medialibrary | **function** FileAsset.commitModify(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.commitModify(): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.open(mode: string, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.open(mode: string): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.close(fd: number, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.close(fd: number): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.getThumbnail(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.getThumbnail(size: Size, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.getThumbnail(size?: Size): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.favorite(isFavorite: boolean, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.favorite(isFavorite: boolean): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.isFavorite(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.isFavorite():Promise\ | Deprecated | +| medialibrary | **function** FileAsset.trash(isTrash: boolean, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.trash(isTrash: boolean): Promise\ | Deprecated | +| medialibrary | **function** FileAsset.isTrash(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FileAsset.isTrash():Promise\ | Deprecated | +| medialibrary | **function** FetchFileResult.getCount(): number | Deprecated | +| medialibrary | **function** FetchFileResult.isAfterLast(): boolean | Deprecated | +| medialibrary | **function** FetchFileResult.close(): void | Deprecated | +| medialibrary | **function** FetchFileResult.getFirstObject(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FetchFileResult.getFirstObject(): Promise\ | Deprecated | +| medialibrary | **function** FetchFileResult.getNextObject(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FetchFileResult.getNextObject(): Promise\ | Deprecated | +| medialibrary | **function** FetchFileResult.getLastObject(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FetchFileResult.getLastObject(): Promise\ | Deprecated | +| medialibrary | **function** FetchFileResult.getPositionObject(index: number, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** FetchFileResult.getPositionObject(index: number): Promise\ | Deprecated | +| medialibrary | **function** FetchFileResult.getAllObject(callback: AsyncCallback\\>): void | Deprecated | +| medialibrary | **function** FetchFileResult.getAllObject(): Promise\\> | Deprecated | +| medialibrary | **function** Album.commitModify(callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** Album.commitModify(): Promise\ | Deprecated | +| medialibrary | **function** Album.getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\): void | Deprecated | +| medialibrary | **function** Album.getFileAssets(options?: MediaFetchOptions): Promise\ | Deprecated | +| medialibrary | **enum** DeviceType | Deprecated | +| medialibrary | **enum** FileKey | Deprecated | +| medialibrary | **enum** DirectoryType | Deprecated | +| medialibrary | **enum** MediaType | Deprecated | +| medialibrary | **interface** PeerInfo | Deprecated | +| medialibrary | **interface** Size | Deprecated | +| medialibrary | **interface** MediaFetchOptions | Deprecated | +| medialibrary | **interface** MediaAssetOption | Deprecated | +| medialibrary | **interface** MediaSelectOption | Deprecated | +| medialibrary | **interface** FileAsset | Deprecated | + +**Adaptation Guide** + +For example, refer to the code snippet below to call an API to select an image: + +```js +import picker from '@ohos.file.picker'; + +async function example() { + try { + let PhotoSelectOptions = new picker.PhotoSelectOptions(); + PhotoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE; + PhotoSelectOptions.maxSelectNumber = 1; + let photoPicker = new picker.PhotoViewPicker(); + photoPicker.select(PhotoSelectOptions).then((PhotoSelectResult) => { + if (PhotoSelectResult !== undefined) { + console.info("PhotoViewPicker.select pass, PhotoSelectResult uri: " + JSON.stringify(PhotoSelectResult)); + } else { + console.error("PhotoViewPicker.select PhotoSelectResult is undefined"); + } + }).catch((err) => { + console.error("PhotoViewPicker.select fail, err: " + err); + }); + } catch (err) { + console.error("PhotoViewPicker fail, err: " + err); + } +} +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..ffeb68c714639f07a5b53a0bacaca16be2aab81a --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-multimedia.md @@ -0,0 +1,53 @@ +## cl.multimedia.av_session.001 Change of All av_session APIs to System APIs + +All av_session APIs are changed to system APIs. + +**Change Impact** + +Non-system applications and applications without system API permission cannot call system APIs. + +**Key API/Component Changes** + +All APIs are changed to system APIs. The table below describes the APIs. + +| API/Enum/Variable| Type| Is System API| +| -------- | -------- | ------- | +| SessionToken | interface | Yes| +| AVMetadata | interface | Yes| +| AVPlaybackState | interface | Yes| +| PlaybackPosition | interface | Yes| +| OutputDeviceInfo | interface | Yes| +| AVSessionDescriptor | interface | Yes| +| AVSessionController | interface | Yes| +| AVControlCommand | interface | Yes| +| createAVSession | function | Yes| +| getAllSessionDescriptors | function | Yes| +| createController | function | Yes| +| castAudio | function | Yes| +| on | function | Yes| +| off | function | Yes| +| sendSystemAVKeyEvent | function | Yes| +| sendSystemControlCommand | function | Yes| +| sessionId | variable | Yes| +| setAVMetadata | function | Yes| +| setAVPlaybackState | function | Yes| +| setLaunchAbility | function | Yes| +| getController | function | Yes| +| getOutputDevice | function | Yes| +| activate | function | Yes| +| deactivate | function | Yes| +| destroy | function | Yes| +| getAVPlaybackState | function | Yes| +| getAVMetadata | function | Yes| +| getOutputDevice | function | Yes| +| sendAVKeyEvent | function | Yes| +| getLaunchAbility | function | Yes| +| getRealPlaybackPositionSync | function | Yes| +| isActive | function | Yes| +| getValidCommands | function | Yes| +| sendControlCommand | function | Yes| +| AVSessionType | type | Yes| +| AVControlCommandType | type | Yes| +| LoopMode | enum | Yes| +| PlaybackState | enum | Yes| +| AVSessionErrorCode | enum | Yes| diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md new file mode 100644 index 0000000000000000000000000000000000000000..d1693278786b3ebcb09e1bbb60e33177b7cec656 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-nfc.md @@ -0,0 +1,58 @@ +# Changelog of NFC JS APIs in the Communication Subsystem + +## cl.nfc.1 API Change +Deprecated some NFC JS APIs in API versions 6 to 8 because the APIs cannot throw error codes, and added new APIs in API version 9 instead. + +You need to adapt your application based on the following information. + + **Change Impact** + +The deprecated JS APIs in API versions 6 to 8 are affected. Your application needs to adapt new APIs so that it can properly implement functions in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| +| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | FeatureType | Deprecated | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | isSupported | Deprecated | +| api/@ohos.nfc.cardEmulation.d.ts | cardEmulation | hasHceCapability | Added | +| api/@ohos.nfc.controller.d.ts | nfcController | isNfcAvailable | Deprecated | +| api/@ohos.nfc.controller.d.ts | nfcController | openNfc | Deprecated | +| api/@ohos.nfc.controller.d.ts | nfcController | closeNfc | Deprecated | +| api/@ohos.nfc.controller.d.ts | nfcController | enableNfc | Added | +| api/@ohos.nfc.controller.d.ts | nfcController | disableNfc | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcATag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcBTag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcFTag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcVTag | Deprecated | +| api/@ohos.nfc.tag.d.ts | tag | getNfcA | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcB | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcF | Added | +| api/@ohos.nfc.tag.d.ts | tag | getNfcV | Added | +| api/tag/tagSession.d.ts | TagSession | getTagInfo | Deprecated | +| api/tag/tagSession.d.ts | TagSession | connectTag | Deprecated | +| api/tag/tagSession.d.ts | TagSession | reset | Deprecated | +| api/tag/tagSession.d.ts | TagSession | isTagConnected | Deprecated | +| api/tag/tagSession.d.ts | TagSession | setSendDataTimeout | Deprecated | +| api/tag/tagSession.d.ts | TagSession | getSendDataTimeout | Deprecated | +| api/tag/tagSession.d.ts | TagSession | sendData | Deprecated | +| api/tag/tagSession.d.ts | TagSession | getMaxSendLength | Deprecated | +| api/tag/tagSession.d.ts | TagSession | connect | Added | +| api/tag/tagSession.d.ts | TagSession | resetConnection | Added | +| api/tag/tagSession.d.ts | TagSession | isConnected | Added | +| api/tag/tagSession.d.ts | TagSession | setTimeout | Added | +| api/tag/tagSession.d.ts | TagSession | getTimeout | Added | +| api/tag/tagSession.d.ts | TagSession | transmit | Added | +| api/tag/tagSession.d.ts | TagSession | getMaxTransmitSize | Added | + +**Adaptation Guide** + +See the following: +[@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](../../../application-dev/reference/apis/js-apis-cardEmulation.md) + +[@ohos.nfc.controller (Standard NFC)](../../../application-dev/reference/apis/js-apis-nfcController.md) + +[@ohos.nfc.tag (Standard NFC Tags)](../../../application-dev/reference/apis/js-apis-nfcTag.md) + +[tagSession (Standard NFC Tag Session)](../../../application-dev/reference/apis/js-apis-tagSession.md) +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-notification.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..2a028d4b32b85c1f6894139df16cfa11d1f78c9a --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-notification.md @@ -0,0 +1,47 @@ +# Common Event and Notification Subsystem ChangeLog + +## cl.notification.1 Deleting Deprecated APIs (Version 9) + +In the event notification exception handling rectification, some APIs in API version 9 are marked as deprecated, and these APIs need to be deleted, according to OpenHarmony API specifications. + +**Change Impacts** + +The application developed based on earlier versions needs to use new APIs to replace the deleted ones. Otherwise, the application compilation will be affected. + +**Key API/Component Changes** + +Deprecated APIs in API version 9 will be deleted, and they will be replaced with new ones with same names. + +| Original API | New API | +| ----------------------- | -------------------------------- | +| @ohos.commonEvent.d.ts | @ohos.commonEventManager.d.ts | +| @ohos.notification.d.ts | @ohos.notificationManager.d.ts | +| @ohos.notification.d.ts | @ohos.notificationSubscribe.d.ts | + +APIs or attributes are deleted: + +- @ohos.notification.d.ts + - The **publishAsBundle**, **cancelAsBundle**, **isNotificationSlotEnabled**, **setSyncNotificationEnabledWithoutApp**, and **getSyncNotificationEnabledWithoutApp** APIs are deleted. Replace them with APIs with same names in **api/@ohos.notificationManager.d.ts**. + - The **enableNotificationSlot** API is deleted. Replace it with **setNotificationEnableSlot** in **api/@ohos.notificationManager.d.ts**. + - The export classes **NotificationActionButton**, **NotificationBasicContent**, **NotificationContent**, **NotificationLongTextContent**, **NotificationMultiLineContent**, **NotificationPictureContent**, **NotificationFlags**, **NotificationFlagStatus**, **NotificationRequest**, **DistributedOptions**, **NotificationSlot**, **NotificationSorting**, **NotificationTemplate**, and **NotificationUserInput** are deleted. Replace them with the export classes with the same names in **api/@ohos.notificationManager.d.ts**. + - The export classes **NotificationSubscribeInfo**, **NotificationSubscriber**, **SubscribeCallbackData**, and **EnabledNotificationCallbackData** are deleted. Replace them with the export classes with the same names in **api/@ohos.notificationSubscribe.d.ts**. + +**Adaptation Guide** + +The original APIs are only migrated to the new namespace. Therefore, you can modify **import** to solve the adaptation problem. + +If the original API uses **@ohos.commonEvent**: + +```js +import commonEvent from '@ohos.commonEvent'; +``` + +You can directly modify **import** to switch to the new namespace: + +```js +import commonEvent from '@ohos.commonEventManager'; +``` + +**@ohos.notification** is split into two namespaces. You need to select a new namespace for adaptation. + +In addition, exception handling is needed. For details, see the API reference for the new APIs. diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md new file mode 100644 index 0000000000000000000000000000000000000000..fe1db611f384bf1550c0fa4583df6c9fd186d7e4 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geoLocationManager.md @@ -0,0 +1,107 @@ +# Location Subsystem Changelog + +## cl.location.1 API Migration from @ohos.geolocation.d.ts to @ohos.geoLocationManager.d.ts + +APIs in **@ohos.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@ohos.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. + +To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**Change Impact** + +All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|geolocation| method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'locationChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'locationServiceState', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'locationServiceState'** to **type: 'locationEnabledChange'**.| +|geolocation| method | function off(type: 'locationServiceState', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'locationServiceState'** to **type: 'locationEnabledChange'**.| +|geolocation| method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'cachedGnssLocationsReporting'** to **type: 'cachedGnssLocationsChange'**.| +|geolocation| method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'cachedGnssLocationsReporting'** to **type: 'cachedGnssLocationsChange'**.| +|geolocation| method | function on(type: 'gnssStatusChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'gnssStatusChange'** to **type: 'satelliteStatusChange'**.| +|geolocation| method | function off(type: 'gnssStatusChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'gnssStatusChange'** to **type: 'satelliteStatusChange'**.| +|geolocation| method | function on(type: 'nmeaMessageChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'nmeaMessageChange'** to **type: 'nmeaMessage'**.| +|geolocation| method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'nmeaMessageChange'** to **type: 'nmeaMessage'**.| +|geolocation| method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'fenceStatusChange'** to **type: 'gnssFenceStatusChange'**.| +|geolocation| method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed **type: 'fenceStatusChange'** to **type: 'gnssFenceStatusChange'**.| +|geolocation| method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getLastLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function getLastLocation(): Location**.| +|geolocation| method | function getLastLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function getLastLocation(): Location**.| +|geolocation| method | function isLocationEnabled(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationEnabled(): boolean**.| +|geolocation| method | function isLocationEnabled(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationEnabled(): boolean**.| +|geolocation| method | function requestEnableLocation(callback: AsyncCallback): void; | Deleted.| +|geolocation| method | function requestEnableLocation(): Promise; | Deleted.| +|geolocation| method | function enableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function enableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function disableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocation(): void**.| +|geolocation| method | function disableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocation(): void**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isGeoServiceAvailable(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isGeocoderAvailable(): boolean**.| +|geolocation| method | function isGeoServiceAvailable(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isGeocoderAvailable(): boolean**.| +|geolocation| method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCachedGnssLocationsSize(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function enableLocationMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableLocationMock(): void**.| +|geolocation| method | function enableLocationMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableLocationMock(): void**.| +|geolocation| method | function disableLocationMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocationMock(): void**.| +|geolocation| method | function disableLocationMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableLocationMock(): void**.| +|geolocation| method | function setMockedLocations(config: LocationMockConfig, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setMockedLocations(config: LocationMockConfig): void**.| +|geolocation| method | function setMockedLocations(config: LocationMockConfig): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setMockedLocations(config: LocationMockConfig): void**.| +|geolocation| method | function enableReverseGeocodingMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableReverseGeocodingMock(): void**.| +|geolocation| method | function enableReverseGeocodingMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function enableReverseGeocodingMock(): void**.| +|geolocation| method | function disableReverseGeocodingMock(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableReverseGeocodingMock(): void**.| +|geolocation| method | function disableReverseGeocodingMock(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function disableReverseGeocodingMock(): void**.| +|geolocation| method | function setReverseGeocodingMockInfo(mockInfos: Array, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setReverseGeocodingMockInfo(mockInfos: Array): void**.| +|geolocation| method | function setReverseGeocodingMockInfo(mockInfos: Array): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setReverseGeocodingMockInfo(mockInfos: Array): void**.| +|geolocation| method | function isLocationPrivacyConfirmed(type: LocationPrivacyType, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean**.| +|geolocation| method | function isLocationPrivacyConfirmed(type: LocationPrivacyType,): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean**.| +|geolocation| method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void**.| +|geolocation| method | function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): Promise; | Migrated to **@ohos.geoLocationManager.d.ts** and changed to **function setLocationPrivacyConfirmStatus(type: LocationPrivacyType, isConfirmed: boolean): void**.| +|geolocation| interface | SatelliteStatusInfo | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CachedGnssLocationsRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeofenceRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Geofence | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | ReverseGeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoAddress | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | LocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CurrentLocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Location | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestPriority | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestScenario | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | GeoLocationErrorCode | Deprecated.| +|geolocation| enum | LocationPrivacyType | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationCommand | Migrated to **@ohos.geoLocationManager.d.ts**.| + + +**(Optional) Adaptation Guide** + +The following sample code shows how to call **enableLocation** in the new version: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..aaa0ed72daf37764bbf4cc36a23b783799d2e6bb --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-ohos-geolocation.md @@ -0,0 +1,92 @@ +# Location Subsystem Changelog + +## cl.location.1 API Migration from @ohos.geolocation.d.ts to @ohos.geoLocationManager.d.ts + +APIs in **@ohos.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@ohos.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. + +To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**Change Impact** + +All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|geolocation| namespace | declare namespace geolocation| Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **namespace geoLocationManager**.| +|geolocation| method | function on(type: 'locationChange', request: LocationRequest, callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'locationChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'locationServiceState', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'locationServiceState', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'cachedGnssLocationsReporting', callback?: Callback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'gnssStatusChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'gnssStatusChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'nmeaMessageChange', callback: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'nmeaMessageChange', callback?: Callback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCurrentLocation(request?: CurrentLocationRequest): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getLastLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getLastLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isLocationEnabled(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isLocationEnabled(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function requestEnableLocation(callback: AsyncCallback): void; | Deleted.| +|geolocation| method | function requestEnableLocation(): Promise; | Deleted.| +|geolocation| method | function enableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function enableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function disableLocation(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function disableLocation(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback>): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getAddressesFromLocationName(request: GeoCodeRequest): Promise>; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isGeoServiceAvailable(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function isGeoServiceAvailable(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCachedGnssLocationsSize(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function getCachedGnssLocationsSize(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function flushCachedGnssLocations(): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand, callback: AsyncCallback): void; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| method | function sendCommand(command: LocationCommand): Promise; | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | SatelliteStatusInfo | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CachedGnssLocationsRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeofenceRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Geofence | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | ReverseGeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoCodeRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | GeoAddress | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | LocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | CurrentLocationRequest | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| interface | Location | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestPriority | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationRequestScenario | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | GeoLocationErrorCode | Deprecated.| +|geolocation| enum | LocationPrivacyType | Migrated to **@ohos.geoLocationManager.d.ts**.| +|geolocation| enum | LocationCommand | Migrated to **@ohos.geoLocationManager.d.ts**.| + + +**(Optional) Adaptation Guide** + +The following sample code shows how to call **enableLocation** in the new version: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-request.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-request.md new file mode 100644 index 0000000000000000000000000000000000000000..d3e9b53e4d93fb4e6067a7485dbfa0925b2404d9 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-request.md @@ -0,0 +1,42 @@ +# Upload and Download Subsystem Changelog + + +## cl.request.2 Upload and Download API Change + +- Deleted the beta APIs in API version 9: +1. function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; +2. function download(context: BaseContext, config: DownloadConfig): Promise; +3. function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; +4. function upload(context: BaseContext, config: UploadConfig): Promise; + +**Change Impact** + +The application developed based on the Stage mode of earlier versions needs to be adapted. Otherwise, the service logic will be affected. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| +|--------------|--------------|-------------------------------------------------------------------------------------------------------------------|------| +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback): void; | Deleted. | +| ohos.request | request | function download(context: BaseContext, config: DownloadConfig): Promise; | Deleted. | +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback): void; | Deleted. | +| ohos.request | request | function upload(context: BaseContext, config: UploadConfig): Promise; | Deleted. | + + +**Adaptation Guide** + +The following sample code shows how to call **downloadFile** in the new version: + +```ts +try { + request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap', + filePath: 'xxx/xxxxx.hap'}, (err, data) => { + if (err) { + console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); + return; + } + }); +} catch (err) { + console.log("downloadFile callback fail." + "errCode:" + err.code + ",errMessage:" + err.message); +} +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md new file mode 100644 index 0000000000000000000000000000000000000000..8df3e6671bd98eb04092412fd0c6e563268fb91d --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-resourceschedule.md @@ -0,0 +1,111 @@ +# Resource Scheduler Subsystem Changelog + +## cl.resourceschedule.backgroundTaskManager +Rectified the original APIs of **backgroundTaskManager** of the resource scheduler subsystem. All APIs of API version 9 in the **@ohos.backgroundTaskManager.d.ts** file are deleted, and the APIs of API version 9 in the **@ohos.resourceschedule.backgroundTaskManager.d.ts** file are used. The new APIs in API version 9 comply with the error code specifications. + +**Change Impacts** + +If your application is developed based on the SDK versions of OpenHarmony 3.2.10.5 and later, adapt to the modules and APIs in API version 9 and the pattern for returning error codes. Otherwise, the service logic will be affected. + +**Key API/Component Changes** + +The following methods, attributes, enums, and constants are changed in API version 9 and later versions. All the APIs in the **@ohos.backgroundTaskManager.d.ts** file are migrated to the **@ohos.resourceschedule.backgroundTaskManager.d.ts** file. + +| Class| API Type| Declaration| Description| +| -- | -- | -- | -- | +| backgroundTaskManager | method | function resetAllEfficiencyResources(): void; | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager | method | function applyEfficiencyResources(request: EfficiencyResourcesRequest): bool; | Changed in API version 9 to **function applyEfficiencyResources(request: EfficiencyResourcesRequest): void;** and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | export enum ResourceType | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | CPU = 1 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | COMMON_EVENT = 1 << 1 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | TIMER = 1 << 2 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | WORK_SCHEDULER = 1 << 3 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | BLUETOOTH = 1 << 4 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | GPS = 1 << 5 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.ResourceType | enum | AUDIO = 1 << 6 | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | interface | export interface EfficiencyResourcesRequest | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | reason: string | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | isProcess?: bool | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | isPersist?: bool | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | timeOut: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | isApply: bool | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| +| backgroundTaskManager.EfficiencyResourcesRequest | field | resourceTypes: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.backgroundTaskManager.d.ts** file.| + + +**Adaptation Guide** + +Import the **backgroundTaskManager** module. +``` +import bundle form '@ohos.resourceschedule.backgroundTaskManager' +``` +Exception handling also needs to be adapted. For details, see the [backgroundTaskManager API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md). + +## c2.resourceschedule.workScheduler +Rectified the original APIs of **workScheduler** of the resource scheduler subsystem. All APIs of API version 9 in the **@ohos.workScheduler.d.ts** file are deleted, and the APIs of API version 9 in the **@ohos.resourceschedule.workScheduler.d.ts** file are used. The new APIs in API version 9 comply with the error code specifications. + +**Change Impacts** + +If your application is developed based on the SDK versions of OpenHarmony 3.2.10.5 and later, adapt to the modules and APIs in API version 9 and the pattern for returning error codes. Otherwise, the service logic will be affected. + +**Key API/Component Changes** + +The following methods, attributes, enums, and constants are changed in API version 9 and later versions. The **@ohos.workScheduler.d.ts** file is deleted, and all the APIs in it are moved to the **@ohos.resourceschedule.workScheduler.d.ts** file. + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +| workScheduler | namespace | declare namespace workScheduler | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | interface | export interface WorkInfo | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | parameters?: {[key: string]: any} | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | idleWaitTime?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isDeepIdle?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | repeatCount?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isRepeat?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | repeatCycleTime?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | storageRequest?: StorageRequest | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | batteryStatus?: BatteryStatus | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | batteryLevel?: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | chargerType?: ChargingType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isCharging?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | networkType?: NetworkType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | isPersisted?: boolean | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | abilityName: string | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | bundleName: string | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.WorkInfo | field | workId: number | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function isLastWorkTimeOut(workId: number): Promise; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function isLastWorkTimeOut(workId: number, callback: AsyncCallback): boolean; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function stopAndClearWorks(): boolean; | Changed in API version 8 to **function stopAndClearWorks(): boolean;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file| +| workScheduler | method | function obtainAllWorks(): Promise>; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function obtainAllWorks(callback: AsyncCallback): Array; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function getWorkStatus(workId: number): Promise; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function getWorkStatus(workId: number, callback: AsyncCallback): void; | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function stopWork(work: WorkInfo, needCancel?: boolean): boolean; | Changed in API version 8 to **function stopWork(work: WorkInfo, needCancel?: boolean): void;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler | method | function startWork(work: WorkInfo): boolean; | Changed in API version 9 to **function startWork(work: WorkInfo): void;** and moved to the **ohos.resourceschedule.workScheduler.d.ts** file| +| workScheduler.NetworkType | enum | export enum NetworkType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_ANY = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_MOBILE | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_BLUETOOTH | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_WIFI_P2P | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.NetworkType | enum | NETWORK_TYPE_ETHERNET | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | export enum ChargingType | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_ANY = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_AC | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_USB | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.ChargingType | enum | CHARGING_PLUGGED_WIRELESS | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | export enum BatteryStatus | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | BATTERY_STATUS_LOW_OR_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.StorageRequest | enum | export enum StorageRequest | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW = 0 | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| +| workScheduler.BatteryStatus | enum | STORAGE_LEVEL_LOW_OR_OKAY | Deleted in API version 9 and moved to the **ohos.resourceschedule.workScheduler.d.ts** file.| + + +**Adaptation Guide** + +Import the **workScheduler** module. +``` +import bundle form '@ohos.resourceschedule.workScheduler' +``` +Exception handling also needs to be adapted. For details, see the [workScheduler API reference](../../../application-dev/reference/apis/js-apis-resourceschedule-workScheduler.md). diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-security.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-security.md new file mode 100644 index 0000000000000000000000000000000000000000..94ef4335af23115d485ea58eb5ce28af9e4aedc9 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-security.md @@ -0,0 +1,475 @@ +# Security Subsystem Changelog + +## cl.security.1 Change of setSeed() from Asynchronous to Synchronous + +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +setSeed(seed : DataBlob, callback : AsyncCallback\) : void; +setSeed(seed : DataBlob) : Promise\; +API after the change: +setSeed(seed : DataBlob) : void; + +**Adaptation Guide** +See **setSeed()** in the following: +[Crypto Framework](../../../application-dev/reference/apis/js-apis-cryptoFramework.md) + + +## cl.security.2 Move of DataArray from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **DataArray** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.3 Move of EncodingFormat from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **EncodingFormat** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.4 Move of EncodingBlob from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **EncodingBlob** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.5 Move of CertChainData from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **interface CertChainData** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.6 Move of X509Cert from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **X509Cert** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.7 Move of createX509Cert from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **createX509Cert** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.8 Move of X509CrlEntry from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts. +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **X509CrlEntry** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.9 Move of X509Crl from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **X509Crl** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.10 Move of createX509Crl from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **createX509Crl** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.11 Move of CertChainValidator from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **CertChainValidator** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.12 Move of createCertChainValidator from @ohos.security.cryptoFramework.d.ts to @ohos.security.cert.d.ts +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +Moved **createCertChainValidator** from **@ohos.security.cryptoFramework.d.ts** to **@ohos.security.cert.d.ts**. + +**Adaptation Guide** +Import and use the new .d.ts file: +import cryptoCert from '@ohos.security.cert'; +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.13 Change of getPublicKey() of X509Cert from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +getPublicKey(callback : AsyncCallback\) : void; +getPublicKey() : Promise\; +API after the change: +getPublicKey() : cryptoFramework.PubKey; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.14 Change of checkValidityWithDate of X509Cert from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +checkValidityWithDate(date: string, callback : AsyncCallback\) : void; +checkValidityWithDate(date: string) : Promise\; +API after the change: +checkValidityWithDate(date: string) : void; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.15 Change of getCertIssuer of X509CrlEntry from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +getCertIssuer(callback : AsyncCallback\) : void; +getCertIssuer() : Promise\; + +API after the change: +getCertIssuer() : DataBlob; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.16 Change of getRevocationDate of X509CrlEntry from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +getRevocationDate(callback : AsyncCallback\) : void; +getRevocationDate() : Promise\; + +API after the change: +getRevocationDate() : string; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.17 Change of isRevoked of X509Crl from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +isRevoked(cert : X509Cert, callback : AsyncCallback\) : void; +isRevoked(cert : X509Cert) : Promise\; + +API after the change: +isRevoked(cert : X509Cert) : boolean; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.18 Change of getRevokedCert of X509Crl from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +getRevokedCert(serialNumber : number, callback : AsyncCallback\) : void; +getRevokedCert(serialNumber : number) : Promise\; + +API after the change: +getRevokedCert(serialNumber : number) : X509CrlEntry; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.19 Change of getRevokedCertWithCert of X509Crl from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +getRevokedCertWithCert(cert : X509Cert, callback : AsyncCallback\) : void; +getRevokedCertWithCert(cert : X509Cert) : Promise\; + +API after the change: +getRevokedCertWithCert(cert : X509Cert) : X509CrlEntry; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + + +## cl.security.20 Change of getTbsInfo of X509Crl from Asynchronous to Synchronous +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that it can be properly compiled in the SDK environment of the new version. + +**Key API/Component Changes** +API before the change: +getTbsInfo(callback : AsyncCallback\) : void; +getTbsInfo() : Promise\; + +API after the change: +getTbsInfo() : DataBlob; + +**Adaptation Guide** +See the following API reference: +[Certificate](../../../application-dev/reference/apis/js-apis-cert.md) + +## cl.security.21 Support of No-Hash Signing Mode for HUKS + +Before the change, the application passes **huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE** and HUKS uses **huks.HuksKeyDigest.HUKS_DIGEST_SHA256** for processing by default. After the change, the application passes **huks.HuksTag.HUKS_TAG_DIGEST = huks.HuksKeyDigest.HUKS_DIGEST_NONE** and HUKS does not generate a digest by default. Instead, the service performs a hash operation on the original data and then passes a hashed digest to HUKS for signing or signature verification. + +**Change Impact** + +Behavior of released JavaScript APIs will be changed. +The application needs to adapt these APIs so that the signing or signature verification result can be passed before and after the change. + +**Key API/Component Changes** + +Released JavaScript APIs remain unchanged, but parameter sets passed to the APIs are changed. + +The service uses the No-Hash signing mode, and hashes the original data and then passes a hashed digest to the signing or signature verification API of HUKS. In addition, the **huks.HuksTag.HUKS_TAG_DIGEST** parameter is set to **huks.HuksKeyDigest.HUKS_DIGEST_NONE**. + +**Adaptation Guide** + +The following uses signing as an example. + +```js +import huks from '@ohos.security.huks'; + +let keyAlias = 'rsa_Key'; +/* Digest value after SHA-256 encryption */ +let inDataAfterSha256 = new Uint8Array( + 0x4B, 0x1E, 0x22, 0x64, 0xA9, 0x89, 0x60, 0x1D, 0xEC, 0x78, 0xC0, 0x5D, 0xBE, 0x46, 0xAD, 0xCF, + 0x1C, 0x35, 0x16, 0x11, 0x34, 0x01, 0x4E, 0x9B, 0x7C, 0x00, 0x66, 0x0E, 0xCA, 0x09, 0xC0, 0xF3, +); +/* Signing parameters */ +let signProperties = new Array(); +signProperties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_RSA, +} +signProperties[1] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_SIGN +} +signProperties[2] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_RSA_KEY_SIZE_2048, +} +signProperties[3] = { + tag: huks.HuksTag.HUKS_TAG_DIGEST, + value: huks.HuksKeyDigest.HUKS_DIGEST_NONE, // Set digest-none. +} +let signOptions = { + properties: signProperties, + inData: inDataAfterSha256 // Set the value after hashing. +} + +huks.initSession(keyAlias, signOptions); +``` + +For for information about the sample code, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). + +## cl.security.22 Support for Key Calculation Parameter Specifications During Key Usage + +Before the change, all parameters for key calculation must be specified when the application generates a key. After the change, only mandatory parameters need to be specified when the application generates a key, and other parameters can be passed in when the key is used. The application can specify key calculation parameters more flexibly. + +**Change Impact** + +Behavior of released JavaScript APIs will be changed. + +The application can specify only mandatory parameters when creating a key and specify other optional parameters when using the key. + +**Key API/Component Changes** + +Released JavaScript APIs remain unchanged, but parameter sets passed to the APIs are changed and parameters are classified into mandatory parameters and optional parameters. For details, see [HUKS Development](../../../application-dev/security/huks-guidelines.md). + +huks.generateKeyItem + +huks.importKeyItem + +huks.importWrappedKeyItem + +huks.initSession + +huks.updateSession + +huks.finishSession + +**Adaptation Guide** + +The following uses the key generation process as an example. + +```js +let keyAlias = 'keyAlias'; +let properties = new Array(); +// Mandatory parameter. +properties[0] = { + tag: huks.HuksTag.HUKS_TAG_ALGORITHM, + value: huks.HuksKeyAlg.HUKS_ALG_RSA +}; +// Mandatory parameter. +properties[1] = { + tag: huks.HuksTag.HUKS_TAG_KEY_SIZE, + value: huks.HuksKeySize.HUKS_RSA_KEY_SIZE_2048 +}; +// Mandatory parameter. +properties[2] = { + tag: huks.HuksTag.HUKS_TAG_PURPOSE, + value: + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_SIGN | + huks.HuksKeyPurpose.HUKS_KEY_PURPOSE_VERIFY +}; +// Optional parameter. If this parameter is not specified when a key is generated, it must be specified when the key is used. +properties[3] = { + tag: huks.HuksTag.HUKS_TAG_DIGEST, + value: huks.HuksKeyDigest.HUKS_DIGEST_SHA256 +}; +let options = { + properties: properties +}; +try { + huks.generateKeyItem(keyAlias, options, function (error, data) { + if (error) { + console.error(`callback: generateKeyItem failed, code: ${error.code}, msg: ${error.message}`); + } else { + console.info(`callback: generateKeyItem key success`); + } + }); +} catch (error) { + console.error(`callback: generateKeyItem input arg invalid, code: ${error.code}, msg: ${error.message}`); +} +``` + +For for information about the sample code, see [HUKS Development](../../../application-dev/security/huks-guidelines.md) and [HUKS](../../../application-dev/reference/apis/js-apis-huks.md). diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..70dc51c8a568783425dba3b5d56791a43274258f --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-system-geolocation.md @@ -0,0 +1,50 @@ +# Location Subsystem Changelog + +## cl.location.1 API Migration from @system.geolocation.d.ts to @ohos.geoLocationManager.d.ts + +APIs in **@system.geolocation.d.ts** do not support throwing error codes. To support this function, all APIs in **@system.geolocation.d.ts** are migrated to the newly added **@ohos.geoLocationManager.d.ts** file, and corresponding error code description is added. + +To use APIs of the location subsystem, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + + +**Change Impact** + +All APIs of the location subsystem are affected. To ensure normal use of these APIs, you need to import **@ohos.geoLocationManager**. + +import geoLocationManager from '@ohos.geoLocationManager'; + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|Geolocation| class | Geolocation | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager**.| +|Geolocation| interface | static getLocation(options?: GetLocationOption): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.getCurrentLocation**.| +|Geolocation| interface | static getLocationType(options?: GetLocationTypeOption): void; | Deprecated.| +|Geolocation| interface | static subscribe(options: SubscribeLocationOption): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.on#event:locationChange**.| +|Geolocation| interface | static unsubscribe(): void; | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.off#event:locationChange**.| +|Geolocation| interface | static getSupportedCoordTypes(): Array; | Deprecated.| +|| interface | GeolocationResponse| Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.Location**.| +|| interface | GetLocationOption | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.CurrentLocationRequest**.| +|| interface | GetLocationTypeResponse | Deprecated.| +|| interface | GetLocationTypeOption | Deprecated.| +|| interface | SubscribeLocationOption | Migrated to **@ohos.geoLocationManager.d.ts** and replaced by **ohos.geoLocationManager/geoLocationManager.LocationRequest**.| + + +**(Optional) Adaptation Guide** + +The following sample code shows how to call **enableLocation** in the new version: + + ```ts + import geoLocationManager from '@ohos.geoLocationManager'; + try { + geoLocationManager.enableLocation((err, data) => { + if (err) { + console.log('enableLocation: err=' + JSON.stringify(err)); + } + }); + } catch (err) { + console.error("errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md new file mode 100644 index 0000000000000000000000000000000000000000..222ae6bf97ebe7c9b9cacea29fba53436c73cb9d --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-telephony.md @@ -0,0 +1,59 @@ +# Telephony Subsystem Changelog + + + +## cl.telephony.1 Radio Module API Change + + +### Changed the `isNrSupported` API in the radio module of the telephony subsystem: + +NR is a proper noun and must be capitalized. + +You need to adapt your application based on the following information. + + + +**Change Impact** + +The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. + + + +**Key API/Component Changes** + +- Involved APIs: + + isNrSupported(): boolean; + isNrSupported(slotId: number): boolean; + +- Before change: + +```js +function isNrSupported(): boolean; +function isNrSupported(slotId: number): boolean; +``` + +- After change: + +```js +function isNRSupported(): boolean; +function isNRSupported(slotId: number): boolean; +``` + + + +**Adaptation Guide** + +Use the new API. The sample code is as follows: + +```js +let result = radio.isNrSupported(); +console.log("Result: "+ result); +``` + + +```js +let slotId = 0; +let result = radio.isNRSupported(slotId); +console.log("Result: "+ result); +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-time.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-time.md new file mode 100644 index 0000000000000000000000000000000000000000..a672b60987e3cafd5cb4bc40b31a0e44a5d0925e --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-time.md @@ -0,0 +1,336 @@ +# Time Subsystem ChangeLog + +## cl.time.1 API Error Change + +Errors thrown by timer APIs of the time subsystem: **202** (non-system application) and **401** (invalid parameters). + +**Change Impacts** + +The API change is forward compatible. Applications developed based on earlier versions can still use the APIs, and corresponding error handling is added. The original functions are not affected. + +**Key API/Component Changes** + +Before change: + - The API throws an error message without an error code. + +After change: + - The API throws an error message with an error code. Error code **202** indicates that the application is not a system application, and error code **401** indicates that the parameters are invalid. + + | Module | Class | Method/Attribute/Enumeration/Constant | Change Type| + | ----------------- | ----------- | ------------------------------------------------------------ | -------- | + | @ohos.systemTimer | systemTimer | function createTimer(options: TimerOptions, callback: AsyncCallback\): void | Changed | + | @ohos.systemTimer | systemTimer | function createTimer(options: TimerOptions): Promise\ | Changed | + | @ohos.systemTimer | systemTimer | function startTimer(timer: number, triggerTime: number, callback: AsyncCallback\): void | Changed | + | @ohos.systemTimer | systemTimer | function startTimer(timer: number, triggerTime: number): Promise\ | Changed | + | @ohos.systemTimer | systemTimer | function stopTimer(timer: number, callback: AsyncCallback\): void | Changed | + | @ohos.systemTimer | systemTimer | function stopTimer(timer: number): Promise\ | Changed | + | @ohos.systemTimer | systemTimer | function destroyTimer(timer: number, callback: AsyncCallback\): void | Changed | + | @ohos.systemTimer | systemTimer | function destroyTimer(timer: number): Promise\ | Changed | + + +**Adaptation Guide** + +Refer to the code below to capture errors when **systemTimer** APIs are called in applications. + +createTimer callback mode: + +**Example** + +```js +export default { + systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat: false + }; + try { + systemTimer.createTimer(options, (error, timerId) => { + if (error) { + // Capture the permission denial error. + console.info(`Failed to create timer. message: ${error.message}, code: ${error.code}`); + } + console.info(`Succeeded in creating timer. timerId: ${timerId}`); + }); + } catch(e) { + // Capture the parameter verification error. + console.info(`Failed to create timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +createTimer promise mode: + +**Example** + +```js +export default { + systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat: false + }; + try { + systemTimer.createTimer(options).then((timerId) => { + console.info(`Succeeded in creating timer. timerId: ${timerId}`); + }).catch((error) => { + // Capture the permission denial error. + console.info(`Failed to create timer. message: ${error.message}, code: ${error.code}`); + }); + } catch(e) { + // Capture the parameter verification error. + console.info(`Failed to create timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +startTimer callback mode: + +**Example** + +```js +export default { + async systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + try { + systemTimer.startTimer(timerId, triggerTime, (error) => { + if (error) { + // Capture the permission denial error. + console.error(`Failed to start timer. message: ${error.message}, code: ${error.code}`); + } + }); + } catch (e) { + // Capture the parameter verification error. + console.info(`Failed to start timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +startTimer promise mode: + +**Example** + +```js +export default { + async systemTimer (){ + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + try { + systemTimer.startTimer(timerId, triggerTime).then((data) => { + console.log(`Succeeded in startting timer. Data:` + data); + }).catch((error) => { + // Capture the permission denial error. + console.info(`Failed to start timer. message: ${error.message}, code: ${error.code}`); + }); + } catch (e) { + // Capture the parameter verification error. + console.info(`Failed to start timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +stopTimer callback mode: + +**Example** + +```js +export default { + async systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + try { + systemTimer.stopTimer(timerId, triggerTime, (error) => { + if (error) { + // Capture the permission denial error. + console.error(`Failed to stop timer. message: ${error.message}, code: ${error.code}`); + } + }); + } catch (e) { + // Capture the parameter verification error. + console.info(`Failed to stop timer. message: ${e.message}, code: ${e.code}`); + } + } +}git +``` + +stopTimer promise mode: + +**Example** + +```js +export default { + async systemTimer (){ + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + try { + systemTimer.stopTimer(timerId, triggerTime).then((data) => { + console.log(`Succeeded in stop timer. Data:` + data); + }).catch((error) => { + // Capture the permission denial error. + console.info(`Failed to stop timer. message: ${error.message}, code: ${error.code}`); + }); + } catch (e) { + // Capture the parameter verification error. + console.info(`Failed to stop timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +destroyTimer callback mode: + +**Example** + +```js +export default { + async systemTimer () { + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + systemTimer.stopTimer(timerId); + try { + systemTimer.destroyTimer(timerId, triggerTime, (error) => { + if (error) { + // Capture the permission denial error. + console.error(`Failed to destroy timer. message: ${error.message}, code: ${error.code}`); + } + }); + } catch (e) { + // Capture the parameter verification error. + console.info(`Failed to destroy timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +destroyTimer promise mode: + +**Example** + +```js +export default { + async systemTimer (){ + let options = { + type: systemTimer.TIMER_TYPE_REALTIME, + repeat:false + } + let timerId = await systemTimer.createTimer(options); + let triggerTime = new Date().getTime(); + triggerTime += 3000; + systemTimer.startTimer(timerId, triggerTime); + systemTimer.stopTimer(timerId); + try { + systemTimer.destroyTimer(timerId, triggerTime).then((data) => { + console.log(`Succeeded in destroy timer. Data:` + data); + }).catch((error) => { + // Capture the permission denial error. + console.info(`Failed to destroy timer. message: ${error.message}, code: ${error.code}`); + }); + } catch (e) { + // Capture the parameter verification error. + console.info(`Failed to destroy timer. message: ${e.message}, code: ${e.code}`); + } + } +} +``` + +## cl.time.2 API Error Change + +Errors thrown by timer APIs of the time subsystem: **201** (permission denied), **202** (non-system application), and **401** (invalid parameters). + +**Change Impacts** + +Applications developed based on earlier versions can still use the APIs. When new APIs are used, errors must be captured and processed. + +**Key API/Component Changes** + +Before change: + - The API throws an error message with error code **-1**. + +After change: + - The API throws an error message with an error code. Error code **201** indicates that the permission is denied, error code **202** indicates that the application is not a system application, and error code **401** indicates that the parameters are invalid. + +Deprecated APIs can be replaced with new ones with same names. + +| Original API | New API | +| ---------------- | -------------------- | +| @ohos.systemTime | @ohos.systemDateTime | + +**Adaptation Guide** + +Refer to the code below to capture errors when **systemTime** APIs are called in applications. In the examples, the **setTime** API is invoked. + +In callback mode: + +**Example** + +```js +import systemDateTime from @ohos.systemDateTime +// Set the system time to 2021-01-20 02:36:25. +let time = 1611081385000; +try { + systemDateTime.setTime(time, (error) => { + // Capture permission denial and non-system-application errors. + if (error) { + console.info(`Failed to setting time. message: ${error.message}, code: ${error.code}`); + return; + } + console.info(`Succeeded in setting time.`); + }) +} catch(e) { + // Capture the parameter verification error. + console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`); +} +``` + +In promise mode: + +**Example** + +```js +import systemDateTime from @ohos.systemDateTime +// Set the system time to 2021-01-20 02:36:25. +let time = 1611081385000; +try { + systemDateTime.setTime(time).then(() => { + console.info(`Succeeded in setting time.`); + }).catch((error) => { + // Capture permission denial and non-system-application errors. + console.info(`Failed to setting time. message: ${error.message}, code: ${error.code}`); + }); +} catch(e) { + // Capture the parameter verification error. + console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`); +} +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-url.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-url.md new file mode 100644 index 0000000000000000000000000000000000000000..4dfc6cacb85bb40bc9f02dab6343a82d4dbf7691 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-url.md @@ -0,0 +1,68 @@ +# Common Library Subsystem Changelog + +## cl.commonlibrary.1 URLParams Class Changes +The constructor function of the **URLParams** class in the URL module of the common library subsystem is changed. + +Specifically, **constructor(init?: string[][] | Record | string | URLSearchParams)** is changed to **constructor(init?: string[][] | Record | string | URLParams)**, and the parameter type is changed from **URLSearchParams** to **URLParams**. + +You need to adapt your application. + +**Change Impacts** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| :------------------------ | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLSearchParams) | Deleted | +| @ohos.url | URLParams | constructor(string[][] \| Record<string, string> \| string \| URLParams)| Changed | + +**Adaptation Guide** + +The following illustrates how to create a **URLParams** object in your application. + +Example: + +```ts +import url from '@ohos.url' +try { + let params1 = new Url.URLParams('?user=abc&query=xyz') + let params2 = new Url.URLParams(params1) + var result= params2.toString() + console.log(result) //"user=abc&query=xyz" +} catch (err) { + console.error(`Fail to ceate URLParams.codeis${err.code},message is ${err.message}`); +} +``` +## cl.commonlibrary.2 URL Attribute Changes of URLParams Class APIs +The URL attributes of the URL module in the common library subsystem are changed. + +Specifically, the **searchParams: URLSearchParams** attribute is deprecated, and the **params: URLParams** attribute is added. + +You need to adapt your application. + + **Change Impacts** + +JS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version. + +**Key API/Component Changes** + +| Module | Class | Method/Attribute/Enum/Constant | Change Type| +| :------------------------ | ------------------- | ------------------------------------------------------------ | -------- | +| @ohos.url | URL | searchParams: URLSearchParams; |Deprecated (in API version 9)
| +| @ohos.url | URL | params: URLParams; | Added | + +**Adaptation Guide** + +The following illustrates how to create a **URLParams** object in your application. + +Example: + +```ts +import url from '@ohos.url' +let that = new Url.URL('http://username:password@host:8080/directory/file?Hello=china#qwer=da') +let params = that.URLParams +var result = params.toString() +console.log(result) //%E4%BD%A0%E5%A5%BD=china +``` diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md new file mode 100644 index 0000000000000000000000000000000000000000..b081b93fe1433c2268715314a2bef6a746b8e18b --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-useriam.md @@ -0,0 +1,17 @@ +# User IAM Subsystem Changelog + +## cl.useriam.1 API9 Result Value Change + +Changed the return value **ResultCodeV9** to **UserAuthResultCode** for API9. + +**Change Impact** + +Applications developed based on earlier versions are not affected. For the applications developed from this version, the class name of the error code needs to be adapted. Otherwise, the service logic is affected. + +**Key API/Component Changes** + +N/A + +**Adaptation Guide** + +Change the class name for invoking the authentication result code from **ResultCode** to **UserAuthResultCode**. diff --git a/en/release-notes/changelogs/v3.2-beta5/changelogs-window.md b/en/release-notes/changelogs/v3.2-beta5/changelogs-window.md new file mode 100644 index 0000000000000000000000000000000000000000..45f62272f6749f6822179648004f04623401a093 --- /dev/null +++ b/en/release-notes/changelogs/v3.2-beta5/changelogs-window.md @@ -0,0 +1,63 @@ +# Window Manager Subsystem Changelog + +## cl.window.1 Change of Window Stage Lifecycle Listener Types + +Changed the enumerated listener types of the window stage lifecycle in version 3.2.10.5 and later. + +**Change Impacts** + +Application lifecycle listeners developed using **FOREGROUND** and **BACKGROUND** in versions earlier than 3.2.10.5 will be invalidated in version 3.2.10.5 and later. + +**Key API/Component Changes** + +## WindowStageEventType9+ + +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)); + }; + } +}; +``` diff --git a/en/third-party-components/third-party-components-introduction.md b/en/third-party-components/third-party-components-introduction.md index d6e3d467b19f093c362e7aec6644c7a3da2c5d10..30e8a3cd3052f703e6059738ea9ba708b57d72ec 100644 --- a/en/third-party-components/third-party-components-introduction.md +++ b/en/third-party-components/third-party-components-introduction.md @@ -1,4 +1,4 @@ -# OpenHarmony Third-Party Components +# Introduction to OpenHarmony Third-Party Components OpenHarmony third-party components are verified software that work with the OpenHarmony system to facilitate your development of OpenHarmony devices or applications. Depending on the programming language they use, these components are classified as third-party JavaScript and TypeScript components or third-party C and C++ components. The third-party JavaScript and TypeScript components use the JavaScript or TypeScript programming language and are usually imported as source code or OpenHarmony HAR files. They are used in application development. The third-party C and C++ components use the C and C++ programming language and are usually imported as source code or OpenHarmony hpm packages. They are used as native APIs during application development or directly compiled in the OpenHarmony OS image during device development. diff --git a/en/website.md b/en/website.md index 331dd6753217fd8b6e02171abd1fa27b3d637387..6fd76f7e1bb045c9c35a78556d50343d5e122f24 100644 --- a/en/website.md +++ b/en/website.md @@ -3,7 +3,11 @@ - [OpenHarmony Project](OpenHarmony-Overview.md) - [Glossary](glossary.md) - Release Notes + - OpenHarmony 4.x Releases + - [OpenHarmony v4.0 Beta1 (2023-06-03)](release-notes/OpenHarmony-v4.0-beta1.md) - OpenHarmony 3.x Releases + - [OpenHarmony v3.2 Release (2023-04-09)](release-notes/OpenHarmony-v3.2-release.md) + - [OpenHarmony v3.2.1 Release (2023-05-22)](release-notes/OpenHarmony-v3.2.1-release.md) - [OpenHarmony v3.2 Beta5 (2023-01-30)](release-notes/OpenHarmony-v3.2-beta5.md) - [OpenHarmony v3.2 Beta4 (2022-11-30)](release-notes/OpenHarmony-v3.2-beta4.md) - [OpenHarmony v3.2 Beta3 (2022-09-30)](release-notes/OpenHarmony-v3.2-beta3.md) @@ -33,154 +37,290 @@ - [OpenHarmony v1.1.1 LTS (2021-06-22)](release-notes/OpenHarmony-1-1-1-LTS.md) - [OpenHarmony v1.1.0 LTS (2021-04-01)](release-notes/OpenHarmony-1-1-0-LTS.md) - API Differences + - OpenHarmony 4.0 Beta1 + - JS API Differences + - [Ability](release-notes/api-diff/v4.0-beta1/js-apidiff-ability.md) + - [Accessibility](release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md) + - [Account](release-notes/api-diff/v4.0-beta1/js-apidiff-account.md) + - [ArkUI](release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md) + - [Power Management](release-notes/api-diff/v4.0-beta1/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/v4.0-beta1/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v4.0-beta1/js-apidiff-communication.md) + - [Compiler and Runtime](release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md) + - [Customization](release-notes/api-diff/v4.0-beta1/js-apidiff-customization.md) + - [Distributed Data Management](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md) + - [Distributed Hardware](release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-hardware.md) + - [File Management](release-notes/api-diff/v4.0-beta1/js-apidiff-file-management.md) + - [Location](release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md) + - [Globalization](release-notes/api-diff/v4.0-beta1/js-apidiff-global.md) + - [Graphics](release-notes/api-diff/v4.0-beta1/js-apidiff-graphic.md) + - [Misc Software](release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md) + - [MSDP](release-notes/api-diff/v4.0-beta1/js-apidiff-msdp.md) + - [Multimodal Input](release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md) + - [Common Event and Notification](release-notes/api-diff/v4.0-beta1/js-apidiff-notification.md) + - [Resource Scheduler](release-notes/api-diff/v4.0-beta1/js-apidiff-resource-scheduler.md) + - [Basic Security Service](release-notes/api-diff/v4.0-beta1/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md) + - [Telephony](release-notes/api-diff/v4.0-beta1/js-apidiff-telephony.md) + - [Test](release-notes/api-diff/v4.0-beta1/js-apidiff-unitest.md) + - [Update](release-notes/api-diff/v4.0-beta1/js-apidiff-update.md) + - [User IAM](release-notes/api-diff/v4.0-beta1/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/v4.0-beta1/js-apidiff-web.md) + - [Window Manager](release-notes/api-diff/v4.0-beta1/js-apidiff-window.md) + - API Changelogs + - [Ability](release-notes/changelogs/v4.0-beta1/changelogs-ability.md) + - [Ability Access Control](release-notes/changelogs/v4.0-beta1/changelogs-accesstoken.md) + - [Account](release-notes/changelogs/v4.0-beta1/changelogs-account_os_account.md) + - [Notification](release-notes/changelogs/v4.0-beta1/changelogs-ans.md) + - [Compiler and Runtime](release-notes/changelogs/v4.0-beta1/changelogs-arkcompiler.md) + - [ArkUI](release-notes/changelogs/v4.0-beta1/changelogs-arkui.md) + - [Bluetooth](release-notes/changelogs/v4.0-beta1/changelogs-bluetooth.md) + - [Bundle Management](release-notes/changelogs/v4.0-beta1/changelogs-bundlemanager.md) + - [Common Event](release-notes/changelogs/v4.0-beta1/changelogs-ces.md) + - [Distributed Data Management](release-notes/changelogs/v4.0-beta1/changelogs-distributeddatamgr.md) + - [File Management](release-notes/changelogs/v4.0-beta1/changelogs-filemanagement.md) + - [Location](release-notes/changelogs/v4.0-beta1/changelogs-geoLocationManager.md) + - [Globalization](release-notes/changelogs/v4.0-beta1/changelogs-global.md) + - [Security - HUKS](release-notes/changelogs/v4.0-beta1/changelogs-huks.md) + - [Input Method Framework](release-notes/changelogs/v4.0-beta1/changelogs-imf.md) + - [Multimedia](release-notes/changelogs/v4.0-beta1/changelogs-media.md) + - [MISC Software](release-notes/changelogs/v4.0-beta1/changelogs-miscdevice.md) + - [Pasteboard](release-notes/changelogs/v4.0-beta1/changelogs-pasteboard.md) + - [Power Management](release-notes/changelogs/v4.0-beta1/changelogs-power.md) + - [Resource Scheduler](release-notes/changelogs/v4.0-beta1/changelogs-resourceschedule.md) + - [Theme Framework - Lock Screen](release-notes/changelogs/v4.0-beta1/changelogs-screenlock.md) + - [Basic Security Service](release-notes/changelogs/v4.0-beta1/changelogs-security.md) + - [Pan-sensor](release-notes/changelogs/v4.0-beta1/changelogs-sensor.md) + - [DSoftBus](release-notes/changelogs/v4.0-beta1/changelogs-softbus.md) + - [Startup Service](release-notes/changelogs/v4.0-beta1/changelogs-startup.md) + - [Telephony](release-notes/changelogs/v4.0-beta1/changelogs-telephony.md) + - [Test](release-notes/changelogs/v4.0-beta1/changelogs-testfwk_arkxtest.md) + - [USB](release-notes/changelogs/v4.0-beta1/changelogs-usb.md) + - [Theme Framework - Wallpaper](release-notes/changelogs/v4.0-beta1/changelogs-wallpaper.md) + - [Web](release-notes/changelogs/v4.0-beta1/changelogs-web.md) + - [WIFI](release-notes/changelogs/v4.0-beta1/changelogs-wifiManager.md) + - OpenHarmony 3.2 Release (Compared with OpenHarmony 3.1 Release) + - JS API Differences + - [Ability](release-notes/api-diff/v3.2-Release/js-apidiff-ability.md) + - [Accessibility](release-notes/api-diff/v3.2-Release/js-apidiff-accessibility.md) + - [Account](release-notes/api-diff/v3.2-Release/js-apidiff-account.md) + - [Application](release-notes/api-diff/v3.2-Release/js-apidiff-application.md) + - [ArkUI](release-notes/api-diff/v3.2-Release/js-apidiff-arkui.md) + - [Power Management](release-notes/api-diff/v3.2-Release/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/v3.2-Release/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v3.2-Release/js-apidiff-communication.md) + - [Compiler and Runtime](release-notes/api-diff/v3.2-Release/js-apidiff-compiler-and-runtime.md) + - [Customization](release-notes/api-diff/v3.2-Release/js-apidiff-customization.md) + - [DFX](release-notes/api-diff/v3.2-Release/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/v3.2-Release/js-apidiff-distributed-data.md) + - [Distributed Hardware](release-notes/api-diff/v3.2-Release/js-apidiff-distributed-hardware.md) + - [File Management](release-notes/api-diff/v3.2-Release/js-apidiff-file-management.md) + - [Location](release-notes/api-diff/v3.2-Release/js-apidiff-geolocation.md) + - [Globalization](release-notes/api-diff/v3.2-Release/js-apidiff-global.md) + - [Graphics](release-notes/api-diff/v3.2-Release/js-apidiff-graphic.md) + - [Misc Software](release-notes/api-diff/v3.2-Release/js-apidiff-misc.md) + - [MSDP](release-notes/api-diff/v3.2-Release/js-apidiff-msdp.md) + - [Multimodal Input](release-notes/api-diff/v3.2-Release/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v3.2-Release/js-apidiff-multimedia.md) + - [Common Event and Notification](release-notes/api-diff/v3.2-Release/js-apidiff-notification.md) + - [Resource Scheduler](release-notes/api-diff/v3.2-Release/js-apidiff-resource-scheduler.md) + - [Security](release-notes/api-diff/v3.2-Release/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/v3.2-Release/js-apidiff-sensor.md) + - [Startup](release-notes/api-diff/v3.2-Release/js-apidiff-start-up.md) + - [Telephony ](release-notes/api-diff/v3.2-Release/js-apidiff-telephony.md) + - [Test](release-notes/api-diff/v3.2-Release/js-apidiff-unitest.md) + - [Update](release-notes/api-diff/v3.2-Release/js-apidiff-update.md) + - [USB](release-notes/api-diff/v3.2-Release/js-apidiff-usb.md) + - [User IAM](release-notes/api-diff/v3.2-Release/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/v3.2-Release/js-apidiff-web.md) + - [Window Manager](release-notes/api-diff/v3.2-Release/js-apidiff-window.md) + - OpenHarmony 3.2 Release (Compared with OpenHarmony 3.2 Beta 5) + - JS API Differences + - [Ability](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-ability.md) + - [Account](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-account.md) + - [Application](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-application.md) + - [ArkUI](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-arkui.md) + - [Power Management](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-communication.md) + - [Compiler and Runtime](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-compiler-and-runtime.md) + - [DFX](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-distributed-data.md) + - [File Management](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-file-management.md) + - [Misc Software](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-misc.md) + - [Multimedia](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-multimedia.md) + - [Common Event and Notification](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-notification.md) + - [Resource Scheduler](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-resource-scheduler.md) + - [Security](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-sensor.md) + - [Startup](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-start-up.md) + - [Telephony](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-telephony.md) + - [Test](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-unitest.md) + - [Upgrade](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-update.md) + - [USB](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-usb.md) + - [User IAM](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-web.md) + - [Window](release-notes/api-diff/Beta5-to-v3.2-Release/js-apidiff-window.md) + - Changelogs + - [Ability](release-notes/changelogs/v3.2-release/changelogs-ability.md) + - [ArkUI](release-notes/changelogs/v3.2-release/changelogs-arkui.md) + - [Bundle Management](release-notes/changelogs/v3.2-release/changelogs-bundlemanager.md) + - [Input Method Framework](release-notes/changelogs/v3.2-release/changelogs-imf.md) + - [Resource Scheduler](release-notes/changelogs/v3.2-release/changelogs-resourceschedule.md) + - [Theme Framework - Lock Screen](release-notes/changelogs/v3.2-release/changelogs-screenlock.md) + - [Telephony](release-notes/changelogs/v3.2-release/changelogs-telephony.md) + - [util](release-notes/changelogs/v3.2-release/changelogs-util.md) + - [Theme Framework - Wallpaper](release-notes/changelogs/v3.2-release/changelogs-wallpaper.md) + - [Web](release-notes/changelogs/v3.2-release/changelogs-web.md) - OpenHarmony 3.2 Beta4 - JS API Differences - - [Ability framework](release-notes/api-diff/v3.2-beta4/js-apidiff-ability.md) - - [Accessibility subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-accessibility.md) - - [Account subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-account.md) - - [Application subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-application.md) - - [ArkUI development framework](release-notes/api-diff/v3.2-beta4/js-apidiff-arkui.md) - - [Power management subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-battery.md) - - [Bundle management framework](release-notes/api-diff/v3.2-beta4/js-apidiff-bundle.md) - - [Communication subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-communication.md) - - [Compiler and runtime subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-compiler-and-runtime.md) - - [Communication subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-customization.md) - - [DFX subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-dfx.md) - - [Distributed data management subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-distributed-data.md) - - [Distributed hardware subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-distributed-hardware.md) - - [File management subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-file-management.md) - - [Location subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-geolocation.md) - - [Globalization subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-global.md) - - [Misc services subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-misc.md) - - [MSDP subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-msdp.md) - - [Multimodal input subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-multi-modal-input.md) - - [Multimedia subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-multimedia.md) - - [Common event and notification subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-notification.md) - - [Resource scheduler subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-resource-scheduler.md) - - [Security subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-security.md) - - [Pan-sensor subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-sensor.md) - - [Startup subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-start-up.md) - - [Telephony subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-telephony.md) - - [Test subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-unitest.md) - - [Update subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-update.md) - - [USB subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-usb.md) - - [User IAM subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-user-iam.md) - - [Web subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-web.md) - - [Window manager subsystem](release-notes/api-diff/v3.2-beta4/js-apidiff-window.md) + - [Ability](release-notes/api-diff/v3.2-beta4/js-apidiff-ability.md) + - [Accessibility](release-notes/api-diff/v3.2-beta4/js-apidiff-accessibility.md) + - [Account](release-notes/api-diff/v3.2-beta4/js-apidiff-account.md) + - [Application](release-notes/api-diff/v3.2-beta4/js-apidiff-application.md) + - [ArkUI](release-notes/api-diff/v3.2-beta4/js-apidiff-arkui.md) + - [Power Management](release-notes/api-diff/v3.2-beta4/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/v3.2-beta4/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v3.2-beta4/js-apidiff-communication.md) + - [Compiler and Runtime](release-notes/api-diff/v3.2-beta4/js-apidiff-compiler-and-runtime.md) + - [Customization](release-notes/api-diff/v3.2-beta4/js-apidiff-customization.md) + - [DFX](release-notes/api-diff/v3.2-beta4/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/v3.2-beta4/js-apidiff-distributed-data.md) + - [Distributed Hardware](release-notes/api-diff/v3.2-beta4/js-apidiff-distributed-hardware.md) + - [File Management](release-notes/api-diff/v3.2-beta4/js-apidiff-file-management.md) + - [Location](release-notes/api-diff/v3.2-beta4/js-apidiff-geolocation.md) + - [Globalization](release-notes/api-diff/v3.2-beta4/js-apidiff-global.md) + - [Misc Software](release-notes/api-diff/v3.2-beta4/js-apidiff-misc.md) + - [MSDP](release-notes/api-diff/v3.2-beta4/js-apidiff-msdp.md) + - [Multimodal Input](release-notes/api-diff/v3.2-beta4/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v3.2-beta4/js-apidiff-multimedia.md) + - [Common Event and Notification](release-notes/api-diff/v3.2-beta4/js-apidiff-notification.md) + - [Resource Scheduler](release-notes/api-diff/v3.2-beta4/js-apidiff-resource-scheduler.md) + - [Security](release-notes/api-diff/v3.2-beta4/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/v3.2-beta4/js-apidiff-sensor.md) + - [Startup](release-notes/api-diff/v3.2-beta4/js-apidiff-start-up.md) + - [Telephony](release-notes/api-diff/v3.2-beta4/js-apidiff-telephony.md) + - [Test](release-notes/api-diff/v3.2-beta4/js-apidiff-unitest.md) + - [Update](release-notes/api-diff/v3.2-beta4/js-apidiff-update.md) + - [USB](release-notes/api-diff/v3.2-beta4/js-apidiff-usb.md) + - [User IAM](release-notes/api-diff/v3.2-beta4/js-apidiff-user-iam.md) + - [Web](release-notes/api-diff/v3.2-beta4/js-apidiff-web.md) + - [Window Manager](release-notes/api-diff/v3.2-beta4/js-apidiff-window.md) - OpenHarmony 3.2 Beta3 - JS API Differences - - [Ability framework](release-notes/api-diff/v3.2-beta3/js-apidiff-ability.md) - - [Accessibility subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-accessibility.md) - - [Account subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-account.md) - - [ArkUI development framework](release-notes/api-diff/v3.2-beta3/js-apidiff-arkui.md) - - [Power management subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-battery.md) - - [Bundle management framework](release-notes/api-diff/v3.2-beta3/js-apidiff-bundle.md) - - [Communication subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-communicate.md) - - [Compiler and runtime subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-compiler-and-runtime.md) - - [DFX subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-dfx.md) - - [Distributed data management subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-distributed-data.md) - - [Distributed hardware subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-distributed-hardware.md) - - [Common event and notification subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-event-and-notification.md) - - [File management subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-file-management.md) - - [Globalization subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-global.md) - - [Graphics subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-graphic.md) - - [Misc services subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-misc.md) - - [Multimodal input subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-multi-modal-input.md) - - [Multimedia subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-multimedia.md) - - [Resource scheduler subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-resource-scheduler.md) - - [Security subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-security.md) - - [Pan-sensor subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-sensor.md) - - [DSoftBus subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-soft-bus.md) - - [Telephony subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-telephony.md) - - [Test subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-unitest.md) - - [Update subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-update.md) - - [Web subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-web.md) - - [Window manager subsystem](release-notes/api-diff/v3.2-beta3/js-apidiff-window.md) + - [Ability](release-notes/api-diff/v3.2-beta3/js-apidiff-ability.md) + - [Accessibility](release-notes/api-diff/v3.2-beta3/js-apidiff-accessibility.md) + - [Account](release-notes/api-diff/v3.2-beta3/js-apidiff-account.md) + - [ArkUI](release-notes/api-diff/v3.2-beta3/js-apidiff-arkui.md) + - [Power Management](release-notes/api-diff/v3.2-beta3/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/v3.2-beta3/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v3.2-beta3/js-apidiff-communicate.md) + - [Compiler and Runtime](release-notes/api-diff/v3.2-beta3/js-apidiff-compiler-and-runtime.md) + - [DFX](release-notes/api-diff/v3.2-beta3/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/v3.2-beta3/js-apidiff-distributed-data.md) + - [Distributed Hardware](release-notes/api-diff/v3.2-beta3/js-apidiff-distributed-hardware.md) + - [Common Event and Notification](release-notes/api-diff/v3.2-beta3/js-apidiff-event-and-notification.md) + - [File Management](release-notes/api-diff/v3.2-beta3/js-apidiff-file-management.md) + - [Globalization](release-notes/api-diff/v3.2-beta3/js-apidiff-global.md) + - [Graphics](release-notes/api-diff/v3.2-beta3/js-apidiff-graphic.md) + - [Misc Software](release-notes/api-diff/v3.2-beta3/js-apidiff-misc.md) + - [Multimodal Input](release-notes/api-diff/v3.2-beta3/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v3.2-beta3/js-apidiff-multimedia.md) + - [Resource Scheduler](release-notes/api-diff/v3.2-beta3/js-apidiff-resource-scheduler.md) + - [Security](release-notes/api-diff/v3.2-beta3/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/v3.2-beta3/js-apidiff-sensor.md) + - [DSoftBus](release-notes/api-diff/v3.2-beta3/js-apidiff-soft-bus.md) + - [Telephony](release-notes/api-diff/v3.2-beta3/js-apidiff-telephony.md) + - [Test](release-notes/api-diff/v3.2-beta3/js-apidiff-unitest.md) + - [Update](release-notes/api-diff/v3.2-beta3/js-apidiff-update.md) + - [Web](release-notes/api-diff/v3.2-beta3/js-apidiff-web.md) + - [Window Manager](release-notes/api-diff/v3.2-beta3/js-apidiff-window.md) - [Updates (OpenHarmony 3.2 Beta2 -> OpenHarmony 3.2 Beta3)](release-notes/changelogs/v3.2-beta3/changelog-v3.2-beta3.md) - OpenHarmony 3.2 Beta2 - JS API Differences - - [Ability framework](release-notes/api-diff/v3.2-beta2/js-apidiff-ability.md) - - [Accessibility subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-accessibility.md) - - [Account subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-account.md) - - [ArkUI development framework](release-notes/api-diff/v3.2-beta2/js-apidiff-arkui.md) - - [Bundle management framework](release-notes/api-diff/v3.2-beta2/js-apidiff-bundle.md) - - [Communication subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-communicate.md) - - [Compiler and runtime subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-compiler-and-runtime.md) - - [DFX subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-dfx.md) - - [Distributed data management subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-distributed-data.md) - - [Common event and notification subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-event-and-notification.md) - - [File management subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-file-management.md) - - [Location subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-geolocation.md) - - [Globalization subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-global.md) - - [Graphics subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-graphic.md) - - [Misc services subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-misc.md) - - [Multimodal input subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-multi-modal-input.md) - - [Multimedia subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-multimedia.md) - - [Resource scheduler subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-resource-scheduler.md) - - [Security subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-security.md) - - [Pan-sensor subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-sensor.md) - - [DSoftBus subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-soft-bus.md) - - [Test subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-unitest.md) - - [Update subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-update.md) - - [USB subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-usb.md) - - [User IAM subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-user-authentication.md) - - [Web subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-web.md) - - [Window manager subsystem](release-notes/api-diff/v3.2-beta2/js-apidiff-window.md) - - ChangeLog + - [Ability](release-notes/api-diff/v3.2-beta2/js-apidiff-ability.md) + - [Accessibility](release-notes/api-diff/v3.2-beta2/js-apidiff-accessibility.md) + - [Account](release-notes/api-diff/v3.2-beta2/js-apidiff-account.md) + - [ArkUI](release-notes/api-diff/v3.2-beta2/js-apidiff-arkui.md) + - [Bundle Management](release-notes/api-diff/v3.2-beta2/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v3.2-beta2/js-apidiff-communicate.md) + - [Compiler and Runtime](release-notes/api-diff/v3.2-beta2/js-apidiff-compiler-and-runtime.md) + - [DFX](release-notes/api-diff/v3.2-beta2/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/v3.2-beta2/js-apidiff-distributed-data.md) + - [Common Event and Notification](release-notes/api-diff/v3.2-beta2/js-apidiff-event-and-notification.md) + - [File Management](release-notes/api-diff/v3.2-beta2/js-apidiff-file-management.md) + - [Location](release-notes/api-diff/v3.2-beta2/js-apidiff-geolocation.md) + - [Globalization](release-notes/api-diff/v3.2-beta2/js-apidiff-global.md) + - [Graphics](release-notes/api-diff/v3.2-beta2/js-apidiff-graphic.md) + - [Misc](release-notes/api-diff/v3.2-beta2/js-apidiff-misc.md) + - [Multimodal Input](release-notes/api-diff/v3.2-beta2/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v3.2-beta2/js-apidiff-multimedia.md) + - [Resource Scheduler](release-notes/api-diff/v3.2-beta2/js-apidiff-resource-scheduler.md) + - [Security](release-notes/api-diff/v3.2-beta2/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/v3.2-beta2/js-apidiff-sensor.md) + - [DSoftBus](release-notes/api-diff/v3.2-beta2/js-apidiff-soft-bus.md) + - [Test](release-notes/api-diff/v3.2-beta2/js-apidiff-unitest.md) + - [Update](release-notes/api-diff/v3.2-beta2/js-apidiff-update.md) + - [USB](release-notes/api-diff/v3.2-beta2/js-apidiff-usb.md) + - [User IAM](release-notes/api-diff/v3.2-beta2/js-apidiff-user-authentication.md) + - [Web](release-notes/api-diff/v3.2-beta2/js-apidiff-web.md) + - [Window Manager](release-notes/api-diff/v3.2-beta2/js-apidiff-window.md) + - Changelogs - [Updates (OpenHarmony 3.2 Beta1 -> OpenHarmony 3.2 Beta2)](release-notes/changelogs/v3.2-beta2/changelog-v3.2-beta2.md) - [Adaptation Guide for the Application Sandbox](release-notes/changelogs/v3.2-beta2/application-sandbox-adaptation-guide.md) - OpenHarmony 3.2 Beta1 - JS API Differences - - [Ability framework](release-notes/api-diff/v3.2-beta1/js-apidiff-ability.md) - - [ArkUI development framework](release-notes/api-diff/v3.2-beta1/js-apidiff-arkui.md) - - [Power management subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-battery.md) - - [Bundle management framework](release-notes/api-diff/v3.2-beta1/js-apidiff-bundle.md) - - [Communication subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-communicate.md) - - [DFX subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-dfx.md) - - [Distributed data management subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-distributed-data.md) - - [Common event and notification subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-event-and-notification.md) - - [File management subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-file-management.md) - - [Globalization subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-global.md) - - [Startup subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-init.md) - - [Misc services subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-misc.md) - - [Multimodal input subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-multi-modal-input.md) - - [Multimedia subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-multimedia.md) - - [Distributed scheduler subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-resource-scheduler.md) - - [Test subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-unitest.md) - - [Web subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-web.md) - - [Window manager subsystem](release-notes/api-diff/v3.2-beta1/js-apidiff-window.md) + - [Ability](release-notes/api-diff/v3.2-beta1/js-apidiff-ability.md) + - [ArkUI](release-notes/api-diff/v3.2-beta1/js-apidiff-arkui.md) + - [Power Management](release-notes/api-diff/v3.2-beta1/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/v3.2-beta1/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v3.2-beta1/js-apidiff-communicate.md) + - [DFX](release-notes/api-diff/v3.2-beta1/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/v3.2-beta1/js-apidiff-distributed-data.md) + - [Common Event and Notification](release-notes/api-diff/v3.2-beta1/js-apidiff-event-and-notification.md) + - [File Management](release-notes/api-diff/v3.2-beta1/js-apidiff-file-management.md) + - [Globalization](release-notes/api-diff/v3.2-beta1/js-apidiff-global.md) + - [Startup](release-notes/api-diff/v3.2-beta1/js-apidiff-init.md) + - [Misc](release-notes/api-diff/v3.2-beta1/js-apidiff-misc.md) + - [Multimodal Input](release-notes/api-diff/v3.2-beta1/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v3.2-beta1/js-apidiff-multimedia.md) + - [Resource Scheduler](release-notes/api-diff/v3.2-beta1/js-apidiff-resource-scheduler.md) + - [Test](release-notes/api-diff/v3.2-beta1/js-apidiff-unitest.md) + - [Web](release-notes/api-diff/v3.2-beta1/js-apidiff-web.md) + - [Window Manager](release-notes/api-diff/v3.2-beta1/js-apidiff-window.md) - [Native API Differences](release-notes/api-diff/v3.2-beta1/native-apidiff-v3.2-beta.md) - OpenHarmony 3.1 Release - JS API Differences (API Version 8) - - [Ability framework](release-notes/api-diff/v3.1-Release/js-apidiff-ability.md) - - [Accessibility subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-accessibility.md) - - [Account subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-account.md) - - [ArkUI development framework](release-notes/api-diff/v3.1-Release/js-apidiff-ace.md) - - [Power management subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-battery.md) - - [Bundle management subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-bundle.md) - - [Communication subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-communicate.md) - - [Compiler and runtime subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-compiler-and-runtime.md) - - [DFX subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-dfx.md) - - [Distributed data management subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-distributed-data.md) - - [Distributed hardware subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-distributed-hardware.md) - - [Common event and notification subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-event-and-notification.md) - - [File management subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-file-management.md) - - [Location subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-geolocation.md) - - [Globalization subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-global.md) - - [Graphics subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-graphic.md) - - [Misc services subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-misc.md) - - [Multimodal input subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-multi-modal-input.md) - - [Multimedia subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-multimedia.md) - - [Network management subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-network.md) - - [Distributed scheduler subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-resource-scheduler.md) - - [Security subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-security.md) - - [Pan-sensor subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-sensor.md) - - [Application framework subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-settings.md) - - [DSoftBus subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-soft-bus.md) - - [Telephony subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-telephony.md) - - [USB subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-usb.md) - - [User IAM subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-user-authentication.md) - - [Window manager subsystem](release-notes/api-diff/v3.1-Release/js-apidiff-window.md) + - [Ability](release-notes/api-diff/v3.1-Release/js-apidiff-ability.md) + - [Accessibility](release-notes/api-diff/v3.1-Release/js-apidiff-accessibility.md) + - [Account](release-notes/api-diff/v3.1-Release/js-apidiff-account.md) + - [ArkUI](release-notes/api-diff/v3.1-Release/js-apidiff-ace.md) + - [Power Management](release-notes/api-diff/v3.1-Release/js-apidiff-battery.md) + - [Bundle Management](release-notes/api-diff/v3.1-Release/js-apidiff-bundle.md) + - [Communication](release-notes/api-diff/v3.1-Release/js-apidiff-communicate.md) + - [Compiler and Runtime](release-notes/api-diff/v3.1-Release/js-apidiff-compiler-and-runtime.md) + - [DFX](release-notes/api-diff/v3.1-Release/js-apidiff-dfx.md) + - [Distributed Data Management](release-notes/api-diff/v3.1-Release/js-apidiff-distributed-data.md) + - [Distributed Hardware](release-notes/api-diff/v3.1-Release/js-apidiff-distributed-hardware.md) + - [Common Event and Notification](release-notes/api-diff/v3.1-Release/js-apidiff-event-and-notification.md) + - [File Management](release-notes/api-diff/v3.1-Release/js-apidiff-file-management.md) + - [Location](release-notes/api-diff/v3.1-Release/js-apidiff-geolocation.md) + - [Globalization](release-notes/api-diff/v3.1-Release/js-apidiff-global.md) + - [Graphics](release-notes/api-diff/v3.1-Release/js-apidiff-graphic.md) + - [Misc Software](release-notes/api-diff/v3.1-Release/js-apidiff-misc.md) + - [Multimodal Input](release-notes/api-diff/v3.1-Release/js-apidiff-multi-modal-input.md) + - [Multimedia](release-notes/api-diff/v3.1-Release/js-apidiff-multimedia.md) + - [Network Management](release-notes/api-diff/v3.1-Release/js-apidiff-network.md) + - [Resource Scheduler](release-notes/api-diff/v3.1-Release/js-apidiff-resource-scheduler.md) + - [Basic Security Service](release-notes/api-diff/v3.1-Release/js-apidiff-security.md) + - [Pan-sensor](release-notes/api-diff/v3.1-Release/js-apidiff-sensor.md) + - [Application](release-notes/api-diff/v3.1-Release/js-apidiff-settings.md) + - [DSoftBus](release-notes/api-diff/v3.1-Release/js-apidiff-soft-bus.md) + - [Telephony](release-notes/api-diff/v3.1-Release/js-apidiff-telephony.md) + - [USB](release-notes/api-diff/v3.1-Release/js-apidiff-usb.md) + - [User IAM](release-notes/api-diff/v3.1-Release/js-apidiff-user-authentication.md) + - [Window Manager](release-notes/api-diff/v3.1-Release/js-apidiff-window.md) - [Native API Differences](release-notes/api-diff/v3.1-Release/native-apidiff-v3.1-release.md) - [Updates (OpenHarmony 3.1 Beta -> OpenHarmony 3.1 Release)](release-notes/changelogs/v3.1-Release/changelog-v3.1-release.md) - OpenHarmony 3.1 Beta @@ -188,13 +328,13 @@ - [Native API Differences](release-notes/api-diff/v3.1-beta/native-apidiff-v3.1-beta.md) - [Updates (OpenHarmony 3.0 -> OpenHarmony 3.1 Beta)](release-notes/api-diff/v3.1-beta/changelog-v3.1-beta.md) - OpenHarmony 3.0 LTS - - [JS API Differences](release-notes/api-diff/v3.0-LTS/js-apidiff-v3.0-lts.md) + - [JS API Differences](release-notes/api-diff/v3.0-LTS/js-apidiff-v3.0-lts.md) - OpenHarmony v2.2 Beta2 - [JS API Differences](release-notes/api-diff/v2.2-beta2/js-apidiff-v2.2-beta2.md) - [Native API Differences](release-notes/api-diff/v2.2-beta2/native-apidiff-v2.2-beta2.md) - OpenHarmony Third-Party Components - - [OpenHarmony Third-Party Components](third-party-components/third-party-components-introduction.md) + - [Introduction to OpenHarmony Third-Party Components](third-party-components/third-party-components-introduction.md) - [Using OpenHarmony JS and TS Third-Party Components](third-party-components/ohpm-third-party-guide.md) - Contribution @@ -206,4 +346,6 @@ - [Documentation Contribution](contribute/documentation-contribution.md) - [Writing Instructions](contribute/writing-instructions.md) - [Communication in Community](contribute/communication-in-community.md) - - [FAQs](contribute/FAQ.md) \ No newline at end of file + - [FAQs](contribute/FAQ.md) + + \ No newline at end of file