From 21f5d8ed1b155818f8a0f9710f766ef52a887518 Mon Sep 17 00:00:00 2001 From: yanghang Date: Thu, 26 Jun 2025 10:24:48 +0800 Subject: [PATCH] fix: Rectification of code differences Signed-off-by: yanghang --- api/@ohos.power.d.ts | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/api/@ohos.power.d.ts b/api/@ohos.power.d.ts index 0c92755ea5..21efe899f5 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; -- Gitee