提交 06debeac 编写于 作者: S shawn_he

update doc

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 38930ae0
......@@ -664,6 +664,8 @@ Ends a call. This API uses an asynchronous callback to return the result.
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -689,6 +691,8 @@ Ends a call based on the specified call ID. This API uses an asynchronous callba
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -715,6 +719,8 @@ Ends a call based on the specified call ID. This API uses a promise to return th
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -748,6 +754,8 @@ Rejects a call. This API uses an asynchronous callback to return the result.
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -773,6 +781,8 @@ Rejects a call based on the specified options. This API uses an asynchronous cal
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -802,6 +812,8 @@ Rejects a call based on the specified call ID. This API uses an asynchronous cal
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -828,6 +840,8 @@ Rejects a call based on the specified call ID and options. This API uses an asyn
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -858,6 +872,8 @@ Rejects a call based on the specified call ID and options. This API uses a promi
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -895,6 +911,8 @@ Holds a call based on the specified call ID. This API uses an asynchronous callb
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -921,6 +939,8 @@ Holds a call based on the specified call ID. This API uses a promise to return t
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -954,6 +974,8 @@ Unholds a call based on the specified call ID. This API uses an asynchronous cal
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -980,6 +1002,8 @@ Unholds a call based on the specified call ID. This API uses a promise to return
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1013,6 +1037,8 @@ Switches a call. This API uses an asynchronous callback to return the result.
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1039,6 +1065,8 @@ Switches a call. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.ANSWER_CALL
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1308,6 +1336,8 @@ Obtains the call waiting status. This API uses an asynchronous callback to retur
This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1334,6 +1364,8 @@ Obtains the call waiting status. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1367,6 +1399,8 @@ Sets the call waiting switch. This API uses an asynchronous callback to return t
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1394,6 +1428,8 @@ Sets the call waiting switch. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1604,6 +1640,8 @@ Subscribes to **callDetailsChange** events. This API uses an asynchronous callba
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1629,6 +1667,8 @@ Subscribes to **callEventChange** events. This API uses an asynchronous callback
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1654,6 +1694,8 @@ Subscribes to **callDisconnectedCause** events. This API uses an asynchronous ca
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1679,6 +1721,8 @@ Subscribes to **mmiCodeResult** events. This API uses an asynchronous callback t
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1704,6 +1748,8 @@ Unsubscribes from **callDetailsChange** events. This API uses an asynchronous ca
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1729,6 +1775,8 @@ Unsubscribes from **callEventChange** events. This API uses an asynchronous call
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1754,6 +1802,8 @@ Unsubscribes from **callDisconnectedCause** events. This API uses an asynchronou
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1779,6 +1829,8 @@ Unsubscribes from **mmiCodeResult** events. This API uses an asynchronous callba
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1915,6 +1967,8 @@ Obtains the call restriction status. This API uses an asynchronous callback to r
This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1942,6 +1996,8 @@ Obtains the call restriction status. This API uses a promise to return the resul
This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -1976,6 +2032,8 @@ Sets the call restriction status. This API uses an asynchronous callback to retu
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2008,6 +2066,8 @@ Sets the call restriction status. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2047,6 +2107,8 @@ Obtains call transfer information. This API uses an asynchronous callback to ret
This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2074,6 +2136,8 @@ Obtains call transfer information. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2108,6 +2172,8 @@ Sets call transfer information. This API uses an asynchronous callback to return
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2140,6 +2206,8 @@ Sets call transfer information. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2558,6 +2626,8 @@ Enables the IMS switch. This API uses an asynchronous callback to return the res
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2583,6 +2653,8 @@ Enables the IMS switch. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2616,6 +2688,8 @@ Disables the IMS switch. This API uses an asynchronous callback to return the re
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......@@ -2641,6 +2715,8 @@ Disables the IMS switch. This API uses a promise to return the result.
This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
......
......@@ -27,8 +27,104 @@ Provides the constants of all rule types.
| RULE_CHECK_ABILITY_CONNECTION_LEAK | bigint | Caution rule, which is programmed to detect whether ability leakage has occurred. |
## hichecker.addCheckRule<sup>9+</sup>
## hichecker.addRule
addCheckRule(rule: bigint): void
Adds one or more rules. HiChecker detects unexpected operations or gives feedback based on the added rules.
**System capability**: SystemCapability.HiviewDFX.HiChecker
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------- |
| rule | bigint | Yes | Rule to be added.|
**Example**
```js
try {
// Add a rule.
hichecker.addCheckRule(hichecker.RULE_CAUTION_PRINT_LOG);}
// Add multiple rules.
hichecker.addCheckRule(
hichecker.RULE_CAUTION_PRINT_LOG | hichecker.RULE_CAUTION_TRIGGER_CRASH);
catch (err) {
console.error(`code: ${err.code}, message: ${err.message}`);
}
```
## hichecker.removeCheckRule<sup>9+</sup>
removeCheckRule(rule: bigint): void
Removes one or more rules. The removed rules will become ineffective.
**System capability**: SystemCapability.HiviewDFX.HiChecker
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------- |
| rule | bigint | Yes | Rule to be removed.|
**Example**
```js
try {
// Remove a rule.
hichecker.removeCheckRule(hichecker.RULE_CAUTION_PRINT_LOG);
// Remove multiple rules.
hichecker.removeCheckRule(
hichecker.RULE_CAUTION_PRINT_LOG | hichecker.RULE_CAUTION_TRIGGER_CRASH);
catch (err) {
console.error(`code: ${err.code}, message: ${err.message}`);
}
```
## hichecker.containsCheckRule<sup>9+</sup>
containsCheckRule(rule: bigint): boolean
Checks whether the specified rule exists in the collection of added rules. If the rule is of the thread level, this operation is performed only on the current thread.
**System capability**: SystemCapability.HiviewDFX.HiChecker
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------- |
| rule | bigint | Yes | Rule to be checked.|
**Return value**
| Type | Description |
| ------- | ---------------------------------------------------------- |
| boolean | Returns **true** if the rule exists in the collection of added rules; returns **false** otherwise.|
**Example**
```js
try {
// Add a rule.
hichecker.addCheckRule(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS);
// Check whether the added rule exists in the collection of added rules.
hichecker.containsCheckRule(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS); // return true;
hichecker.containsCheckRule(hichecker.RULE_CAUTION_PRINT_LOG); // return false;
catch (err) {
console.error(`code: ${err.code}, message: ${err.message}`);
}
```
## hichecker.addRule<sup>(deprecated)</sup>
## hichecker.addRule
> **NOTE**<br>This API is deprecated since API version 9. You are advised to use [hichecker.addCheckRule](#hicheckeraddcheckrule9) instead.
addRule(rule: bigint): void
Adds one or more rules. HiChecker detects unexpected operations or gives feedback based on the added rules.
......@@ -52,10 +148,12 @@ hichecker.addRule(
hichecker.RULE_CAUTION_PRINT_LOG | hichecker.RULE_CAUTION_TRIGGER_CRASH);
```
## hichecker.removeRule
## hichecker.removeRule<sup>(deprecated)</sup>
removeRule(rule: bigint): void
> **NOTE**<br>This API is deprecated since API version 9. You are advised to use [hichecker.removeCheckRule](#hicheckerremovecheckrule9) instead.
Removes one or more rules. The removed rules will become ineffective.
**System capability**: SystemCapability.HiviewDFX.HiChecker
......@@ -101,10 +199,12 @@ hichecker.addRule(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS);
hichecker.getRule(); // return 1n;
```
## hichecker.contains
## hichecker.contains<sup>(deprecated)</sup>
contains(rule: bigint): boolean
> **NOTE**<br>This API is deprecated since API version 9. You are advised to use [hichecker.containsCheckRule](#hicheckercontainscheckrule9) instead.
Checks whether the specified rule exists in the collection of added rules. If the rule is of the thread level, this operation is performed only on the current thread.
**System capability**: SystemCapability.HiviewDFX.HiChecker
......
......@@ -928,7 +928,8 @@ Sends a cell location update request. This API uses an asynchronous callback to
**System API**: This is a system API.
**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
**Required permissions**: ohos.permission.LOCATION
**System capability**: SystemCapability.Telephony.CoreService
**Parameters**
......@@ -953,7 +954,8 @@ Sends a cell location update request for the SIM card in the specified slot. Thi
**System API**: This is a system API.
**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
**Required permissions**: ohos.permission.LOCATION
**System capability**: SystemCapability.Telephony.CoreService
**Parameters**
......@@ -980,7 +982,8 @@ Sends a cell location update request for the SIM card in the specified slot.This
**System API**: This is a system API.
**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION
**Required permissions**: ohos.permission.LOCATION
**System capability**: SystemCapability.Telephony.CoreService
**Parameters**
......
......@@ -1155,6 +1155,8 @@ Obtains the lock status of the SIM card in the specified slot. This API uses an
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CoreService
**Parameters**
......@@ -1182,6 +1184,8 @@ Obtains the lock status of the SIM card in the specified slot. This API uses a p
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
**System capability**: SystemCapability.Telephony.CoreService
**Parameters**
......@@ -2238,7 +2242,6 @@ Adds contact numbers for the SIM card in the specified slot. This API uses an as
let diallingNumbersInof = {
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
......@@ -2278,9 +2281,7 @@ Adds contact numbers for the SIM card in the specified slot. This API uses a pro
```js
let diallingNumbersInof = {
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
number: "138xxxxxxxx"
};
let promise = sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => {
......@@ -2316,9 +2317,7 @@ Deletes contact numbers from the SIM card in the specified slot. This API uses a
```js
let diallingNumbersInof = {
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
number: "138xxxxxxxx"
};
sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -2357,9 +2356,7 @@ Deletes contact numbers from the SIM card in the specified slot. This API uses a
```js
let diallingNumbersInof = {
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
number: "138xxxxxxxx"
};
let promise = sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => {
......@@ -2395,9 +2392,7 @@ Updates contact numbers for the SIM card in the specified slot. This API uses an
```js
let diallingNumbersInof = {
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
number: "138xxxxxxxx"
};
sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......
......@@ -37,3 +37,4 @@ The table below lists the APIs changes of the power management subsystem in Open
| system.brightness | GetBrightnessOptions | fail?: (data: string, code: number) => void; | Deprecated|
| system.brightness | GetBrightnessOptions | success?: (data: BrightnessResponse) => void; | Deprecated|
| system.brightness | BrightnessResponse | value: number; | Deprecated|
| ohos.batteryInfo | batteryInfo | ohos.batteryinfo -> ohos.batteryInfo | Module name changed |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册