>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>
```
...
...
@@ -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 Power Manager module provides APIs for rebooting and shutting down the system, as well as querying the screen status.
## Modules to Import
...
...
@@ -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**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| reason | string | Yes| Reason for system reboot.|
| Name | Type | Mandatory | Description |
| ------ | ------ | ---- | ----- |
| reason | string | Yes| Reason for system reboot.|
**Example**
...
...
@@ -67,9 +71,9 @@ Checks the screen status of the current device.
**Parameters**
| Type| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| 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 asynchronously 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 Running Lock module provides APIs for creating, querying, holding, and releasing running locks.
## Modules to Import
```
import runninglock from '@ohos.runningLock';
import runningLock from '@ohos.runningLock';
```
## System Capabilities
SystemCapability.PowerManager.PowerManager
## RunningLockType
Enumerates the types of **RunningLock** objects.
| Name| Default Value| Description|
| -------- | -------- | -------- |
| BACKGROUND | 1 | Defines a **RunningLock** object.|
| PROXIMITY_SCREEN_CONTROL | 2 | A lock that determines whether to turn on or off the screen based on the distance away from the screen.|
| 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.|
| type | RunningLockType | Yes | Type of the **RunningLock** object. |
| 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.|
| type | RunningLockType | Yes| Type of the **RunningLock** object.|
| Name | Type | Mandatory | Description |
| ---- | --------------- | ---- | ---------- |
| type | RunningLockType | Yes| Type of the **RunningLock** object.|
**Return value**
**Return Value**
| Type| Description|
| -------- | -------- |
| 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.|