diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.7.2/changelogs-telephoy.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.7.2/changelogs-telephoy.md index 3f0730a71b03a03b0f880014a0abb7cd3a53b71c..8f07537e41c007a72424db6462cb8f4b62e57e9c 100644 --- a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.7.2/changelogs-telephoy.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.7.2/changelogs-telephoy.md @@ -62,17 +62,52 @@ export enum VoNRState { ``` +**适配指导** + +使用变更后的接口,示例代码如下: + +```js +N/A +``` + + +## cl.telephony.2 call模块接口变更 + +原始设计误将set接口回调设置为布尔值,set接口回调修正为void。 + +**变更影响** + +原接口设计失误,实际编码时发现并更改,接口实现不变。 + +**关键的接口/组件变更** + +修改前的接口原型: + +```js +function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback): void; +function setVoNRState(slotId: number, state: VoNRState): Promise; + +``` + +修改后的接口原型: + +```js +function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback): void; +function setVoNRState(slotId: number, state: VoNRState): Promise; +``` + **适配指导** 使用变更后的接口,示例代码如下: ```js call.setVoNRState( 0, VONR_STATE_ON, (err) => { - console.log(`callback: err->${JSON.stringify(err)}`); + if (err) { + console.log(`callback: err->${JSON.stringify(err)}`); + } + }); call.setVoNRState( 0, VONR_STATE_OFF, (err) => { console.log(`callback: err->${JSON.stringify(err)}`); }); -``` - - +``` \ No newline at end of file