| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the screen is unlocked successfully, and **false** means the opposite.|
**Error codes**
For details about the error codes, see [Screen Lock Management Error Codes](../errorcodes/errorcode-screenlock.md).
| Promise<boolean> | Promise used to return the result. The value **true** means that the screen is unlocked successfully, and **false** means the opposite.|
**Error codes**
For details about the error codes, see [Screen Lock Management Error Codes](../errorcodes/errorcode-screenlock.md).
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the screen is locked successfully, and **false** means the opposite.|
**Error codes**
For details about the error codes, see [Screen Lock Management Error Codes](../errorcodes/errorcode-screenlock.md).
| Promise<boolean> | Promise used to return the result. The value **true** means that the screen is locked successfully, and **false** means the opposite.|
**Error codes**
For details about the error codes, see [Screen Lock Management Error Codes](../errorcodes/errorcode-screenlock.md).
| 13200002 | The screenlock management service is abnormal. |
**Example**
...
...
@@ -282,13 +244,6 @@ Sends an event to the screen lock service. This API uses an asynchronous callbac
| parameter | number | Yes | Result.<br>- **0**: The operation is successful. For example, the screen is locked or unlocked successfully.<br>- **1**, the operation fails. For example, screen locking or unlocking fails.<br>- **2**: The operation is canceled. For example, screen locking or unlocking is canceled.|
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. The **value** true means that the event is sent successfully, and **false** means the opposite. |
**Error codes**
For details about the error codes, see [Screen Lock Management Error Codes](../errorcodes/errorcode-screenlock.md).
# @ohos.systemDateTime (System Time and Time Zone)
The **systemDateTime** module provides system time and time zone features. You can use the APIs of this module to set and obtain the system time and time zone.
| top | boolean | Yes | Whether to jump to the top of the page. The value **true** means to jump to the top of the page; and **false** means to scroll the page up by half the view port.|
**Error codes**
For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
| bottom | boolean | Yes | Whether to jump to the bottom of the page. The value **true** means to jump to the bottom of the page; and **false** means to scroll the page down by half the view port.|
**Error codes**
For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
| baseName | string | Yes| Save path. The value cannot be null. |
| autoName | boolean | Yes| Whether to automatically generate a file name.<br>The value **false** means not to automatically generate a file name.<br>The value **true** means to automatically generate a file name based on the URL of current page and the **baseName** value. In this case, **baseName** is regarded as a directory. |
| autoName | boolean | Yes| Whether to automatically generate a file name.<br>The value **false** means not to automatically generate a file name.<br>The value **true** means to automatically generate a file name based on the URL of current page and the **baseName** value. In this case, **baseName** is regarded as a directory. |
| callback | AsyncCallback\<string> | Yes | Callback used to return the save path if the operation is successful and null otherwise.|
**Example**
...
...
@@ -4082,6 +4296,10 @@ Stores this web page. This API uses a promise to return the result.
Implements a **GeolocationPermissions** object.
### Required Permissions
**ohos.permission.LOCATION**, **ohos.permission.APPROXIMATELY_LOCATION**, and **ohos.permission.LOCATION_IN_BACKGROUND**, which are required for accessing the location information. For details about the permissions, see [@ohos.geolocation (Geolocation)](./js-apis-geolocation.md).
### allowGeolocation
static allowGeolocation(origin: string): void
...
...
@@ -4469,6 +4687,8 @@ Provides the element information of the area being clicked. For details about th
Describes the data types supported for [WebMessagePort](#webmessageport).
| currentIndex | number | Yes | No | Index of the current page in the page history stack.|
| size | number | Yes | No | Number of indexes in the history stack. The maximum value is 50. If this value is exceeded, the earliest index will be overwritten.|
The parameter check failed or permission denied or system error.
**Description**
This error code is reported when a parameter check failure, permission verification failure, or system operation error occurs.
**Possible Cause**
1. The input parameter is invalid.
2. The required permission is not configured. For example, **ohos.permission.SET_TIME** is not configured for setting the time or **ohos.permission.SET_TIME_ZONE** is not configured for setting the time zone.
3. The system is not running properly due to a common kernel error, such as a memory allocation and multi-thread processing error.
**Solution**
1. Make sure input parameters are passed in as required.
2. Configure the **ohos.permission.SET_TIME** permission for setting the time and the **ohos.permission.SET_TIME_ZONE** permission for setting the time zone.