diff --git a/api/@ohos.power.d.ts b/api/@ohos.power.d.ts index 0c92755ea5a6cf31cc62f6e11ab093030ee8bd3e..21efe899f58cc9d4a3abcfdc8602e9a3a319d895 100644 --- a/api/@ohos.power.d.ts +++ b/api/@ohos.power.d.ts @@ -16,11 +16,12 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ import { AsyncCallback, BusinessError } from './@ohos.base'; /*** if arkts 1.1 */ -import { int } from './@ohos.base'; +import { int, long } from './@ohos.base'; /*** endif */ /** @@ -291,23 +292,8 @@ declare namespace power { * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 19 - */ - function setScreenOffTime(timeout: number): void; - - /** - * Sets the timeout duration(ms) for turning off the screen with permission. - * - * @permission ohos.permission.POWER_MANAGER - * @param { long } 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 - * @since 20 - * @arkts 1.2 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setScreenOffTime(timeout: long): void;