diff --git a/en/release-notes/Readme.md b/en/release-notes/Readme.md index 6a8faf8d225ed7f2878bb6fd736a2063c6eb5770..d427ae57aa383f9da13a89072136d265bad8ef52 100644 --- a/en/release-notes/Readme.md +++ b/en/release-notes/Readme.md @@ -1,6 +1,7 @@ # OpenHarmony Release Notes ## OpenHarmony 3.x Releases -[OpenHarmony v3.0 LTS (2021-09-30)](OpenHarmony-v3.0-LTS.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 2.x Releases - [OpenHarmony v2.2 beta2 (2021-08-04)](OpenHarmony-v2.2-beta2.md) diff --git a/en/release-notes/api-change/v3.1-beta/changelog-v3.1-beta.md b/en/release-notes/api-change/v3.1-beta/changelog-v3.1-beta.md new file mode 100644 index 0000000000000000000000000000000000000000..3fb8d84259bfe15fde0363c771c586a484a72e95 --- /dev/null +++ b/en/release-notes/api-change/v3.1-beta/changelog-v3.1-beta.md @@ -0,0 +1,42 @@ +# Changelog +##### Key API/Component Changes +## IPC Subsystem +#### cl.rpc.1 sendRequest Return Value Type Change + +##### Change Impact + +The **sendRequest** method in the JS modules **RemoteProxy** and **RemoteObject** is changed to an asynchronous interface. The new version uses a **Promise** object to return a **SendRequestResult** instance. Existing applications need to be adapted. + +##### Key API/Component Changes + +``` +Module: ohos.rpc.IRemoteObject, ohos.rpc.RemoteProxy and ohos.rpc.RemoteObject +Old method: sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): boolean + +New method: +sendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise +``` + +**Adaptation Guidelines** + +``` +import rpc from "@ohos.rpc" + +let option = new rpc.MessageOption() +let data = rpc.MessageParcel.create() +let reply = rpc.MessageParcel.create() +proxy.sendRequest(1, data, reply, option) + .then(function(result) { + console.info("send request done") + if (result.errCode === 0) { + // read result from result.reply + } + }) + .catch(function(e) { + console.error("send request failed: " + e) + }) + .finally(() => { + data.reclaim() + reply.reclaim() + }) +``` diff --git a/en/release-notes/api-change/v3.1-beta/js-apidiff-v3.1-beta.md b/en/release-notes/api-change/v3.1-beta/js-apidiff-v3.1-beta.md new file mode 100644 index 0000000000000000000000000000000000000000..6c35b8f2444037cbff85579e3863982163774e45 --- /dev/null +++ b/en/release-notes/api-change/v3.1-beta/js-apidiff-v3.1-beta.md @@ -0,0 +1,427 @@ +# JS API Differences + +This document describes the changes of APIs in OpenHarmony 3.1 Beta when compared with OpenHarmony 3.0 LTS. + +## Standard System API Changes + +| Module| API| Change Type| Change Description| +| -------- | -------- | -------- | -------- | +| System Application - settings| getUri(name: string): string | Added| Added the API for obtaining the URI of a string.| +| System Application - settings| getValue(dataAbilityHelper: DataAbilityHelper, name: string, defValue: string): string | Added| Added the API for obtaining the value of a string in the database.| +| System Application - settings| setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: string): boolean | Added| Added the API for saving a string name and its value in the database.| +| Misc Services - systemTime| getCurrentTime(callback: AsyncCallback): void | Added| Added the API for obtaining the number of milliseconds elapsed since the Unix epoch.| +| Misc Services - systemTime| getCurrentTime(): Promise | Added| Added the API for obtaining the number of milliseconds elapsed since the Unix epoch.| +| Misc Services - systemTime| getCurrentTimeNs(callback: AsyncCallback): void | Added| Added the API for obtaining the number of nanoseconds elapsed since the Unix epoch.| +| Misc Services - systemTime| getCurrentTimeNs(): Promise | Added| Added the API for obtaining the number of nanoseconds elapsed since the Unix epoch.| +| Misc Services - systemTime| getRealActiveTime(callback: AsyncCallback): void | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.| +| Misc Services - systemTime| getRealActiveTime(): Promise | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.| +| Misc Services - systemTime| getRealActiveTimeNs(callback: AsyncCallback): void | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.| +| Misc Services - systemTime| getRealActiveTimeNs(): Promise | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.| +| Misc Services - systemTime| getRealTime(callback: AsyncCallback): void | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time.| +| Misc Services - systemTime| getRealTime(): Promise | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time.| +| Misc Services - systemTime| getRealTimeNs(callback: AsyncCallback): void | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time.| +| Misc Services - systemTime| getRealTimeNs(): Promise | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time.| +| Misc Services - systemTime| getDate(callback: AsyncCallback): void | Added| Added the API for obtaining the system date.| +| Misc Services - systemTime| getDate(): Promise | Added| Added the API for obtaining the system date.| +| Misc Services - systemTime| getTimeZone(callback: AsyncCallback): void | Added| Added the API for obtaining the system time zone.| +| Misc Services - systemTime| getTimeZone(): Promise | Added| Added the API for obtaining the system time zone.| +| ArkUI Framework - Universal Events| onAreaChange (Component Area Change Event)| Added| Added the API for subscribing to component area (including the size and position) changes.| +| ArkUI Framework - Universal Attributes| responseRegion| Added| Added the attribute for touch hotspot settings.| +| ArkUI Framework - Universal Attributes| touchable| Added| Added the attribute that specifies whether a component is touchable.| +| ArkUI Framework - Universal Attributes| stateStyle| Added| Added the attribute that specifies the styles of the pressed and disabled states of a component.| +| ArkUI Framework - Basic Gestures| SwipeGesture | Added| Added the SwipeGesture module.| +| ArkUI Framework - Basic Components| Marquee | Added| Added the **\** component.| +| ArkUI Framework - Basic Components| PluginComponent | Added| Added the **\** component.| +| ArkUI Framework - Basic Components| TextArea | Added| Added the **\