fix: code_modfy

Signed-off-by: suozhipeng <suozhipeng@huawei.com>
This commit is contained in:
suozhipeng 2024-07-02 21:28:50 +08:00
parent e41a326b48
commit b14753bd06
3 changed files with 10 additions and 1 deletions

View File

@ -143,6 +143,7 @@ declare namespace batteryStats {
* @param { number } uid Indicates the uid.
* @returns { number } Power consumption information(mAh).
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @throws { BusinessError } 4600101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.BatteryStatistics
* @systemapi
@ -156,6 +157,7 @@ declare namespace batteryStats {
* @param { number } uid Indicates the uid.
* @returns { number } Power consumption information(Percent).
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @throws { BusinessError } 4600101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.BatteryStatistics
* @systemapi

View File

@ -129,6 +129,7 @@ declare namespace power {
* Suspends the device to turn off the screen.
*
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @throws { BusinessError } 4900101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @systemapi
@ -139,6 +140,7 @@ declare namespace power {
*
* @param { boolean } isImmediate Indicates whether suspend the device immediately.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @throws { BusinessError } 4900101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @systemapi
@ -205,6 +207,7 @@ declare namespace power {
*
* @param { boolean } clearMemory - Indicates whether to clear the memory before the device hibernates.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @throws { BusinessError } 4900101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @systemapi
@ -216,8 +219,8 @@ declare namespace power {
* Sets the timeout duration(ms) for turning off the screen.
*
* @param { number } timeout - Indicates duration(ms) for turning off the screen. The value -1 means restore the default value.
* @throws { BusinessError } 201 Permission verification failed. The application does not have the permission required to call the API.
* @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @throws { BusinessError } 4900101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @systemapi

View File

@ -63,6 +63,7 @@ declare namespace runningLock {
* @param { number } timeout Indicates the lock duration (ms). After the lock duration times out,
* the lock is automatically released and the system hibernates if no other {@link RunningLock} is set.
* timeout parameter must be of type number.
* @throws { BusinessError } 201 If the permission is denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types;
* @throws { BusinessError } 4900101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.PowerManager.Core
@ -108,6 +109,7 @@ declare namespace runningLock {
* This method requires the ohos.permission.RUNNING_LOCK permission.
*
* @permission ohos.permission.RUNNING_LOCK
* @throws { BusinessError } 201 If the permission is denied.
* @throws { BusinessError } 4900101 - Failed to connect to the service.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @since 9
@ -233,6 +235,7 @@ declare namespace runningLock {
* the RunningLockType type is an enumeration class.
* @param { AsyncCallback<RunningLock> } callback Indicates the callback of {@link RunningLock} object.
* AsyncCallback encapsulates a class of RunningLock type
* @throws { BusinessError } 201 If the permission is denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @since 9
@ -251,6 +254,7 @@ declare namespace runningLock {
* @param { RunningLockType } type Indicates the {@link RunningLockType}.
* the RunningLockType type is an enumeration class.
* @returns { Promise<RunningLock> } The {@link RunningLock} object.
* @throws { BusinessError } 201 If the permission is denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed.
* @syscap SystemCapability.PowerManager.PowerManager.Core
* @since 9