>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The Battery Info module provides APIs for querying the charger type, battery health status, and battery charging status.
## Modules to Import<a name="section199443271307"></a>
## Modules to Import<a name="section199443271307"></a>
```
```
...
@@ -274,4 +277,3 @@ Enumerates battery health states.
...
@@ -274,4 +277,3 @@ Enumerates battery health states.
>The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import<a name="s56d19203690d4782bfc74069abb6bd71"></a>
The Brightness module provides an API for setting the screen brightness.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The Power Manager module provides APIs for rebooting and shutting down the system, as well as querying the screen status.
## Modules to Import
## Modules to Import
...
@@ -12,7 +14,7 @@ import power from '@ohos.power';
...
@@ -12,7 +14,7 @@ import power from '@ohos.power';
Before using this API, you must declare the **ohos.permission.REBOOT** permission (to reboot) or the **ohos.permission.REBOOT_RECOVERY** permission (to reboot and enter the recovery mode)
**Required permission:** ohos.permission.REBOOT (to reboot) or ohos.permission.REBOOT_UPDATER (to reboot and enter the updater mode)
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- |
| ------ | ------ | ---- | ----- |
| reason | string | Yes| Reason for system reboot.|
| reason | string | Yes| Reason for system reboot.|
**Example**
**Example**
...
@@ -67,9 +71,9 @@ Checks the screen status of the current device.
...
@@ -67,9 +71,9 @@ Checks the screen status of the current device.
| callback | AsyncCallback<boolean> | Yes| Callback used to obtain the return value. <br/>The value **true** indicates that the screen is on, and value **false** indicates the opposite.|
| callback | AsyncCallback<boolean> | Yes | Callback used to obtain the return value.<br>Return value: The value **true** indicates that the screen is on, and the value **false** indicates the opposite.|
| Promise<boolean> | Promise used to asynchronously obtain the return value. <br/>The value **true** indicates that the screen is on, and value **false** indicates the opposite.|
| Promise<boolean> | Promise used to obtain the return value. <br/>Return value: The value **true** indicates that the screen is on, and the value **false** indicates the opposite.|
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The Running Lock module provides APIs for creating, querying, holding, and releasing running locks.
| type | RunningLockType | Yes| Type of the **RunningLock** object.|
| type | RunningLockType | Yes | Type of the **RunningLock** object. |
| callback | AsyncCallback<boolean> | Yes| Callback used to obtain the return value. <br/>The value **true** indicates that the specified type of **RunningLock** is supported, and value **false** indicates the opposite.|
| callback | AsyncCallback<boolean> | Yes | Callback used to obtain the return value.<br>Return value: The value **true** indicates that the specified type of **RunningLock** is supported, and the value **false** indicates the opposite.|
| Promise<boolean> | Promise used to asynchronously obtain the return value. The value **true** indicates that the specified type of **RunningLock** is supported, and value **false** indicates the opposite.|
| Promise<boolean> | Promise used to asynchronously obtain the return value.<br/>Return value: The value **true** indicates that the specified type of **RunningLock** is supported, and the value **false** indicates the opposite.|