changelogs-telephoy.md 2.9 KB
Newer Older
S
shawn_he 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
# Telephony Subsystem Changelog



## cl.telephony.1 VoNRState Enum Value Change of setVoNState

Changed the **VoNRState** enum values of the **setVoNState** API. The values value of **VONR_STATE_ON** is changed from **0** to **1** and that of **VONR_STATE_OFF** is defined as **0** to keep consistency with boolean values.

**Change Impact**

The new **VoNRState** enum values need to be used when **setVoNState** is called. The API function remains unchanged.

**Key API/Component Changes**

Before change:

```js
function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback<void>): void;

/**
 * @systemapi Hide this for inner system use.
 * @since 10
 */
export enum VoNRState {
    /** Indicates the VoNR switch is on */
    VONR_STATE_ON = 0,
}
```

After change:

```js
function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback<void>): void;

/**
 * Indicates the VoNR state.
 *
 * @enum { number }
 * @syscap SystemCapability.Telephony.CallManager
 * @systemapi Hide this for inner system use.
 * @since 10
 */
export enum VoNRState {
    /**
     * Indicates the VoNR switch is off.
     *
     * @syscap SystemCapability.Telephony.CallManager
     * @systemapi Hide this for inner system use.
     * @since 10
     */
    VONR_STATE_OFF = 0,

    /**
     * Indicates the VoNR switch is on.
     *
     * @syscap SystemCapability.Telephony.CallManager
     * @systemapi Hide this for inner system use.
     * @since 10
     */
    VONR_STATE_ON = 1,
}
```


**Adaptation Guide**

When calling **setVoNState**, use the new **VoNRState** enum values. The sample code is as follows:


```js
call.setVoNRState( 0, VONR_STATE_ON, (err) => {
    if (err) {
        console.log(`callback: err->${JSON.stringify(err)}`);
    }
    
});
call.setVoNRState( 0, VONR_STATE_OFF, (err) => {
    console.log(`callback: err->${JSON.stringify(err)}`);
});
```


## cl.telephony.2 Callback Value Change of setVoNState

Changed the callback value of **setVoNState** from a boolean value to **void**.

**Change Impact**

The callback value needs to be set to **void** when **setVoNState** is called.

**Key API/Component Changes**

Before change:

```js
function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback<boolean>): void;
function setVoNRState(slotId: number, state: VoNRState): Promise<boolean>;

```

After change:

```js
function setVoNRState(slotId: number, state: VoNRState, callback: AsyncCallback<void>): void;
function setVoNRState(slotId: number, state: VoNRState): Promise<void>;
```

**Adaptation Guide**

Set the callback value to **void** when calling **setVoNState**. The sample code is as follows:

```js
call.setVoNRState( 0, VONR_STATE_ON, (err) => {
    if (err) {
        console.log(`callback: err->${JSON.stringify(err)}`);
    }
    
});
call.setVoNRState( 0, VONR_STATE_OFF, (err) => {
    console.log(`callback: err->${JSON.stringify(err)}`);
});
```