1# 电话子系统ChangeLog
2
3
4
5## cl.telephony.radio.1 isNrSupported接口变更
6
7
8NR是专有名词,需要全部大写。
9
10开发者需要根据以下说明对应用进行适配。
11
12
13
14**变更影响**
15
16基于此前版本开发的应用,需适配变更的js接口,变更前的接口已经不能正常使用了,否则会影响原有功能。
17
18
19
20**关键的接口/组件变更**
21
22- 涉及接口
23
24  isNrSupported(): boolean;
25  isNrSupported(slotId: number): boolean;
26
27- 变更前:
28
29```js
30function isNrSupported(): boolean;
31function isNrSupported(slotId: number): boolean;
32```
33
34- 变更后:
35
36```js
37function isNRSupported(): boolean;
38function isNRSupported(slotId: number): boolean;
39```
40
41
42
43**适配指导**
44
45使用变更后的接口,示例代码如下:
46
47```js
48let result = radio.isNrSupported();
49console.log("Result: "+ result);
50```
51
52
53```js
54let slotId = 0;
55let result = radio.isNRSupported(slotId);
56console.log("Result: "+ result);
57```
58
59
60## cl.telephony.call.2 dial接口变更
61
62从API9开始,废弃此接口,改为使用dialCall接口。
63
64开发者需要根据以下说明对应用进行适配。
65
66
67**变更影响**
68
69该接口删除无法再使用,请使用新增的接口dialCall替换,否则会影响原有功能。
70
71
72**关键的接口/组件变更**
73
74- 涉及接口
75
76  dial(phoneNumber: string, callback: AsyncCallback<boolean>): void;
77  dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback<boolean>): void;
78  dial(phoneNumber: string, options?: DialOptions): Promise<boolean>;
79
80- 变更前:
81
82```js
83function dial(phoneNumber: string, callback: AsyncCallback<boolean>): void;
84function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback<boolean>): void;
85function dial(phoneNumber: string, options?: DialOptions): Promise<boolean>;
86```
87
88- 变更后:
89
90```js
91function dialCall(phoneNumber: string, callback: AsyncCallback<void>): void;
92function dialCall(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback<void>): void;
93function dialCall(phoneNumber: string, options?: DialCallOptions): Promise<void>;
94```
95
96
97
98**适配指导**
99
100该接口删除无法再使用,请使用新增的接口dialCall替换。
101使用变更后的接口,示例代码如下:
102
103```js
104call.dialCall("138xxxxxxxx", (err, data) => {
105    console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
106});
107```
108
109
110```js
111call.dialCall("138xxxxxxxx", {
112    accountId: 0,
113    videoState: 0,
114    dialScene: 0,
115    dialType: 0,
116}, (err, data) => {
117    console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
118});
119```
120
121
122```js
123try {
124    call.dialCall('138xxxxxxxx');
125    console.log(`dialCall success, promise: data->${JSON.stringify(data)}`);
126} catch (error) {
127    console.log(`dialCall fail, promise: err->${JSON.stringify(error)}`);
128}
129```
130
131