From 7451f2e21c897d874456ed50cb0ee620e266b190 Mon Sep 17 00:00:00 2001 From: dingxiaochen Date: Tue, 31 Jan 2023 14:07:32 +0800 Subject: [PATCH] add changelog. Signed-off-by: dingxiaochen --- .../changelogs-telephony.md | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.5/changelogs-telephony.md diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.5/changelogs-telephony.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.5/changelogs-telephony.md new file mode 100644 index 0000000000..7a4791a623 --- /dev/null +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.2.5/changelogs-telephony.md @@ -0,0 +1,134 @@ +# 电话子系统ChangeLog + + + +## cl.telephony.1 radio模块接口变更 + + +### 电话子系统radio模块 `isNrSupported` 接口存在变更: + +NR是专有名词,需要全部大写。 + +开发者需要根据以下说明对应用进行适配。 + + + +**变更影响** + +基于此前版本开发的应用,需适配变更的js接口,变更前的接口已经不能正常使用了,否则会影响原有功能。 + + + +**关键的接口/组件变更** + +- 涉及接口 + + isNrSupported(): boolean; + isNrSupported(slotId: number): boolean; + +- 变更前: + +```js +function isNrSupported(): boolean; +function isNrSupported(slotId: number): boolean; +``` + +- 变更后: + +```js +function isNRSupported(): boolean; +function isNRSupported(slotId: number): boolean; +``` + + + +**适配指导** + +使用变更后的接口,示例代码如下: + +```js +let result = radio.isNrSupported(); +console.log("Result: "+ result); +``` + + +```js +let slotId = 0; +let result = radio.isNRSupported(slotId); +console.log("Result: "+ result); +``` + + +## cl.telephony.2 call模块接口变更 + +### 电话子系统radio模块 `dial` 接口存在变更: + +从API9开始,废弃此接口,改为使用dialCall接口。 + +开发者需要根据以下说明对应用进行适配。 + + +**变更影响** + +该接口删除无法再使用,请使用新增的接口dialCall替换,否则会影响原有功能。 + + +**关键的接口/组件变更** + +- 涉及接口 + + dial(phoneNumber: string, callback: AsyncCallback): void; + dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback): void; + dial(phoneNumber: string, options?: DialOptions): Promise; + +- 变更前: + +```js +function dial(phoneNumber: string, callback: AsyncCallback): void; +function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback): void; +function dial(phoneNumber: string, options?: DialOptions): Promise; +``` + +- 变更后: + +```js +function dialCall(phoneNumber: string, callback: AsyncCallback): void; +function dialCall(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback): void; +function dialCall(phoneNumber: string, options?: DialCallOptions): Promise; +``` + + + +**适配指导** + +该接口删除无法再使用,请使用新增的接口dialCall替换。 +使用变更后的接口,示例代码如下: + +```js +call.dialCall("138xxxxxxxx", (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +call.dialCall("138xxxxxxxx", { + accountId: 0, + videoState: 0, + dialScene: 0, + dialType: 0, +}, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +```js +try { + call.dialCall('138xxxxxxxx'); + console.log(`dialCall success, promise: data->${JSON.stringify(data)}`); +} catch (error) { + console.log(`dialCall fail, promise: err->${JSON.stringify(error)}`); +} +``` + -- GitLab