From f15bc3106af516c336219f3d4ad86f7ac80ace74 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Wed, 24 May 2023 15:08:21 +0800 Subject: [PATCH] Update docs (17839) Signed-off-by: ester.zhou --- .../reference/apis/js-apis-screen-lock.md | 53 ++++++++++++++++ .../reference/errorcodes/Readme-EN.md | 2 +- .../errorcodes/errorcode-net-policy.md | 63 ------------------- .../errorcodes/errorcode-screenlock.md | 28 +++++++++ 4 files changed, 82 insertions(+), 64 deletions(-) delete mode 100644 en/application-dev/reference/errorcodes/errorcode-net-policy.md create mode 100644 en/application-dev/reference/errorcodes/errorcode-screenlock.md diff --git a/en/application-dev/reference/apis/js-apis-screen-lock.md b/en/application-dev/reference/apis/js-apis-screen-lock.md index 7f12cf2c54..92ea5dbe9a 100644 --- a/en/application-dev/reference/apis/js-apis-screen-lock.md +++ b/en/application-dev/reference/apis/js-apis-screen-lock.md @@ -88,6 +88,14 @@ Unlocks the screen. This API uses an asynchronous callback to return the result. | -------- | --------------------- | ---- | ------------------------- | | 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). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 | the screenlock management service is abnormal. | + **Example** ```js @@ -116,6 +124,14 @@ Unlocks the screen. This API uses a promise to return the result. | ------------------- | ------------------------------------------------------------ | | 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). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 | the screenlock management service is abnormal. | + **Example** ```js @@ -142,6 +158,14 @@ Locks the screen. This API uses an asynchronous callback to return the result. | -------- | ---------------------- | ---- | ---------------- | | 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). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 | the screenlock management service is abnormal. | + **Example** ```js @@ -170,6 +194,13 @@ Locks the screen. This API uses a promise to return the result. | ---------------------- | ------------------------------------------------------------ | | 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). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 | the screenlock management service is abnormal. | **Example** @@ -203,6 +234,13 @@ Registers a callback for system events related to screen locking. This API can b | ------- | ------------------------------------------------- | | boolean | Returns **true** if the callback is registered successfully; returns **false** otherwise.| +**Error codes** + +For details about the error codes, see [Screen Lock Management Error Codes](../errorcodes/errorcode-screenlock.md). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 | the screenlock management service is abnormal. | **Example** @@ -234,6 +272,13 @@ Sends an event to the screen lock service. This API uses an asynchronous callbac | parameter | number | Yes | Result.
- **0**: The operation is successful. For example, the screen is locked or unlocked successfully.
- **1**, the operation fails. For example, screen locking or unlocking fails.
- **2**: The operation is canceled. For example, screen locking or unlocking is canceled.| | callback | AsyncCallback\ | 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). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 |the screenlock management service is abnormal. | **Example** @@ -270,6 +315,14 @@ Sends an event to the screen lock service. This API uses a promise to return the | ----------------- | ---------------------------------------------- | | Promise\ | Promise 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). + +| ID| Error Message| +| -------- | ---------------------------------------- | +| 13200002 | the screenlock management service is abnormal. | + **Example** ```js diff --git a/en/application-dev/reference/errorcodes/Readme-EN.md b/en/application-dev/reference/errorcodes/Readme-EN.md index 9e2136b524..789d602a1c 100644 --- a/en/application-dev/reference/errorcodes/Readme-EN.md +++ b/en/application-dev/reference/errorcodes/Readme-EN.md @@ -55,7 +55,6 @@ - [Network Connection Management Error Codes](errorcode-net-connection.md) - [Ethernet Connection Management Error Codes](errorcode-net-ethernet.md) - [Network Sharing Error Codes](errorcode-net-sharing.md) - - [Network Policy Management Error Codes](errorcode-net-policy.md) - Connectivity - [NFC Error Codes](errorcode-nfc.md) - [RPC Error Codes](errorcode-rpc.md) @@ -68,6 +67,7 @@ - [HiDebug Error Codes](errorcode-hiviewdfx-hidebug.md) - [Input Method Framework Error Codes](errorcode-inputmethod-framework.md) - [Pasteboard Error Codes](errorcode-pasteboard.md) + - [Screen Lock Management Error Codes](errorcode-screenlock.md) - [Time and Time Zone Service Error Codes](errorcode-time.md) - [Webview Error Codes](errorcode-webview.md) - Account Management diff --git a/en/application-dev/reference/errorcodes/errorcode-net-policy.md b/en/application-dev/reference/errorcodes/errorcode-net-policy.md deleted file mode 100644 index 594f498f72..0000000000 --- a/en/application-dev/reference/errorcodes/errorcode-net-policy.md +++ /dev/null @@ -1,63 +0,0 @@ -# Policy Management Error Codes - -> **NOTE** -> -> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md). - -## 2100001 Invalid Parameter Value - -**Error Message** - -Invalid parameter value. - -**Description** - -Invalid parameter value - -**Cause** - -The input parameter value is not within the valid value range. - -**Procedure** - -Check whether the input parameter value is within the valid value range. - -## 2100002 Service Connection Failure - -**Error Message** - -Operation failed. Cannot connect to service. - -**Description** - -This error code is reported if a service connection failure occurs. - -**Cause** - -The service is abnormal. - -**Procedure** - -Check whether system services are running properly. - -## 2100003 System Internal Error - -**Error Message** - -System internal error. - -**Description** - -This error code is reported if a system internal error occurs. - -**Cause** - -1. The memory is abnormal. - -2. A null pointer is present. - -**Procedure** - -1. Check whether the memory space is sufficient. If not, clear the memory and try again. - -2. Check whether the system is normal. If not, try again later or restart the device. diff --git a/en/application-dev/reference/errorcodes/errorcode-screenlock.md b/en/application-dev/reference/errorcodes/errorcode-screenlock.md new file mode 100644 index 0000000000..c172593486 --- /dev/null +++ b/en/application-dev/reference/errorcodes/errorcode-screenlock.md @@ -0,0 +1,28 @@ +# Screen Lock Management Error Codes + +> **NOTE** +> +> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md). + +## 13200002 Screen Lock Management Service Is Abnormal + +**Error Message** + +The screenlock management service is abnormal. + +**Description** + +This error code is reported when the screen lock management service is not working correctly. + +**Possible Causes** + + +1. The service stops running due to unknown errors and is not automatically restored. +2. The service is running but does not respond due to unknown errors. + +**Solution** + +Run the **ps -ef** command to check whether the service is running. + +1. If the service is not running, restart the system. +2. If the service is running, close the service process and wait for automatic recovery. If the issue persists, perform step 1. -- GitLab