From 9bd37d99498c99cdac99201b1fc2bde92167fee3 Mon Sep 17 00:00:00 2001 From: zengyawen Date: Thu, 10 Feb 2022 17:07:07 +0800 Subject: [PATCH] update docs Signed-off-by: zengyawen --- .../reference/apis/js-apis-battery-info.md | 3 +++ .../reference/apis/js-apis-brightness.md | 3 +++ .../application-dev/reference/apis/js-apis-power.md | 13 ++++++------- .../reference/apis/js-apis-runninglock.md | 8 ++++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-battery-info.md b/zh-cn/application-dev/reference/apis/js-apis-battery-info.md index 57a8070f4f4..c9a4b11914a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-battery-info.md +++ b/zh-cn/application-dev/reference/apis/js-apis-battery-info.md @@ -10,6 +10,9 @@ import batteryInfo from '@ohos.batteryInfo'; ``` +## 系统能力 + +SystemCapability.PowerManager.BatteryManager ## 属性 diff --git a/zh-cn/application-dev/reference/apis/js-apis-brightness.md b/zh-cn/application-dev/reference/apis/js-apis-brightness.md index 1825ff78c9b..9692cb136f5 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-brightness.md +++ b/zh-cn/application-dev/reference/apis/js-apis-brightness.md @@ -10,6 +10,9 @@ import brightness from '@ohos.brightness'; ``` +## 系统能力 + +SystemCapability.PowerManager.DisplayPowerManager ## brightness.setValue diff --git a/zh-cn/application-dev/reference/apis/js-apis-power.md b/zh-cn/application-dev/reference/apis/js-apis-power.md index 8304b440be0..281e065072a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-power.md +++ b/zh-cn/application-dev/reference/apis/js-apis-power.md @@ -10,14 +10,9 @@ import power from '@ohos.power'; ``` +## 系统能力 -## 权限 - -关机权限: ohos.permission.SHUTDOWN - -重启权限: ohos.permission.REBOOT - -重启并进入recovery模式的权限:ohos.permission.REBOOT_RECOVERY +SystemCapability.PowerManager.PowerManager ## power.shutdownDevice @@ -26,6 +21,8 @@ shutdownDevice(reason: string): void 系统关机。 +需要权限:ohos.permission.SHUTDOWN + - 参数: | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | @@ -44,6 +41,8 @@ rebootDevice(reason: string): void 重启设备。 +需要权限:ohos.permission.REBOOT(重启权限)、ohos.permission.REBOOT_RECOVERY(重启并进入recovery模式的权限) + - 参数: | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-runninglock.md b/zh-cn/application-dev/reference/apis/js-apis-runninglock.md index 887fa5eb22a..c6f8ba21379 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-runninglock.md +++ b/zh-cn/application-dev/reference/apis/js-apis-runninglock.md @@ -11,9 +11,9 @@ import runninglock from '@ohos.runningLock'; ``` -## 权限 +## 系统能力 -申请、使用锁的权限:ohos.permission.RUNNING_LOCK +SystemCapability.PowerManager.PowerManager ## RunningLockType @@ -84,6 +84,8 @@ createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback&l 创建RunningLock锁。 +需要权限:ohos.permission.RUNNING_LOCK + - 参数: | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | @@ -113,6 +115,8 @@ createRunningLock(name: string, type: RunningLockType): Promise<RunningLock&g 创建Runninglock锁。 +需要权限:ohos.permission.RUNNING_LOCK + - 参数: | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -- Gitee