> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module are system APIs and cannot be called by third-party applications.
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs of this module are system APIs and cannot be called by third-party applications.
The configuration policy provides the capability of obtaining the custom configuration directory and file path based on the predefined custom configuration level.
## Modules to Import
```
```js
importconfigPolicyfrom'@ohos.configPolicy';
```
...
...
@@ -22,18 +24,18 @@ For example, if the **config.xml** file is stored in **/system/etc/config.xml**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```
```js
importvibratorfrom'@ohos.vibrator';
```
...
...
@@ -25,16 +26,16 @@ Triggers vibration with a specific duration. This API uses a promise to return t
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ------------ |
| duration | number | Yes | Vibration duration.|
| duration | number | Yes | Vibration duration. |
**Return value**
| Type | Description |
| ------------------- | ----------- |
| Promise<void> | Promise used to indicate whether the vibration is triggered successfully.|
| Promise<void> | Promise used to indicate whether the vibration is triggered successfully.|
**Example**
```
```js
vibrator.vibrate(1000).then(()=>{
console.log("Promise returned to indicate a successful vibration.");
},(error)=>{
...
...
@@ -57,10 +58,10 @@ Triggers vibration with a specific duration. This API uses an asynchronous callb
| VIBRATOR_STOP_MODE_TIME | "time" | The vibration to stop is in **duration** mode. This vibration is triggered with the parameter **duration** of the **number** type.|
| VIBRATOR_STOP_MODE_PRESET | "preset" | The vibration to stop is in **EffectId** mode. This vibration is triggered with the parameter **effectId** of the **EffectId** type.|
| VIBRATOR_STOP_MODE_TIME | "time" | The vibration to stop is in **duration** mode. This vibration is triggered with the parameter **duration** of the **number** type. |
| VIBRATOR_STOP_MODE_PRESET | "preset" | The vibration to stop is in **EffectId** mode. This vibration is triggered with the parameter **effectId** of the **EffectId** type.|